下了一个利用gym环境进行机器学习的代码,配置好环境后,运行失败,实在是看不懂了?

本人配置的环境是
tensorflow2.1.0
keras2.3.1

代码运行错误的输出如下
在网上找没找到出现类似问题的。。哭了

Traceback (most recent call last):
  File ".\DeepQ_v0.py", line 157, in <module>
    learner.train()
  File ".\DeepQ_v0.py", line 110, in train
    update_target = np.copy(self.model.predict(old_state.reshape(1, self.input_width))[0])
  File "D:\python3.6.3\lib\site-packages\keras\engine\training.py", line 1462, in predict
    callbacks=callbacks)
  File "D:\python3.6.3\lib\site-packages\keras\engine\training_arrays.py", line 324, in predict_loop
    batch_outs = f(ins_batch)
  File "D:\python3.6.3\lib\site-packages\tensorflow_core\python\keras\backend.py", line 3727, in __call__
    outputs = self._graph_fn(*converted_inputs)
  File "D:\python3.6.3\lib\site-packages\tensorflow_core\python\eager\function.py", line 1551, in __call__
    return self._call_impl(args, kwargs)
  File "D:\python3.6.3\lib\site-packages\tensorflow_core\python\eager\function.py", line 1591, in _call_impl
    return self._call_flat(args, self.captured_inputs, cancellation_manager)
  File "D:\python3.6.3\lib\site-packages\tensorflow_core\python\eager\function.py", line 1692, in _call_flat
    ctx, args, cancellation_manager=cancellation_manager))
  File "D:\python3.6.3\lib\site-packages\tensorflow_core\python\eager\function.py", line 545, in call
    ctx=ctx)
  File "D:\python3.6.3\lib\site-packages\tensorflow_core\python\eager\execute.py", line 67, in quick_execute
    six.raise_from(core._status_to_exception(e.code, message), None)
  File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.NotFoundError: '__inference_keras_scratch_graph_144' is neither a type of a primitive operation nor a name of a function registered in binary running on LAPTOP-JKA2BVQ. Make sure the operation or function is registered in the binary running in this process.

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问