nauyan/Segmentation

SEGNET issue

Closed this issue · 3 comments

It's a good job, the model can be trained normally, but when I to do test, some errors occured. when I use the SEGNET to do test, I got this error messeage:

Traceback (most recent call last):
File "Test.py", line 16, in
custom_objects={'MaxPoolingWithIndices':MaxPoolingWithIndices})
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/saving/save.py", line 184, in load_model
return hdf5_format.load_model_from_hdf5(filepath, custom_objects, compile)
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 178, in load_model_from_hdf5
custom_objects=custom_objects)
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/saving/model_config.py", line 55, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/layers/serialization.py", line 109, in deserialize
printable_module_name='layer')
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/utils/generic_utils.py", line 373, in deserialize_keras_object
list(custom_objects.items())))
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 987, in from_config
config, custom_objects)
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 2019, in reconstruct_from_config
process_layer(layer_data)
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 2001, in process_layer
layer = deserialize_layer(layer_data, custom_objects=custom_objects)
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/layers/serialization.py", line 109, in deserialize
printable_module_name='layer')
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/utils/generic_utils.py", line 375, in deserialize_keras_object
return cls.from_config(cls_config)
File "/data/home/amaxcuda8/.conda/envs/zh_py35/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 655, in from_config
return cls(**config)
TypeError: init() missing 2 required positional arguments: 'pool_size' and 'strides'

I am really sorry that you have to go through this. I basically had a different Test.py script but at the last moment, I had changed it and uploaded it without testing. I would recommend you to write your own script for testing. Sorry for the Inconvenience.

I am really sorry that you have to go through this. I basically had a different Test.py script but at the last moment, I had changed it and uploaded it without testing. I would recommend you to write your own script for testing. Sorry for the Inconvenience.

sorry, I can write my own script for testing, but I want to know how to solve this error?

TypeError: init() missing 2 required positional arguments: 'pool_size' and 'strides'

These are input parameters to custom layers.