keras-segnet
keras-segnet copied to clipboard
errors with cloned code
hey, i might do something wrong which i cant understand, 2 problems appears when simply running the example and i would like to solve them.
-
running build_model.py results in this error: Traceback (most recent call last): File "build_model.py", line 123, in
autoencoder.add(Reshape((n_labels, img_h * img_w))) File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 455, in add output_tensor = layer(self.outputs[0]) File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 559, in call output_shape = self.compute_output_shape(input_shape) File "/usr/local/lib/python2.7/dist-packages/keras/layers/core.py", line 385, in compute_output_shape input_shape[1:], self.target_shape) File "/usr/local/lib/python2.7/dist-packages/keras/layers/core.py", line 379, in _fix_unknown_dimension raise ValueError(msg) ValueError: total size of new array must be unchanged -
running SegNet.py results with this error: Traceback (most recent call last): File "SegNet.py", line 105, in
autoencoder = models.model_from_json(model_file.read()) File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 325, in model_from_json return layer_module.deserialize(config, custom_objects=custom_objects) File "/usr/local/lib/python2.7/dist-packages/keras/layers/init.py", line 46, in deserialize printable_module_name='layer') File "/usr/local/lib/python2.7/dist-packages/keras/utils/generic_utils.py", line 141, in deserialize_keras_object return cls.from_config(config['config']) File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 1190, in from_config model.add(layer) File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 455, in add output_tensor = layer(self.outputs[0]) File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 554, in call output = self.call(inputs, **kwargs) File "/usr/local/lib/python2.7/dist-packages/keras/layers/normalization.py", line 140, in call epsilon=self.epsilon) File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 572, in normalize_batch_in_training x, gamma, beta, reduction_axes, epsilon) File "/usr/local/lib/python2.7/dist-packages/theano/tensor/nnet/bn.py", line 220, in batch_normalization_train raise ValueError("epsilon must be at least 1e-5, got %s" % str(epsilon)) ValueError: epsilon must be at least 1e-5, got 9.99999997475e-07
Hi,
I also had the same problem. Was the problem solved?
Best
Problem solved, please use keras 1.0.4.