I am writting a custom version of dropblock and want to switch it off in evaluation mode by calling model.eval(), however I have no clue how to go about this. I tried looking at functional dropout but it is not defined there. How can this be done?
bluesky314 (Rahul Deora) #1
You could use the
self.training flag in your custom module to switch between the different behaviors:
- apply your mask and scale the activations if
- disable the mask and just forward the activations if
self.training == False
Let me know, if that works for you.