MCPcopy Create free account
hub / github.com/pytorch/executorch / get_sample_inputs

Function get_sample_inputs

examples/vulkan/export.py:126–136  ·  view source on GitHub ↗
(model_name)

Source from the content-addressed store, hash-verified

124
125
126def get_sample_inputs(model_name):
127 # Lock the random seed for reproducibility
128 torch.manual_seed(42)
129
130 if is_vision_model(model_name):
131 return get_vision_model_sample_input()
132 if model_name == "YOLO_NAS_S":
133 input_batch = get_dog_image_tensor(640)
134 return input_batch
135
136 return None
137
138
139def get_dynamic_shapes(model_name):

Callers 1

mainFunction · 0.85

Calls 3

is_vision_modelFunction · 0.85
get_dog_image_tensorFunction · 0.85

Tested by

no test coverage detected