Hi!
I need help. Taking a training course but looks like the code needs to be updated. Since volatile was removed… here is the code and warning:
def select_action(self, state):
probs = F.softmax(self.model(Variable(state, volatile = True))*100) # T=100
action = probs.multinomial()
return action.data[0,0]
/home/ben/Self_Driving_Car/ai.py:63: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad():
instead.
probs = F.softmax(self.model100) # T=100
/home/ben/Self_Driving_Car/ai.py:63: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
probs = F.softmax(self.model100) # T=100
Any help will be highly appreciated.
Regards,
Ben