Issue
The problem when I want to use pre-trained VGG16 is that is expects shape=(None, 224, 224, 3), but found shape=(32, 28, 28). What can I do in order to use the model? or should I not use convnets for images under 244 x 244 pixels? Thanks
Solution
resize using tensorflow as follows:
(x_train, y_train), (_, _) = tf.keras.datasets.mnist.load_data()
print(x_trian.shape) # (60000, 28, 28)
# train set / data
x_train = np.expand_dims(x_train, axis=-1)
x_train = tf.image.resize(x_train, [224,224])
print(x_train.shape) # (60000, 224, 224, 1)
Answered By - Ayalew Mohammed
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.