MCPcopy Create free account
hub / github.com/Trustworthy-AI-Group/TransferAttack / PreprocessingModel

Class PreprocessingModel

transferattack/utils.py:72–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71
72class PreprocessingModel(nn.Module):
73 def __init__(self, resize, mean, std):
74 super(PreprocessingModel, self).__init__()
75 self.resize = transforms.Resize(resize)
76 self.normalize = transforms.Normalize(mean, std)
77
78 def forward(self, x):
79 return self.normalize(self.resize(x))
80
81
82class EnsembleModel(torch.nn.Module):

Callers 2

wrap_modelFunction · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected