Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU problem #16

Open
Anooyman opened this issue Jun 15, 2019 · 3 comments
Open

GPU problem #16

Anooyman opened this issue Jun 15, 2019 · 3 comments

Comments

@Anooyman
Copy link

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?

@wzm2256
Copy link

wzm2256 commented Sep 17, 2019

Did you solve this problem?

@wzm2256
Copy link

wzm2256 commented Sep 17, 2019

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:

@Anooyman
Copy link
Author

Anooyman commented Sep 17, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants