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

Function random_input_generator

tests/performance_test/vgg/exp_config.py:4–10  ·  view source on GitHub ↗
(num, batchsize=32, format='NHWC')

Source from the content-addressed store, hash-verified

2
3
4def random_input_generator(num, batchsize=32, format='NHWC'):
5 input_shape = (batchsize, 224, 224, 3) if format == 'NHWC' else (batchsize, 3, 224, 224)
6 rng = np.random.RandomState(1234)
7 for i in range(num):
8 x = rng.uniform(0.0, 1.0, size=input_shape).astype(np.float32)
9 y = rng.randint(0, 1000, size=(batchsize, ))
10 yield (x, y)
11
12
13MONITOR_INTERVAL = 50

Callers 8

tl2-eager.pyFile · 0.90
keras_test.pyFile · 0.90
tf2-eager.pyFile · 0.90
tf2-autograph.pyFile · 0.90
pytorch_test.pyFile · 0.90
tl2-autograph.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…