Created
December 10, 2021 21:07
-
-
Save dneprDroid/ad0cce8f61febd5a7a3bb5f5fcdc7e9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@register_torch_op(torch_alias=["grid_sampler"], override=True) | |
def torch_grid_sample(context, node): | |
inputs = mil_get_inputs(context, node, expected=5) | |
res = mb.grid_sample( | |
input=inputs[0], | |
grid=inputs[1], | |
mode=inputs[2], | |
padding_mode=inputs[3], | |
align_corners=inputs[4], | |
name=node.name | |
) | |
context.add(res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment