We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何支持logical_slice_assign op?
例子:
import tempfile import oneflow as flow from oneflow_onnx.oneflow2onnx.util import convert_to_onnx_and_check class logicalSliceAssign(flow.nn.Module): def __init__(self) -> None: super(logicalSliceAssign, self).__init__() def forward(self, x: flow.Tensor) -> flow.Tensor: x[:, 0 : 2] += x return x logical_slice = logicalSliceAssign() class logicalSliceOpGraph(flow.nn.Graph): def __init__(self): super().__init__() self.m = logical_slice def build(self, x): out = self.m(x) return out def test_logical_slice(): logical_slice_graph = logicalSliceOpGraph() logical_slice_graph._compile(flow.randn(1, 2, 1, 1)) print(logical_slice_graph._ops_repr) with tempfile.TemporaryDirectory() as tmpdirname: flow.save(slice.state_dict(), tmpdirname) convert_to_onnx_and_check(logical_slice_graph, flow_weight_dir=tmpdirname, onnx_model_path="/tmp") test_logical_slice()
来源 flowvision rexnet
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如何支持logical_slice_assign op?
例子:
来源 flowvision rexnet
The text was updated successfully, but these errors were encountered: