ZhengyaoJiang / PGPortfolio

PGPortfolio: Policy Gradient Portfolio, the source code of "A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem"(https://arxiv.org/pdf/1706.10059.pdf).
GNU General Public License v3.0
1.74k stars 750 forks source link

select gpu unit #65

Closed Amarchuk closed 6 years ago

Amarchuk commented 6 years ago

Hi!

As I understand from User Guide, recent GPU support just make you able to train more models at the same time. Is there a simple way to choose which gpu unit to use if I have more than one?

dexhunter commented 6 years ago

The framework by default uses all the GPU. For single GPU usage, you can check tensorflow page

Amarchuk commented 6 years ago

Thanks for the reference!

Are you sure about all GPUs usage? I have several of them installed, but when running 1/2/6 training processes I get near the same time results in both --device=cpu and --device=gpu modes. It is even more strange because CPU has only two cores. Should I expect better performance or maybe I miss something important?

dexhunter commented 6 years ago

Hmm.. You need to give your environment. I can't analyse the problem without further information. Besides, I suggest you check stackoverflow or other forums first since they generally have more information on this topic and very easy to find the answer to the problem. I doubt the problem is related to our framework.

Amarchuk commented 6 years ago

@DexHunter Sure, I don't expect you to teach me how to work with tf/gpu/etc :D Just check my common sense for the recent implementation and your answers provide me enough information on that. Thank you