MCPcopy Create free account
hub / github.com/pytorch/tutorials / model

Function model

unstable_source/vmap_recipe.py:58–60  ·  view source on GitHub ↗
(feature_vec)

Source from the content-addressed store, hash-verified

56# inputs, unless otherwise specified (with the in_dims argument,
57# please see the documentation for more details).
58def model(feature_vec):
59 # Very simple linear model with activation
60 return feature_vec.dot(weights).relu()
61
62examples = torch.randn(batch_size, feature_size)
63result = torch.vmap(model)(examples)

Callers 2

vmap_recipe.pyFile · 0.70
grad_sampleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected