EnableMemoryPattern

OnnxRuntimeSessionOptions.EnableMemoryPattern property

启用或禁用对输入张量的内存模式优化。启用后,ONNX Runtime 会缓存内存分配模式以加快执行,但可能会增加动态输入形状的内存使用。若输入差异显著或希望降低内存占用,请禁用。

public static bool EnableMemoryPattern { get; set; }

另请参见