Esempio n. 1
0
        public static ONNX.NamedOnnxValue Clone(this ONNX.NamedOnnxValue src)
        {
            if (src == null)
            {
                return(null);
            }

            if (src.Value == null)
            {
                return(ONNX.NamedOnnxValue.CreateFromTensor <Byte>(src.Name, null));
            }

            ONNX.NamedOnnxValue dst;

            return(src.TryClone(out dst)
                ? dst
                : throw new InvalidOperationException($"Can't clone tensor {src.Value}"));
        }