Closed yeonmo317 closed 1 year ago
This line of code: q_values[[self.idx, actions]] = targets Gives an error: Exception has occurred: ValueError shape mismatch: value array of shape (4096,) could not be broadcast to indexing result of shape (2,4096,3)
run 04_q_learning_for_trading.ipynb
python 3.9
I found by replacing line 123 with :
for i in self.idx: action = actions[i] q_values[self.idx][action] = targets[i]
the training works!
Error:
This line of code: q_values[[self.idx, actions]] = targets Gives an error: Exception has occurred: ValueError shape mismatch: value array of shape (4096,) could not be broadcast to indexing result of shape (2,4096,3)
Steps to reproduce:
run 04_q_learning_for_trading.ipynb
Environment:
python 3.9