Usando o pynotebook exatamente como está tanto localmente como no Colab obtenho o erro abaixo:
ValueError Traceback (most recent call last)
in ()
5 # Um novo modelo será treinado, caso este arquivo não exista.
6 if not os.path.exists('./{}'.format(filename)):
----> 7 model.fit(x_train, y_train, validation_data=(x_test, y_test), epochs=10, batch_size=200) #dados de treino, rótulos, dados de validação e rótulos de validação, iterações (épocas)
8 model.save_weights(filename)
9 else:
/usr/local/lib/python3.6/dist-packages/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, **kwargs)
950 sample_weight=sample_weight,
951 class_weight=class_weight,
--> 952 batch_size=batch_size)
953 # Prepare validation data.
954 do_validation = False
/usr/local/lib/python3.6/dist-packages/keras/engine/training.py in _standardize_user_data(self, x, y, sample_weight, class_weight, check_array_lengths, batch_size)
787 feed_output_shapes,
788 check_batch_axis=False, # Don't enforce the batch size.
--> 789 exception_prefix='target')
790
791 # Generate sample-wise weight values given the sample_weight
and
/usr/local/lib/python3.6/dist-packages/keras/engine/training_utils.py in standardize_input_data(data, names, shapes, check_batch_axis, exception_prefix)
136 ': expected ' + names[i] + ' to have shape ' +
137 str(shape) + ' but got array with shape ' +
--> 138 str(data_shape))
139 return data
140
ValueError: Error when checking target: expected predict to have shape (10,) but got array with shape (1,)