Tag Archives: callable

Python error: typeerror: ‘module’ object is not callable

TypeError: ‘module’ object is not callable when calling another function or class in Python. This is related to the import mechanism
To be clear, attention_keras.py and attention_tf.py are in the same package (i.e. under the same folder)


While calling a function in the attention_Tf.py file, it is found that attention_TF cannot be called
# Set attensons-Master – Mark Directory As -& GT; Resources ROOT

rule: 1, if the method in b.> file is called, that is, B.py has Class B: the principle of calling is: module name-class name-method name

2, if calling a function in the b.py file: module name – function name