Closed arvoelke closed 7 years ago
I downgraded even further to keras==1.0.8
, and now it seems to be working. This version should probably be suggested in the README?
Hi, sorry about the versioning trouble. I'm going to try to make it compatible with Keras 2.0 now, so all of this might be moot point, but it looks like I was using Keras 1.2.0 a few commits ahead of the official 1.2.0 release (specifically I was on 3a7cd05b488e327c1adccaaff10c78390d53b5a8) and it worked on that commit and 1.0.8 but not on the official 1.2.0 commit in-between. Sorry about that! Keras 2.0 is supposed to be stable release, so hopefully there won't be these issues in the future once I finish the upgrade.
@arvoelke got the same error here, I'm trying your solution to downgrade Keras
(lisa) suhubdyd@grok-machine:~/research/prednet$ python kitti_train.py
Using Theano backend.
Using cuDNN version 5105 on context None
Mapped name None to device cuda: GeForce GTX 750 (0000:01:00.0)
/u/suhubdyd/research/prednet/prednet.py:187: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(3, (3, 3), padding="same", activation=<function ..., data_format="channels_last")`
self.conv_layers[c].append(Convolution2D(self.R_stack_sizes[l], self.R_filt_sizes[l], self.R_filt_sizes[l], border_mode='same', activation=act, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:190: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(3, (3, 3), padding="same", activation="relu", data_format="channels_last")`
self.conv_layers['ahat'].append(Convolution2D(self.stack_sizes[l], self.Ahat_filt_sizes[l], self.Ahat_filt_sizes[l], border_mode='same', activation=act, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:193: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(48, (3, 3), padding="same", activation=<function ..., data_format="channels_last")`
self.conv_layers['a'].append(Convolution2D(self.stack_sizes[l+1], self.A_filt_sizes[l], self.A_filt_sizes[l], border_mode='same', activation=self.A_activation, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:187: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(48, (3, 3), padding="same", activation=<function ..., data_format="channels_last")`
self.conv_layers[c].append(Convolution2D(self.R_stack_sizes[l], self.R_filt_sizes[l], self.R_filt_sizes[l], border_mode='same', activation=act, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:190: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(48, (3, 3), padding="same", activation=<function ..., data_format="channels_last")`
self.conv_layers['ahat'].append(Convolution2D(self.stack_sizes[l], self.Ahat_filt_sizes[l], self.Ahat_filt_sizes[l], border_mode='same', activation=act, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:193: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(96, (3, 3), padding="same", activation=<function ..., data_format="channels_last")`
self.conv_layers['a'].append(Convolution2D(self.stack_sizes[l+1], self.A_filt_sizes[l], self.A_filt_sizes[l], border_mode='same', activation=self.A_activation, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:187: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(96, (3, 3), padding="same", activation=<function ..., data_format="channels_last")`
self.conv_layers[c].append(Convolution2D(self.R_stack_sizes[l], self.R_filt_sizes[l], self.R_filt_sizes[l], border_mode='same', activation=act, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:190: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(96, (3, 3), padding="same", activation=<function ..., data_format="channels_last")`
self.conv_layers['ahat'].append(Convolution2D(self.stack_sizes[l], self.Ahat_filt_sizes[l], self.Ahat_filt_sizes[l], border_mode='same', activation=act, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:193: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(192, (3, 3), padding="same", activation=<function ..., data_format="channels_last")`
self.conv_layers['a'].append(Convolution2D(self.stack_sizes[l+1], self.A_filt_sizes[l], self.A_filt_sizes[l], border_mode='same', activation=self.A_activation, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:187: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(192, (3, 3), padding="same", activation=<function ..., data_format="channels_last")`
self.conv_layers[c].append(Convolution2D(self.R_stack_sizes[l], self.R_filt_sizes[l], self.R_filt_sizes[l], border_mode='same', activation=act, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:190: UserWarning: Update your `Conv2D` call to the Keras 2 API: `Conv2D(192, (3, 3), padding="same", activation=<function ..., data_format="channels_last")`
self.conv_layers['ahat'].append(Convolution2D(self.stack_sizes[l], self.Ahat_filt_sizes[l], self.Ahat_filt_sizes[l], border_mode='same', activation=act, dim_ordering=self.dim_ordering))
/u/suhubdyd/research/prednet/prednet.py:195: UserWarning: Update your `UpSampling2D` call to the Keras 2 API: `UpSampling2D(data_format="channels_last")`
self.upsample = UpSampling2D(dim_ordering=self.dim_ordering)
/u/suhubdyd/research/prednet/prednet.py:196: UserWarning: Update your `MaxPooling2D` call to the Keras 2 API: `MaxPooling2D(data_format="channels_last")`
self.pool = MaxPooling2D(dim_ordering=self.dim_ordering)
Traceback (most recent call last):
File "kitti_train.py", line 59, in <module>
errors = prednet(inputs) # errors will be (batch_size, nt, nb_layers)
File "/u/suhubdyd/.conda/envs/lisa/lib/python2.7/site-packages/keras/layers/recurrent.py", line 243, in __call__
return super(Recurrent, self).__call__(inputs, **kwargs)
File "/u/suhubdyd/.conda/envs/lisa/lib/python2.7/site-packages/keras/engine/topology.py", line 558, in __call__
self.build(input_shapes[0])
File "/u/suhubdyd/research/prednet/prednet.py", line 216, in build
if self.initial_weights is not None:
AttributeError: 'PredNet' object has no attribute 'initial_weights'
@bill-lotter @arvoelke I got the same problem, I use the keras==2.0.6 and the tensorflow backend.
Traceback (most recent call last): File "/home/xk/PycharmProjects/prednet/kitti_train.py", line 59, in <module> errors = prednet(inputs) # errors will be (batch_size, nt, nb_layers) File "/home/xk/anaconda3/envs/tf2/lib/python2.7/site-packages/keras/layers/recurrent.py", line 262, in __call__ return super(Recurrent, self).__call__(inputs, **kwargs) File "/home/xk/anaconda3/envs/tf2/lib/python2.7/site-packages/keras/engine/topology.py", line 569, in __call__ self.build(input_shapes[0]) File "/home/xk/PycharmProjects/prednet/prednet.py", line 216, in build if self.initial_weights is not None: AttributeError: 'PredNet' object has no attribute 'initial_weights'
See cc76248 for downloading weights that are compatible with Keras 2.0. You can also convert old PredNet weights for Keras 2.0 by using convert_model_to_keras2
in keras_utils.py
.
Hi, I am currently trying to run your model using Python 2.7 and
Theano==0.9.0
(using a GPU withpygpu==0.6.2
). I am skipping the first step (by executingdownload_data.sh
) and going straight to training (python kitti_train.py
).I initially tried using
keras==2.0.2
, but saw this error:Then I noticed you suggest
keras==1.2.0
, so I downgraded, and retried, but saw a different error:Any tips for things I could try? Thanks, Aaron