chou141253 / FGVC-PIM

Pytorch implementation for "A Novel Plug-in Module for Fine-Grained Visual Classification". fine-grained visual classification task.
MIT License
186 stars 39 forks source link

How to run the code? #5

Closed lansfair closed 2 years ago

lansfair commented 2 years ago

I want to run the train.py to my datasets , but it is error RuntimeError: "max_cpu" not implemented for 'Half'

chou141253 commented 2 years ago

please comment out https://github.com/chou141253/FGVC-PIM/blob/3ecf29c496c85b92150c73de65c148322d52ed19/train.py#L147 and https://github.com/chou141253/FGVC-PIM/blob/3ecf29c496c85b92150c73de65c148322d52ed19/train.py#L161 and https://github.com/chou141253/FGVC-PIM/blob/3ecf29c496c85b92150c73de65c148322d52ed19/train.py#L165 and https://github.com/chou141253/FGVC-PIM/blob/3ecf29c496c85b92150c73de65c148322d52ed19/train.py#L395

than change https://github.com/chou141253/FGVC-PIM/blob/3ecf29c496c85b92150c73de65c148322d52ed19/train.py#L165 to

optimizer.step()