0

I am trying to load a pre-trained ResNet model from the MadryLab CIFAR-10 challenge into CleverHans to compute transfer attacks.

However restoring the saved models into the model_zoo.madry_lab_challenges.cifar10_model.ResNet object does not work. It appears to restore fine initially, but when I try to actually use the model, I get an error such as:

Attempting to use uninitialized value ResNet/unit_3_1/residual_only_activation/BatchNorm/moving_mean

The easiest way to reproduce this error is to actually just run the provided attack_model.py example included in CleverHans here:

https://github.com/tensorflow/cleverhans/blob/master/examples/madry_lab_challenges/cifar10/attack_model.py

It encounters the same error after loading the model when it tries to use it, on both adv_trained and naturally_trained models.

Is there a workaround to this problem?

It seems the other option is to use the cleverhans.model.CallableModelWrapper instead, but I haven't been able to find an example of how to use that.

Dvyn Resh
  • 980
  • 1
  • 6
  • 14
quarkral
  • 1
  • 1

0 Answers0