- This topic has 3 replies, 4 voices, and was last updated 2 years, 1 month ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Home › Forums › Fórum TensorFlow 2.0: Um Guia Completo sobre o novo TensorFlow › Erro no código
Na parte final (Treinamento 2) está ocorrendo este erro:
<hr />
ValueError Traceback (most recent call last)
<ipython-input-69-0e572f39ca7e> in <module>()
34
35 if len(trader.memory) > batch_size:
—> 36 trader.batch_train(batch_size)
37
38 if episode % 10 == 0:
2 frames
/usr/local/lib/python3.7/dist-packages/keras/engine/data_adapter.py in select_data_adapter(x, y)
989 “Failed to find data adapter that can handle ”
990 “input: {}, {}”.format(
–> 991 _type_name(x), _type_name(y)))
992 elif len(adapter_cls) > 1:
993 raise RuntimeError(
ValueError: Failed to find data adapter that can handle input: (<class ‘tuple’> containing values of types {‘(<class \’list\’> containing values of types {“<class \’numpy.float64\’>”, “<class \’float\’>”})’, “<class ‘numpy.ndarray’>”}), <class ‘NoneType’>
Olá Tamashiro, você esta utilizando as versões indicadas no início do Colab? Normalmente, esse erro é uma incompatibilidade com as versões mais novas do Tensorflow.
Fabio
Experimente fazer esta correção no Loop do treinamento:
if len(trader.memory) > batch_size:
try:
trader.batch_train(batch_size)
except:
pass
acredito que vai funcionar
Se ainda houver alguma dúvida, estamos a disposição.