Skip to content

[rllib] ddpg_policy_graph clip_by_value shape error due to TF upgrade #4691

@joneswong

Description

@joneswong

System information

  • OS Platform and Distribution CentOS6.5
  • Ray installed from source
  • Ray master
  • Python 3
  • TensorFlow 1.8

Describe the problem

My teammate ran DDPG with crash and cannot see any clue from the stdout.
I asked her to revise /utils/tf_run_builder.py and print the catched exception.
In this way, we found that the action to be clipped is of shape (16, 3) where 16 is the batch size.
The min and max bounds are of shape (3,) which results inconsistent shape error according to the doc :

clip_value_min: A 0-D (scalar) Tensor, or a Tensor with the same shape as t. The minimum value to clip by.

Thus, we know that the clip_by_value() of TensorFlow has changed from v1.4 and here we should reshape the min_action and max_action according to the batch_size dimension.

Source code / logs

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions