PyTorch Forums
How do you create a layer that behaves differently during training and evaluation like dropout?
shane-carroll
(Shane Carroll)
March 1, 2019, 7:07pm
2
Do you mean like
def forward(self, x): ... if self.training: x = training_only_layer(x) ...
3 Likes
Inject dropout into resnet (or any other network)
show post in topic