Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>
[toc]
Problem description
Run command
Error log
Traceback (most recent call last):
File "./run.py", line 125, in <module>
model = get_unet()
File "./run.py", line 103, in get_unet
up6 = merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)
TypeError: 'module' object is not callable
Solutions
Install historical versions of keras before 2.1.6[ Releases ]
# pip install https://github.com/keras-team/keras/releases/tag/2.1.6
Problem analysis
1. According to the error log, the module was not found. 2. Check (under the search path) whether there is no such module
>>> import sys
>>> print(sys.path)
3. See if there is a merge.py module (file) in the installation path of keras
$ pip install keras
4. Keras has been installed and from keras.layers import merge
has been introduced in the header file. But why not
5. The merge module (file) does exist
6. Open merge.py and find that there is no merge()
function, so it will not be called[ Ref]
Similar Posts:
- [Solved] Python TensorFlow Error: ‘tensorflow.compat.v2.__internal__’ has no attribute ‘tf2’
- ImportError: cannot import name’e.g. utils’from’tensorflow.as.utils’ 38382;’ 39064;
- Conda Install Library Error: failed with initial frozen solve. Retrying with flexible solve.
- [Solved] module ‘keras.engine.topology’ has no attribute ‘load_weights_from_hdf5_group_by_name…
- Error in calling GPU by keras or tensorflow: blas GEMM launch failed
- [Solved] TensorFlow Error: InternalError: Failed copying input tensor
- Problems and solutions in running tensorflow
- Name Error: name ‘yolo_head’ is not defined [How to Solve]
- Keras.utils.to in keras_ Categorical method
- [Solved] Keras loads the model Error: attributeerror: ‘STR’ object has no attribute ‘decode’