0

When I create an InputLayer, a None dimension gets added. I don't know why this is.

    image_shape = ds_info.features['image'].shape
    input_shape = (ds_info.features['label'].num_classes, image_shape[0], image_shape[1], image_shape[2])
print('input_shape: ', input_shape)

## Create the CNN
# Create the input layer
input_layer = Input(shape=input_shape)

print('input_layer: ', input_layer.shape)

Results

input_shape:  (1623, 105, 105, 3)
input_layer:  (None, 1623, 105, 105, 3)
Cornelis
  • 129
  • 1
  • 1
    The None dimension is the batch dimension, indicating that any number of examples (e.g. 4, 8, 16 etc.) can be put into the network. See also this answer. – Oxbowerce Oct 24 '20 at 11:00
  • Ok but this changes the shape of the model which results in error for me. – Cornelis Oct 24 '20 at 11:44

0 Answers0