0d39c9dc19388c18362897c83cebbe12a063a752,trixi/logger/file/pytorchplotfilelogger.py,PytorchPlotFileLogger,show_image_grid_heatmap,#PytorchPlotFileLogger#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,262

Before Change


        file_name = os.path.join(self.img_dir, name)

        map_grid = np_make_grid(heatmap, normalize=normalize)
        map_ = np.clip(map_grid * 255, a_min=0, a_max=255)
        map_ = map_.astype(np.uint8)

        map_ = cv2.applyColorMap(map_.transpose(1, 2, 0), colormap=colormap)
        map_ = cv2.cvtColor(map_, cv2.COLOR_BGR2RGB)
        map_ = map_.transpose(2, 0, 1)

        fuse_img = map_

        if background is not None:

After Change


        file_name = os.path.join(self.img_dir, name)

        map_grid = np_make_grid(heatmap, normalize=normalize)  // map_grid.shape is (3, X, Y)
        if heatmap.shape[1] != 3:
            map_ = colormap(map_grid[0])[..., :-1].transpose(2, 0, 1)
        else:  // heatmap was already RGB, so don"t apply colormap
            map_ = map_grid

        if background is not None:
            img_grid = np_make_grid(background, **image_args)
            fuse_img = (1.0 - ratio) * img_grid + ratio * map_
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: MIC-DKFZ/trixi
Commit Name: 0d39c9dc19388c18362897c83cebbe12a063a752
Time: 2019-06-14
Author: jens.petersen@dkfz.de
File Name: trixi/logger/file/pytorchplotfilelogger.py
Class Name: PytorchPlotFileLogger
Method Name: show_image_grid_heatmap


Project Name: MIC-DKFZ/trixi
Commit Name: 0d39c9dc19388c18362897c83cebbe12a063a752
Time: 2019-06-14
Author: jens.petersen@dkfz.de
File Name: trixi/logger/visdom/pytorchvisdomlogger.py
Class Name: PytorchVisdomLogger
Method Name: show_image_grid_heatmap


Project Name: dmlc/gluon-cv
Commit Name: fdd55d36c05c747643fc98430a7f9b787b6cec16
Time: 2019-08-29
Author: yizhu59@gmail.com
File Name: gluoncv/data/kinetics400/classification.py
Class Name: Kinetics400
Method Name: _TSN_RGB