affine_grid的官方链接:
torch.nn.functional.affine_grid — PyTorch 2.5 documentation
[ONNX] Support affine_grid_generator · Issue #30563 · pytorch/pytorch · GitHub
import torch
import torch.nn as nnclass Model(nn.Module):def __init__(self):super(Model, self).__init__()def forward(self, theta, size):return torch.nn.functional.affine_grid(theta, size, align_corners=None)model = Mod