(self, activations, unit, level=None, percent_level=None)
return (upsampler(a[None, None,...])[0,0] > level)
Computes a pytorch mask of the (upsampled) activations above a
        specified level.
Computes a pytorch mask of the (upsampled) activations above a
        specified level.
Computes a pytorch mask of the ( upsampled ) activations above a specified level .
def pytorch_mask(self, activations, unit, level=None, percent_level=None):
        '''
        Computes a pytorch mask of the (upsampled) activations above a
        specified level.
        '''
        if unit is None:
            a = activations
        else:
            a = activations[unit]
        if level is None:
            level = self.level_for(activations, unit,
                    percent_level=percent_level)
        upsampler = self.upsampler_for(a)
        return (upsampler(a[None, None,...])[0,0] > level)
def pytorch_mask ( self , activations , unit , level = None , percent_level = None ) : if unit is None : a = activations else : a = activations [ unit ] if level is None : level = self . level_for ( activations , unit , percent_level = percent_level ) upsampler = self . upsampler_for ( a ) return ( upsampler ( a [ None , None , ... ] ) [ 0 , 0 ] > level )