MCPcopy Create free account
hub / github.com/ModalityDance/Omni-R1 / meshgrid

Function meshgrid

src/transformers/src/transformers/pytorch_utils.py:269–277  ·  view source on GitHub ↗

Wrapper around torch.meshgrid to avoid warning messages about the introduced `indexing` argument. Reference: https://pytorch.org/docs/1.13/generated/torch.meshgrid.html

(
    *tensors: Union[torch.Tensor, List[torch.Tensor]], indexing: Optional[str] = None
)

Source from the content-addressed store, hash-verified

267
268
269def meshgrid(
270 *tensors: Union[torch.Tensor, List[torch.Tensor]], indexing: Optional[str] = None
271) -> Tuple[torch.Tensor, ...]:
272 """
273 Wrapper around torch.meshgrid to avoid warning messages about the introduced `indexing` argument.
274
275 Reference: https://pytorch.org/docs/1.13/generated/torch.meshgrid.html
276 """
277 return torch.meshgrid(*tensors, indexing=indexing)
278
279
280def id_tensor_storage(tensor: torch.Tensor) -> Tuple[torch.device, int, int]:

Callers 14

__init__Method · 0.85
build_linear_positionsFunction · 0.85
__init__Method · 0.85
visual_embedMethod · 0.85
__init__Method · 0.85
get_reference_pointsMethod · 0.85
__init__Method · 0.85
__init__Method · 0.85
get_reference_pointsMethod · 0.85
get_reference_pointsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected