(self, size, image_size=None, data_size=None,
            renormalizer=None, scale_offset=None, level=None, actrange=None,
            source=None, convolutions=None, quantiles=None,
            percent_level=None)
An ImageVisualizer produces visualizations of unit activations
        as heatmaps or overlays on top of the original image.  The output
        visualization size is given by `size`.  This may be scaled
        from the original image size `image_size` (inferred from source
        if not specified) and activation `data_size` (inferred from
        convolutions if not specified).  Imagedata is renormalized as
        rendered RGB using renormalizer (inferred from source if not
        specified) and upsampling can be offset using scale_offset
        (inferred from convolutions if not specified).  Per-unit
        `quantiles` can be provided for computing heatmap ranges
        (default to 1% to 99% quantiles), and threshold levels
        (default to `percent_level`=0.95).
An ImageVisualizer produces visualizations of unit activations
        as heatmaps or overlays on top of the original image.  The output
        visualization size is given by `size`.  This may be scaled
        from the original image size `image_size` (inferred from source
        if not specified) and activation `data_size` (inferred from
        convolutions if not specified).  Imagedata is renormalized as
        rendered RGB using renormalizer (inferred from source if not
        specified) and upsampling can be offset using scale_offset
        (inferred from convolutions if not specified).  Per-unit
        `quantiles` can be provided for computing heatmap ranges
        (default to 1% to 99% quantiles), and threshold levels
        (default to `percent_level`=0.95).
An ImageVisualizer produces visualizations of unit activations as heatmaps or overlays on top of the original image . The output visualization size is given by size . This may be scaled from the original image size image_size ( inferred from source if not specified ) and activation data_size ( inferred from convolutions if not specified ) . Imagedata is renormalized as rendered RGB using renormalizer ( inferred from source if not specified ) and upsampling can be offset using scale_offset ( inferred from convolutions if not specified ) . Per - unit quantiles can be provided for computing heatmap ranges ( default to 1% to 99% quantiles ) and threshold levels ( default to percent_level = 0 . 95 ) .
def __init__(self, size, image_size=None, data_size=None,
            renormalizer=None, scale_offset=None, level=None, actrange=None,
            source=None, convolutions=None, quantiles=None,
            percent_level=None):
        '''
        An ImageVisualizer produces visualizations of unit activations
        as heatmaps or overlays on top of the original image.  The output
        visualization size is given by `size`.  This may be scaled
        from the original image size `image_size` (inferred from source
        if not specified) and activation `data_size` (inferred from
        convolutions if not specified).  Imagedata is renormalized as
        rendered RGB using renormalizer (inferred from source if not
        specified) and upsampling can be offset using scale_offset
        (inferred from convolutions if not specified).  Per-unit
        `quantiles` can be provided for computing heatmap ranges
        (default to 1% to 99% quantiles), and threshold levels
        (default to `percent_level`=0.95).
        '''
        if image_size is None and source is not None:
            image_size = upsample.image_size_from_source(source)
        if renormalizer is None and source is not None:
            renormalizer = renormalize.renormalizer(source=source, mode='byte')
        if scale_offset is None and convolutions is not None:
            scale_offset = upsample.sequence_scale_offset(convolutions)
        if data_size is None and convolutions is not None:
            data_size = upsample.sequence_data_size(convolutions, image_size)
        if level is None and quantiles is not None:
            level = quantiles.quantiles([percent_level or 0.95])[:,0]
        if actrange is None and quantiles is not None:
            actrange = quantiles.quantiles([0.01, 0.99])
        if isinstance(size, int):
            size = (size, size)
        self.size = size
        self.image_size = image_size
        self.data_size = data_size
        self.renormalizer = renormalizer
        self.scale_offset = scale_offset
        self.percent_level = percent_level
        self.level = level
        self.actrange = actrange
        self.quantiles = quantiles
        self.upsampler = None
        if self.data_size is not None:
            self.upsampler = upsample.upsampler(size, data_size,
                    image_size=self.image_size,
                    scale_offset=scale_offset)
def __init__ ( self , size , image_size = None , data_size = None , renormalizer = None , scale_offset = None , level = None , actrange = None , source = None , convolutions = None , quantiles = None , percent_level = None ) : if image_size is None and source is not None : image_size = upsample . image_size_from_source ( source ) if renormalizer is None and source is not None : renormalizer = renormalize . renormalizer ( source = source , mode = 'byte' ) if scale_offset is None and convolutions is not None : scale_offset = upsample . sequence_scale_offset ( convolutions ) if data_size is None and convolutions is not None : data_size = upsample . sequence_data_size ( convolutions , image_size ) if level is None and quantiles is not None : level = quantiles . quantiles ( [ percent_level or 0.95 ] ) [ : , 0 ] if actrange is None and quantiles is not None : actrange = quantiles . quantiles ( [ 0.01 , 0.99 ] ) if isinstance ( size , int ) : size = ( size , size ) self . size = size self . image_size = image_size self . data_size = data_size self . renormalizer = renormalizer self . scale_offset = scale_offset self . percent_level = percent_level self . level = level self . actrange = actrange self . quantiles = quantiles self . upsampler = None if self . data_size is not None : self . upsampler = upsample . upsampler ( size , data_size , image_size = self . image_size , scale_offset = scale_offset )