Download ScaleDF_rebuttal/python_dedup_pkgs/onnx/py_utils.h from VideoUFO/ResearchData_P1: direct link, hf CLI and curl.
- Browser
- Download file 528 Bytes
-
https://huggingface.co/datasets/VideoUFO/ResearchData_P1/resolve/main/ScaleDF_rebuttal/python_dedup_pkgs/onnx/py_utils.h
- Command line
-
hf download hf://datasets/VideoUFO/ResearchData_P1/ScaleDF_rebuttal/python_dedup_pkgs/onnx/py_utils.h
-
curl -L -o py_utils.h https://huggingface.co/datasets/VideoUFO/ResearchData_P1/resolve/main/ScaleDF_rebuttal/python_dedup_pkgs/onnx/py_utils.h
528 Bytes
| // Copyright (c) ONNX Project Contributors | |
| // | |
| // SPDX-License-Identifier: Apache-2.0 | |
| namespace ONNX_NAMESPACE { | |
| namespace nb = nanobind; | |
| template <typename Proto> | |
| bool ParseProtoFromPyBytes(Proto* proto, const nb::bytes& bytes) { | |
| // Get the buffer from Python bytes object | |
| auto buffer = static_cast<const char*>(bytes.data()); | |
| size_t length = bytes.size(); | |
| return ParseProtoFromBytes(proto, buffer, length); | |
| } | |
| } // namespace ONNX_NAMESPACE | |