How can I generate random input to feed to model.fit.
I tried doing this to simulate 64 examples of size (img.size[0], img.size[1], 1) for both the input and the output. But get an error.
dataset_debug = tf.data.Dataset.from_tensor_slices((tf.random.normal(shape = (64, img.size[0], img.size[1], 1)), tf.random.normal(shape = (64, img.size[0], img.size[1], 1))))
history = model.fit(dataset_debug, epochs=EPOCHS, shuffle=True, batch_size=BATCH_SIZE, validation_data= dataset_test, callbacks=[cp_callback, tensorboard_callback])
ValueError: Input 0 is incompatible with layer model: expected shape=(None, 304, 228, 1), found shape=(304, 228, 1)
Aucun commentaire:
Enregistrer un commentaire