kkuette / TradzQAI

Trading environnement for RL agents, backtesting and training.
Apache License 2.0
165 stars 47 forks source link

Training on GPU #16

Closed dropcunt closed 5 years ago

dropcunt commented 5 years ago

when I set the device to my GPU in run.py i get the following error:

InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'ppo/initialize/action-action/Initializer/zeros': Could not satisfy explicit device specification '' because the node was colocated with a group of nodes that required incompatible device '/device:GPU:0' Colocation Debug Info: Colocation group had the following types and devices: Assign: CPU Const: CPU Fill: GPU CPU Switch: GPU CPU VariableV2: CPU Identity: GPU CPU RefSwitch: GPU CPU StridedSliceAssign: GPU CPU IsVariableInitialized: CPU

Does anybody has the same issue? Do you know were you can set something like _allow_softplacement=True? Thanks for your help!

kkuette commented 5 years ago

Tensorforce use GPU by default, you can delete this line to use it. If you are not using convolutionnal network, using CPU is faster.

dropcunt commented 5 years ago

Thanks. You're right I thought it will be faster with the GPU