pytorch / examples

A set of examples around pytorch in Vision, Text, Reinforcement Learning, etc.
https://pytorch.org/examples
BSD 3-Clause "New" or "Revised" License
22.23k stars 9.52k forks source link

Argument parser does not recognise mps #1182

Open rociorey opened 1 year ago

rociorey commented 1 year ago

Your issue may already be reported! Please search on the issue tracker before creating one.

Context

I am running

python neural_style/neural_style.py train --dataset "path" --style-image "image-path" --save-model-dir "path"
 --epochs 2 --cuda 1

Your Environment

Current Behavior

I get the error AttributeError: 'Namespace' object has no attribute 'mps'

I have tried to set the gpu id to 0 as referenced in issue number 1134, still not working.

msaroufim commented 1 year ago

Hmm I think this was a recent regression https://github.com/pytorch/examples/pull/1064

Could you try commenting out the mps specific bits from the code and see if that solves the problem?