Download modules/dnn/src/tensorflow/tf_io.cpp from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/tgollogly/test/resolve/main/modules/dnn/src/tensorflow/tf_io.cpp
- Command line
-
hf download hf://tgollogly/test/modules/dnn/src/tensorflow/tf_io.cpp
-
curl -L -o tf_io.cpp https://huggingface.co/tgollogly/test/resolve/main/modules/dnn/src/tensorflow/tf_io.cpp
1.97 kB
| // This file is part of OpenCV project. | |
| // It is subject to the license terms in the LICENSE file found in the top-level directory | |
| // of this distribution and at http://opencv.org/license.html. | |
| // Copyright (C) 2016, Intel Corporation, all rights reserved. | |
| // Third party copyrights are property of their respective owners. | |
| /* | |
| Implementation of various functions which are related to Tensorflow models reading. | |
| */ | |
| namespace cv { | |
| namespace dnn { | |
| using std::string; | |
| using std::map; | |
| using namespace tensorflow; | |
| using namespace ::google::protobuf; | |
| using namespace ::google::protobuf::io; | |
| void ReadTFNetParamsFromBinaryFileOrDie(const char* param_file, | |
| tensorflow::GraphDef* param) { | |
| CHECK(ReadProtoFromBinaryFile(param_file, param)) | |
| << "Failed to parse GraphDef file: " << param_file; | |
| } | |
| void ReadTFNetParamsFromBinaryBufferOrDie(const char* data, size_t len, | |
| tensorflow::GraphDef* param) { | |
| CHECK(ReadProtoFromBinaryBuffer(data, len, param)) | |
| << "Failed to parse GraphDef buffer"; | |
| } | |
| void ReadTFNetParamsFromTextFileOrDie(const char* param_file, | |
| tensorflow::GraphDef* param) { | |
| CHECK(ReadProtoFromTextFile(param_file, param)) | |
| << "Failed to parse GraphDef file: " << param_file; | |
| } | |
| void ReadTFNetParamsFromTextBufferOrDie(const char* data, size_t len, | |
| tensorflow::GraphDef* param) { | |
| CHECK(ReadProtoFromTextBuffer(data, len, param)) | |
| << "Failed to parse GraphDef buffer"; | |
| } | |
| } | |
| } | |