Hello everybody,
I am facing a problem I can’t figure out.
I created the type changing function as follows:
(Solution code removed by staff)
But getting the following error at point when final dense layer is created:
---------------------------------------------------------------------------TypeError Traceback (most recent call last)
in
8
9 # Create the mnist object.–
10 mnist = MNIST(**args)
11
12 # Train the model.
in init(self, export_path, buffer_size, batch_size, learning_rate, epochs)
8 self._epochs = epochs
9 —>
10 self._build_model()
11 self.train_dataset, self.test_dataset = self._prepare_dataset()
12
in _build_model(self)
59 tf.keras.layers.Flatten(),
60 tf.keras.layers.Dense(128, activation=“relu”),—>
61 tf.keras.layers.Dense(10, activation=“softmax”)
62 ])
63
…
TypeError: x and y must have the same dtype, got tf.uint8 != tf.float32
Please do you have some hints on how to solve that?
Many thanks!
Jiri