Rate this Page
★★★★★
torch.operator#
unsupported_operator#
Original source code:
# mypy: allow-untyped-defsimporttorchfromtorch._export.db.caseimportSupportLevelclassTorchSymMin(torch.nn.Module):""" torch.sym_min operator is not supported in export. """defforward(self,x):returnx.sum()+torch.sym_min(x.size(0),100)example_args=(torch.randn(3,2),)tags={"torch.operator"}support_level=SupportLevel.NOT_SUPPORTED_YETmodel=TorchSymMin()torch.export.export(model,example_args)
Result:
Unsupported:torch.*opreturnednon-Tensor
On this page