Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors with cloned code #9

Open
yarin05 opened this issue Apr 1, 2017 · 2 comments
Open

errors with cloned code #9

yarin05 opened this issue Apr 1, 2017 · 2 comments

Comments

@yarin05
Copy link

yarin05 commented Apr 1, 2017

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.

  1. 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

  2. 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

@gaoyuankidult
Copy link

Hi,

I also had the same problem. Was the problem solved?

Best

@gaoyuankidult
Copy link

Problem solved, please use keras 1.0.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants