MCPcopy Index your code
hub / github.com/pytorch/tutorials / generate_data

Function generate_data

intermediate_source/torch_compile_full_example.py:80–84  ·  view source on GitHub ↗
(b)

Source from the content-addressed store, hash-verified

78# Generates random input and targets data for the model, where `b` is
79# batch size.
80def generate_data(b):
81 return (
82 torch.randn(b, 3, 128, 128).cuda(),
83 torch.randint(1000, (b,)).cuda(),
84 )
85
86
87N_ITERS = 10

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected