File indexing completed on 2025-04-03 08:57:54
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include <memory>
0012
0013 namespace ONNX_NAMESPACE {
0014 namespace version_conversion {
0015
0016 class GridSample_19_20 final : public Adapter {
0017 public:
0018 explicit GridSample_19_20() : Adapter("GridSample", OpSetID(19), OpSetID(20)) {}
0019
0020 void adapt_gridsample_19_20(std::shared_ptr<Graph>, Node* node) const {
0021 if (node->hasAttribute(kmode) && (node->s(kmode) == "bilinear")) {
0022 node->s_(kmode, "linear");
0023 }
0024 if (node->hasAttribute(kmode) && (node->s(kmode) == "bicubic")) {
0025 node->s_(kmode, "cubic");
0026 }
0027 }
0028
0029 Node* adapt(std::shared_ptr<Graph> graph, Node* node) const override {
0030 adapt_gridsample_19_20(graph, node);
0031 return node;
0032 }
0033 };
0034
0035 }
0036 }