MCPcopy Create free account
hub / github.com/TPCD/DCCL / img_grid

Method img_grid

project_utils/visualization_utils.py:988–996  ·  view source on GitHub ↗

Turning a batch of images to a grid e.g. input shape: (36, 64, 64) Will be a grid of 6x6, each grid is an image size 64x64

(self, name, input_3d)

Source from the content-addressed store, hash-verified

986 self.img_grid(k, v)
987
988 def img_grid(self, name, input_3d):
989 """
990 Turning a batch of images to a grid
991 e.g. input shape: (36, 64, 64)
992 Will be a grid of 6x6, each grid is
993 an image size 64x64
994 """
995 self.img('key', tv.utils.make_grid(
996 input_3d.cpu().unsqueeze(1), pad_value=self.pad_value, nrow=self.nrow))
997
998
999

Callers 1

img_grid_manyMethod · 0.95

Calls 1

imgMethod · 0.95

Tested by

no test coverage detected