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

Method execute

runtime/__init__.py:138–147  ·  view source on GitHub ↗

Executes the method with the given inputs. Args: inputs: A sequence of input values, typically torch.Tensor objects. Returns: A list of output values, typically torch.Tensor objects.

(self, inputs: Sequence[Any])

Source from the content-addressed store, hash-verified

136 self._method = method
137
138 def execute(self, inputs: Sequence[Any]) -> Sequence[Any]:
139 """Executes the method with the given inputs.
140
141 Args:
142 inputs: A sequence of input values, typically torch.Tensor objects.
143
144 Returns:
145 A list of output values, typically torch.Tensor objects.
146 """
147 return self._method(inputs)
148
149 @property
150 def metadata(self) -> MethodMeta:

Calls

no outgoing calls