You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
150 x = BatchNormalization(axis=1)(x)
^
ValueError
Shape must be rank 1 but is rank 0 for 'batch_normalization_1/cond/Reshape_4' (op: 'Reshape') with input shapes: [1,75,1,1], [].
File "C:\DRL\model.py", line 150, in conv_layer
x = BatchNormalization(axis=1)(x)
File "C:\DRL\model.py", line 225, in _build_model
x = self.conv_layer(main_input, self.hidden_layers[0]['filters'], self.hidden_layers[0]['kernel_size'])
File "C:\DRL\model.py", line 114, in init
self.model = self._build_model()
File "C:\DRL\Untitled-1.py", line 67, in
current_NN = Residual_CNN(config.REG_CONST, config.LEARNING_RATE, (2,) + env.grid_shape, env.action_size, config.HIDDEN_CNN_LAYERS)
Activity
Vovak1919 commentedon Dec 7, 2018
Shape:TensorShape([Dimension(None), Dimension(75), Dimension(6), Dimension(7)])
dims:[Dimension(None), Dimension(75), Dimension(6), Dimension(7)]
0:Dimension(None)
1:Dimension(75)
2:Dimension(6)
3:Dimension(7)
len:4
ndims:4
_dims:[Dimension(None), Dimension(75), Dimension(6), Dimension(7)]
_ndims:4
_tf_api_names:('TensorShape',)
_tf_api_names_v1:('TensorShape',)
value_index:0
_consumers:[]
_dtype:tf.float32
_id:21
Vovak1919 commentedon Dec 7, 2018
The module is called from here.
Call Stack:
conv_layer (c:\DRL\model.py:150)
_build_model (c:\DRL\model.py:225)
init (c:\DRL\model.py:114)
(c:\DRL\Untitled-1.py:67)
acautin commentedon Dec 7, 2018
@Vovak1919 at least for
It seems to be a problem with keras, the version 2.1.5 worked for me. (It should also be solved on master but not yet on the pip version)
Ref: keras-team/keras#10648
Vovak1919 commentedon Dec 7, 2018
Thank you, earned after correcting the file tensorflow_backend.py
keras-team/keras@e3a2f7d
ahmedosama9777 commentedon Apr 27, 2020
What did you do as a correction?