openai / weightnorm

Example code for Weight Normalization, from "Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks"
https://arxiv.org/abs/1602.07868
MIT License
365 stars 118 forks source link

TypeError: get_updates() missing 1 required positional argument: 'constraints' #10

Closed nbansal90 closed 6 years ago

nbansal90 commented 6 years ago

I was trying out the keras version of the code. And I am getting an error, which I think is due to version difference. I am not quite able to find the issue, But I am running keras version 2.1.3. and running the program I am getting this error.

2018-02-15 13:13:59.367091: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1195] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:05:00.0, compute capability: 6.1)
Using real-time data augmentation.
Traceback (most recent call last):
  File "cifar10_cnn.py", line 106, in <module>
    validation_data=(X_test, Y_test))
  File "/usr/local/keras3/lib/python3.5/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/keras3/lib/python3.5/site-packages/keras/models.py", line 1256, in fit_generator
    initial_epoch=initial_epoch)
  File "/usr/local/keras3/lib/python3.5/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/keras3/lib/python3.5/site-packages/keras/engine/training.py", line 2026, in fit_generator
    self._make_train_function()
  File "/usr/local/keras3/lib/python3.5/site-packages/keras/engine/training.py", line 970, in _make_train_function
    loss=self.total_loss)
TypeError: get_updates() missing 1 required positional argument: 'constraints'

Seems like there is required to be somechange in get_updates() method.

mostafaelhoushi commented 6 years ago

I am getting the same error