I have a problem when I change βmodel'" in configs_gan_free.yml from ResNet18 to MobileNet.
It says:
Traceback (most recent call last):
File "rec_mult.py", line 90, in
model, model_seed = inversefed.construct_model(config['model'], num_classes=nclass_dict[config['dataset']], num_channels=3, seed=set_seed)
File "GIFD_new/GIFD_Gradient_Inversion_Attack/inversefed/nn/models.py", line 138, in construct_model
model.features[0] = torchvision.models.mobilenet.ConvBNReLU(num_channels, 32, stride=1) # this is fixed to width=1
AttributeError: module 'torchvision.models.mobilenet' has no attribute 'ConvBNReLU'
Then I modified line 138 in GIFD_new/GIFD_Gradient_Inversion_Attack/inversefed/nn/models.py to :
model.features[0] = torchvision.models.mobilenetv2.Conv2dNormActivation(num_channels, 32, stride=1) # this is fixed to width=1
It works. But the results are not very good, only blank images are reconstructed.
Then, my problem is, does GIFD supports MobileNetV2?