Following this tutorial:
I have this feature and label in Tensorflow:
>>> play_features.head()
enemy_class player_class player_cards enemy_cards previous_player_placed_card
0 [0, 0, 0] [0, 0, 0] [0, 6, 12, 17, 0, 6, 12, 17, 0, 6, 12, 17] [0, 6, 12, 17, 0, 6, 12, 17, 0, 6, 12, 17] [12, 12, 12]
1 [0, 0, 0] [0, 0, 0] [0, 6, 12, 17, 0, 6, 12, 17, 0, 6, 12, 17] [0, 6, 12, 17, 0, 6, 12, 17, 0, 6, 12, 17] [-1]
>>> play_label.head()
0 [6, 6, 6]
1 [6]
play_model = tf.keras.Sequential([layers.Dense(64), layers.Dense(1)])
play_model.compile(loss = tf.losses.MeanSquaredError(), optimizer = tf.optimizers.Adam())
play_model.fit(play_features.to_numpy(), play_label.to_numpy(), epochs=10)
How could I fit this model into Tensorflow given that I have this error?
ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray).