Huage001 / AdaAttN

Officially unofficial PyTorch re-implementation of paper: AdaAttN: Revisit Attention Mechanism in Arbitrary Neural Style Transfer, ICCV 2021.
Apache License 2.0
210 stars 34 forks source link

About the adaattn_model.py #12

Closed weiyang001 closed 2 years ago

weiyang001 commented 2 years ago

Hi , thanks for your code. I have two questions about it.

  1. I don't understand what self.device means here, it doesn't seem to be defined. 1647223113(1)

  2. In addition, I would like to ask whether local feature loss is taking up too much memory.Because I ran out of memory when I tried to import this module into other code.

Thanks!

fengxiaoming520 commented 2 years ago

self.device定义在了BaseModel类中,BaseModel类是AdaAttModel的父类。 (self.device is defined in class BaseModel.)

Huage001 commented 2 years ago

self.device定义在了BaseModel类中,BaseModel类是AdaAttModel的父类。 (self.device is defined in class BaseModel.)

Thanks for the explanation! As for the local feature loss, it indeed requires a lot of memory. But you can set a smaller self.max_sample in the init function to reduce the memory usage.

weiyang001 commented 2 years ago

Thanks for your answer!