You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks,your tutorial and code very well explained LSTM for a beginner like me,however,when I run it on pycharm(based on python3.6,keras1.0.7),it shows as follows:
File "C:/Users/Guo/Desktop/household_power_consumption/predict.py", line 132, in
run_network()
File "C:/Users/Guo/Desktop/household_power_consumption/predict.py", line 105, in run_network
model = build_model()
File "C:/Users/Guo/Desktop/household_power_consumption/predict.py", line 67, in build_model
return_sequences=True))
TypeError: Expected int32, got <tf.Variable 'lstm_1_W_i:0' shape=(1, 50) dtype=float32_ref> of type 'Variable' instead.
I wonder if it's the version-compatibility,would you give me some advice?
really,thank you again
The text was updated successfully, but these errors were encountered:
It may indeed come from the change in versions of Keras, the code used to run. However the error seems quite clear : it expected a type of int32 (32 bits integer) and got a Variable with dtype float32 (32bits float).
Can't say for sure, it seems like you've changed the code somehow but I'd bet on this: LSTM() expects an int as number of neurons in the layer but you gave a tensorflow variable from the previous LSTM layer instead. Could simply be that you inverted the order of arguments
Thanks,your tutorial and code very well explained LSTM for a beginner like me,however,when I run it on pycharm(based on python3.6,keras1.0.7),it shows as follows:
File "C:/Users/Guo/Desktop/household_power_consumption/predict.py", line 132, in
run_network()
File "C:/Users/Guo/Desktop/household_power_consumption/predict.py", line 105, in run_network
model = build_model()
File "C:/Users/Guo/Desktop/household_power_consumption/predict.py", line 67, in build_model
return_sequences=True))
TypeError: Expected int32, got <tf.Variable 'lstm_1_W_i:0' shape=(1, 50) dtype=float32_ref> of type 'Variable' instead.
I wonder if it's the version-compatibility,would you give me some advice?
really,thank you again
The text was updated successfully, but these errors were encountered: