MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / if_2d_to_3d

Function if_2d_to_3d

tensorlayer/files/utils.py:1252–1257  ·  view source on GitHub ↗
(images)

Source from the content-addressed store, hash-verified

1250 im_test_B = load_image_from_folder(os.path.join(path, filename, "testB"))
1251
1252 def if_2d_to_3d(images): # [h, w] --> [h, w, 3]
1253 for i, _v in enumerate(images):
1254 if len(images[i].shape) == 2:
1255 images[i] = images[i][:, :, np.newaxis]
1256 images[i] = np.tile(images[i], (1, 1, 3))
1257 return images
1258
1259 im_train_A = if_2d_to_3d(im_train_A)
1260 im_train_B = if_2d_to_3d(im_train_B)

Callers 1

load_cyclegan_datasetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…