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
I think it would be cleaner if the normalization step were baked into the underlying model rather than being performed by the AttackerModel. Conceptually, the act of normalizing inputs is not related to the AttackerModel. Combining them causes problems. For instance, I'm trying to wrap AttackerModel around a network that already does normalization. My proposed change is to make the dataset optional in the initialization of an AttackerModel:
def __init__(self, model, dataset=None):
super(AttackerModel, self).__init__()
if dataset is None:
# we can skip the normalize step if we want
self.normalizer = ch.nn.Identity()
else:
self.normalizer = helpers.InputNormalize(dataset.mean, dataset.std)
self.model = model
self.attacker = Attacker(model, dataset)
The text was updated successfully, but these errors were encountered:
I think it would be cleaner if the normalization step were baked into the underlying model rather than being performed by the
AttackerModel
. Conceptually, the act of normalizing inputs is not related to theAttackerModel
. Combining them causes problems. For instance, I'm trying to wrapAttackerModel
around a network that already does normalization. My proposed change is to make thedataset
optional in the initialization of anAttackerModel
:The text was updated successfully, but these errors were encountered: