You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we try to use pretrained model to extract features, such as "python main.py --model ResNet18 --dataset cifar10 --strategy LeastConfidence --pretrained", it returns an error: AttributeError: 'ResNet' object has no attribute 'fe'.
Hi,
The current model definition has not provided support for the pre-trained feature extractor yet. To use a pre-trained feature extractor, one way you could do is to extend the resnet definition with the encode_image function.
When we try to use pretrained model to extract features, such as "python main.py --model ResNet18 --dataset cifar10 --strategy LeastConfidence --pretrained", it returns an error: AttributeError: 'ResNet' object has no attribute 'fe'.
The reason is related to line 303 in https://github.com/cure-lab/deep-active-learning/blob/main/query_strategies/strategy.py:
e1 = self.clf.fe.encode_image(x)
Could I ask how to solve this issue?
The text was updated successfully, but these errors were encountered: