RL-Bitcoin-trading-bot icon indicating copy to clipboard operation
RL-Bitcoin-trading-bot copied to clipboard

problem with train_agent and self.get_gaes

Open digifelis opened this issue 4 years ago • 3 comments

deltas = [r + gamma * (1 - d) * nv - v for r, d, nv, v in zip(rewards, dones, next_values, values)]

TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

digifelis avatar Nov 20 '21 10:11 digifelis

rewards = [0 if reward is None else reward for reward in rewards]

Add this above deltas = [r + ....

grandehelado avatar Nov 27 '21 15:11 grandehelado

deltas = [r + gamma * (1 - d) * nv - v for r, d, nv, v in zip(rewards, dones, next_values, values)]

TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

Where you able to solve this?

crazypythonista avatar Mar 07 '22 13:03 crazypythonista

rewards = [0 if reward is None else reward for reward in rewards]

Add this above deltas = [r + ....

Mind elaborating a bit more? It didnt solved the issue at my end, any help is highly appreciated. Thanks!

crazypythonista avatar Mar 07 '22 13:03 crazypythonista