MCPcopy Create free account
hub / github.com/apache/singa / load

Function load

examples/singa_peft/examples/data/mnist.py:85–92  ·  view source on GitHub ↗
(dir_path='/tmp/mnist')

Source from the content-addressed store, hash-verified

83
84
85def load(dir_path='/tmp/mnist'):
86 train_x, train_y, val_x, val_y = load_dataset(dir_path)
87 train_x, val_x = normalize(train_x, val_x)
88 train_x = train_x.astype(np.float32)
89 val_x = val_x.astype(np.float32)
90 train_y = train_y.astype(np.int32)
91 val_y = val_y.astype(np.int32)
92 return train_x, train_y, val_x, val_y

Callers

nothing calls this directly

Calls 2

load_datasetFunction · 0.70
normalizeFunction · 0.70

Tested by

no test coverage detected