Esempio n. 1
0
 def remove_maxpools(self, domain):
     from plnn.model import reluify_maxpool, simplify_network
     if any(map(lambda x: type(x) is nn.MaxPool1d, self.layers)):
         new_layers = simplify_network(reluify_maxpool(self.layers, domain))
         self.layers = new_layers
Esempio n. 2
0
 def remove_maxpools(self, domain, no_opt=False):
     if any(map(lambda x: type(x) is nn.MaxPool1d, self.layers)):
         new_layers = simplify_network(
             reluify_maxpool(self.layers, domain, no_opt))
         self.layers = new_layers