I have python 3.7.4 installed and tensorflow version 2.2.0 installed on my Windows 10 x64. I am trying to execute this:
yolo_model = load_model("model_data/yolo.h5")
And it gives the mentioned error
Here is the stack trace:
Traceback (most recent call last):
File "Object Detection.py", line 78, in <module>
yolo_model = load_model("model_data/yolo.h5")
File "E:\Python37\lib\site-packages\keras\engine\saving.py", line 492, in load_wrapper
return load_function(*args, **kwargs)
File "E:\Python37\lib\site-packages\keras\engine\saving.py", line 584, in load_model
model = _deserialize_model(h5dict, custom_objects, compile)
File "E:\Python37\lib\site-packages\keras\engine\saving.py", line 274, in _deserialize_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "E:\Python37\lib\site-packages\keras\engine\saving.py", line 627, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "E:\Python37\lib\site-packages\keras\layers\__init__.py", line 168, in deserialize
printable_module_name='layer')
File "E:\Python37\lib\site-packages\keras\utils\generic_utils.py", line 147, in deserialize_keras_object
list(custom_objects.items())))
File "E:\Python37\lib\site-packages\keras\engine\network.py", line 1075, in from_config
process_node(layer, node_data)
File "E:\Python37\lib\site-packages\keras\engine\network.py", line 1025, in process_node
layer(unpack_singleton(input_tensors), **kwargs)
File "E:\Python37\lib\site-packages\keras\backend\tensorflow_backend.py", line 75, in symbolic_fn_wrapper
return func(*args, **kwargs)
File "E:\Python37\lib\site-packages\keras\engine\base_layer.py", line 489, in __call__
output = self.call(inputs, **kwargs)
File "E:\Python37\lib\site-packages\keras\layers\core.py", line 716, in call
return self.function(inputs, **arguments)
File "/Users/kian/Desktop/floydhub/yolo-03-oct/YAD2K/yad2k/models/keras_yolo.py", line 32, in space_to_depth_x2
AttributeError: module 'tensorflow' has no attribute 'space_to_depth'
I think location of module is different, FYI
tensorflow.space_to_depth
tensorflow.nn.space_to_depth
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With