wisnunugroho21 / reinforcement_learning_ppo_rnd

Deep Reinforcement Learning by using Proximal Policy Optimization and Random Network Distillation in Tensorflow 2 and Pytorch with some explanation
GNU General Public License v3.0
47 stars 5 forks source link

Testing error #10

Closed pavelxx1 closed 3 years ago

pavelxx1 commented 3 years ago

Hi, thx for repo! I have an error while run test episodes

Traceback (most recent call last):
  File "ppo_frozenlake_notslippery_tensorflow.py", line 640, in <module>
    main()
  File "ppo_frozenlake_notslippery_tensorflow.py", line 588, in main
    agent.update_ppo()          
  File "ppo_frozenlake_notslippery_tensorflow.py", line 407, in update_ppo
    for states, actions, rewards, dones, next_states in self.memory.get_all_tensor().batch(batch_size):
  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 1642, in batch
    return BatchDataset(self, batch_size, drop_remainder)
  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 4115, in __init__
    **self._flat_structure)
  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/gen_dataset_ops.py", line 596, in batch_dataset_v2
    _ops.raise_from_not_ok_status(e, name)
  File "/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py", line 6897, in raise_from_not_ok_status
    six.raise_from(core._status_to_exception(e.code, message), None)
  File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: Batch size must be greater than zero. [Op:BatchDatasetV2]
wisnunugroho21 commented 3 years ago

Thanks for the report. I will fix the bug