"pretrain_gpt.py" did not exist on "2ede8235ef38d7648974f4f3efc74c3f3e3ce9df"
CommonUtils.h 575 Bytes
Newer Older
lijian6's avatar
lijian6 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef __COMMON_UTILS_H__
#define __COMMON_UTILS_H__

#include <opencv2/core.hpp>
#include <onnxruntime/core/session/onnxruntime_cxx_api.h>
#include <numeric>
#include <sys/stat.h>

std::vector<float> substractMeanNormalize(cv::Mat &src, const float *meanVals, const float *normVals);

std::vector<Ort::AllocatedStringPtr> getInputNames(Ort::Session *session);

std::vector<int64_t> getInputDim(Ort::Session *session);

std::vector<Ort::AllocatedStringPtr> getOutputNames(Ort::Session *session);

std::string getSrcImgFilePath(const char *path, const char *imgName);
#endif