MCPcopy Create free account
hub / github.com/pytorch/examples / get_batch

Function get_batch

regression/main.py:33–38  ·  view source on GitHub ↗

Builds a batch i.e. (x, f(x)) pair.

(batch_size=32)

Source from the content-addressed store, hash-verified

31
32
33def get_batch(batch_size=32):
34 """Builds a batch i.e. (x, f(x)) pair."""
35 random = torch.randn(batch_size)
36 x = make_features(random)
37 y = f(x)
38 return x, y
39
40
41# Define model

Callers 1

main.pyFile · 0.70

Calls 2

make_featuresFunction · 0.85
fFunction · 0.70

Tested by

no test coverage detected