taoyang1122 / adapt-image-models

[ICLR'23] AIM: Adapting Image Models for Efficient Video Action Recognition
Apache License 2.0
276 stars 21 forks source link

How can we freeze the layer? #14

Closed VoyageWang closed 1 year ago

VoyageWang commented 1 year ago

Hi, I want to know how can we freeze the layer and let them not update parameters? I have a such question after I read your paper.

taoyang1122 commented 1 year ago

Hi @VoyageWang , you can set param.requires_grad=False. Please refer to https://github.com/taoyang1122/adapt-image-models/blob/main/tools/train.py#L187

VoyageWang commented 1 year ago

你好,你的邮件已经被我接受。hello,your email has been recieved. Thank you.