Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mul() received an invalid combination of arguments #4

Closed
iksanov opened this issue Dec 6, 2018 · 0 comments
Closed

mul() received an invalid combination of arguments #4

iksanov opened this issue Dec 6, 2018 · 0 comments

Comments

@iksanov
Copy link

iksanov commented Dec 6, 2018

Traceback (most recent call last)
36 state = np.float32(observation)
37
---> 38 action = trainer.get_exploration_action(state)
39 # if _ep%5 == 0:
40 # # validate every 5th episode

.../train.py in get_exploration_action(self, state)
62 """
63 state = Variable(torch.from_numpy(state))
---> 64 action = self.actor.forward(state).detach()
65 new_action = action.data.numpy() + (self.noise.sample() * self.action_lim)
66 return new_action

.../model.py in forward(self, state)
97 action = torch.tanh(self.fc4(x))
98
---> 99 action = action * self.action_lim
100
101 return action

TypeError: mul() received an invalid combination of arguments - got (numpy.int64), but expected one of:

  • (Tensor other)
    didn't match because some of the arguments have invalid types: (numpy.int64)
  • (Number other)
    didn't match because some of the arguments have invalid types: (numpy.int64)
@iksanov iksanov closed this as completed Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant