Issue training the SMS Text Classifier model

I’m having an issue with my RNN model in the last ML with Python project. I’ve built and compiled my model without (apparently) any problems, but when I try to fit it I get the following error message:

InvalidArgumentError: ValueError: Tensor conversion requested dtype int64 for Tensor with dtype int32: <tf.Tensor: shape=(), dtype=int32, numpy=0>

Any help would be appreciated. Here is the link to my notebook.

Well this means something in your encoded training batches went wrong.
Maybe take a look at some random examples to make sure those are indeed integers.

Two notes:
First, compiling doesn’t do much. It basically initializes the model specified in the previous commands (setting up the nodes, weight and bias). Unless you made impossible node-connections, it won’t throw an error.
Second, you are not allowed to use the test-set in the training (not even as validation-set) - because the point of it is to prevent overfitting, which can only work if neither the algorithm nor you tweek the model on it. If you want validation data, you have to create a validation-dataset seperate from training and testing. I think you can also just tell the .fit() to use a percentage of random training-data as validation during training.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.