我已按照此示例将输入和输出绑定到 ONNX 模型。
// I can bind this shape fine since it has all known components:
std::vector<int64_t> shape({ 1, 1000, 1, 1 });
binding.Bind(L"softmaxout_1", TensorFloat::Create(shape));
但是我自己的模型有一个包含未知组件的输入:
// This is the type shows in Netron: float32[unk__518,224,224,3], I tried:
std::vector<int64_t> shape({ "unk__518", 224, 224, 3 }); // Note: this doesn't compile since the first component is a string!
binding.Bind(L"Image:0", TensorFloat::Create(shape));
如何为这样的形状创建 TensorFloat 并绑定它?