ValueError: The data type of fed Variable 'words' must be 'int64', but received 'int32'
时间: 2024-01-11 12:02:14 浏览: 75
This error occurs when the data type of a variable named 'words' is expected to be 'int64' (a 64-bit integer), but it is actually 'int32' (a 32-bit integer).
To resolve this error, you need to ensure that the 'words' variable is declared as an 'int64' data type. If you are using a function or library that is generating the variable, you may need to modify the code to explicitly set the data type to 'int64'.
For example, if you are using NumPy library to generate the 'words' variable, you can specify the data type as 'int64' by using the 'dtype' parameter as follows:
```
import numpy as np
words = np.array([1, 2, 3], dtype=np.int64)
```
This will create a NumPy array with the 'words' variable and set its data type to 'int64'.
阅读全文