vat_tf icon indicating copy to clipboard operation
vat_tf copied to clipboard

GPU problem

Open Anooyman opened this issue 5 years ago • 3 comments

Hi takerum, Thanks for your work. In your code, it seems that you use the CPU to deal with the dataset and then use GPU to build the training graph. However, when I ran this program, here comes an issue that the program can not locate the CPU and GPU. Is there something I missed?

Anooyman avatar Jun 15 '19 00:06 Anooyman

Did you solve this problem?

wzm2256 avatar Sep 17 '19 07:09 wzm2256

I solved it like this:

Add a line: config=tf.ConfigProto(allow_soft_placement=True, log_device_placement=False)

and replace the session definition: with sv.managed_session() as sess: with: with sv.managed_session(config=config) as sess:

wzm2256 avatar Sep 17 '19 07:09 wzm2256

Thanks!!That helps a lot!

------------------ 原始邮件 ------------------ 发件人: "wzm2256"[email protected]; 发送时间: 2019年9月17日(星期二) 下午3:14 收件人: "takerum/vat_tf"[email protected]; 抄送: "Anooyman"[email protected];"Author"[email protected]; 主题: Re: [takerum/vat_tf] GPU problem (#16)

I solved it like this:

Add a line: config=tf.ConfigProto(allow_soft_placement=True, log_device_placement=False)

and replace the session definition: with sv.managed_session() as sess: to be: with sv.managed_session(config=config) as sess:

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Anooyman avatar Sep 17 '19 10:09 Anooyman