Skip to content

File "/home/layaaa/my_projects/panda/safety_control/utils/mpi_tf.py", line 70, in compute_gradients buf = np.zeros(flat_grad.shape, np.float32) TypeError: __index__ returned non-int (type NoneType) #33

Description

@khan008

I got this error, how can I solved it. I am using tensorflow 1.13.1 and keras 2.2.4.

Traceback (most recent call last):
File "run_training.py", line 20, in
max_ep_len=500,
File "/home/siat/my_projects/robotic-arm-safeRL/safe_rl/pg/algos.py", line 13, in ppo
run_polopt_agent(agent=agent, **kwargs)
File "/home/siat/my_projects/robotic-arm-safeRL/safe_rl/pg/run_agent.py", line 215, in run_polopt_agent
train_pi = MpiAdamOptimizer(learning_rate=agent.pi_lr).minimize(pi_loss)
File "/home/layaaa/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 403, in minimize
grad_loss=grad_loss)
File "/home/layaaa/my_projects/panda/safety_control/utils/mpi_tf.py, line 70, in compute_gradients
buf = np.zeros(flat_grad.shape, np.float32)
TypeError: index returned non-int (type NoneType)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions