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
I was trying to run the example in the front page, but got an error as
"The channel dimension of the inputs should be defined. Found None "
It seems that Convolution2D doesn't accept the input shape as "None".
How to make it working? Thanks.
The full error message is as follows:
ValueError Traceback (most recent call last)
in ()
11
12 # uses theano ordering. Note that we leave the image size as None to allow multiple image sizes
---> 13 model.add(Convolution2D(32, 3, 3, border_mode='same', input_shape=(3, None, None)))
14 model.add(Activation('relu'))
15 model.add(Convolution2D(32, 3, 3))
/home/u3714/.conda/envs/test_env/lib/python3.5/site-packages/keras/models.py in add(self, layer)
420 # and create the node connecting the current layer
421 # to the input layer we just created.
--> 422 layer(x)
423
424 if len(layer.inbound_nodes) != 1:
/home/u3714/.conda/envs/test_env/lib/python3.5/site-packages/keras/engine/topology.py in call(self, inputs, **kwargs)
526 'layer.build(batch_input_shape)')
527 if len(input_shapes) == 1:
--> 528 self.build(input_shapes[0])
529 else:
530 self.build(input_shapes)
/home/u3714/.conda/envs/test_env/lib/python3.5/site-packages/keras/layers/convolutional.py in build(self, input_shape)
123 channel_axis = -1
124 if input_shape[channel_axis] is None:
--> 125 raise ValueError('The channel dimension of the inputs '
126 'should be defined. Found None.')
127 input_dim = input_shape[channel_axis]
ValueError: The channel dimension of the inputs should be defined. Found None.
The text was updated successfully, but these errors were encountered:
Hi
I was trying to run the example in the front page, but got an error as
"The channel dimension of the inputs should be defined. Found
None
"It seems that Convolution2D doesn't accept the input shape as "None".
How to make it working? Thanks.
The full error message is as follows:
ValueError Traceback (most recent call last)
in ()
11
12 # uses theano ordering. Note that we leave the image size as None to allow multiple image sizes
---> 13 model.add(Convolution2D(32, 3, 3, border_mode='same', input_shape=(3, None, None)))
14 model.add(Activation('relu'))
15 model.add(Convolution2D(32, 3, 3))
/home/u3714/.conda/envs/test_env/lib/python3.5/site-packages/keras/models.py in add(self, layer)
420 # and create the node connecting the current layer
421 # to the input layer we just created.
--> 422 layer(x)
423
424 if len(layer.inbound_nodes) != 1:
/home/u3714/.conda/envs/test_env/lib/python3.5/site-packages/keras/engine/topology.py in call(self, inputs, **kwargs)
526 '
layer.build(batch_input_shape)
')527 if len(input_shapes) == 1:
--> 528 self.build(input_shapes[0])
529 else:
530 self.build(input_shapes)
/home/u3714/.conda/envs/test_env/lib/python3.5/site-packages/keras/layers/convolutional.py in build(self, input_shape)
123 channel_axis = -1
124 if input_shape[channel_axis] is None:
--> 125 raise ValueError('The channel dimension of the inputs '
126 'should be defined. Found
None
.')127 input_dim = input_shape[channel_axis]
ValueError: The channel dimension of the inputs should be defined. Found
None
.The text was updated successfully, but these errors were encountered: