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

Not able to run on GPU #113

Open
tkanvar opened this issue Dec 29, 2019 · 1 comment
Open

Not able to run on GPU #113

tkanvar opened this issue Dec 29, 2019 · 1 comment

Comments

@tkanvar
Copy link

tkanvar commented Dec 29, 2019

Hi,

I have replaced "tf.device("cpu"):" with "tf.device("/device:gpu:0"):" everywhere in the code, but it still is giving the error of "Default AvgPoolingOp only supports NHWC on device type CPU".

The code is still considering the machine as CPU instead of GPU.

Please tell the possible issues or solutions.

@latstars
Copy link

latstars commented Jan 15, 2020

Hi,

I have replaced "tf.device("cpu"):" with "tf.device("/device:gpu:0"):" everywhere in the code, but it still is giving the error of "Default AvgPoolingOp only supports NHWC on device type CPU".

The code is still considering the machine as CPU instead of GPU.

Please tell the possible issues or solutions.

Hi, I meet the same problem with you.
I solved it with the following steps. (Maybe some of them are unnecessary.)

  1. create python 2.7 environment
  2. pip install tensorflow-gpu==1.4
  3. change all the code of tf.device("/cpu:0") to tf.device("/gpu:0")
  4. run with CUDA_VISIBLE_DEVICES=0 sh script/cifar10_micro_search.sh

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