最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

永續(xù)合約及合約交易系統(tǒng)開(kāi)發(fā)需求項(xiàng)目丨永續(xù)合約/合約交易所源碼程序

2023-07-17 17:26 作者:搭建v_deitly123  | 我要投稿

 web3.js是一個(gè)JavaScript API庫(kù)。要讓DApp在以太坊上運(yùn)行,我們可以使用web3.js庫(kù)提供的web3對(duì)象。web3.js通過(guò)RPC調(diào)用與本地節(jié)點(diǎn)通信,它可以與任何公開(kāi)RPC層的以太坊節(jié)點(diǎn)一起使用。web3包含eth對(duì)象-web3.eth(用于與以太坊區(qū)塊鏈交互)和shh對(duì)象-web3.shh(用于與Whisper交互)


class PFLD::Impl {

public:

? ? Impl() {

? ? ? ? device_ = 0;

? ? ? ? precision_ = 0;

? ? ? ? power_ = 0;

? ? ? ? memory_ = 0;

? ? ? ??

? ? ? ? initialized_ = false;

? ? }

? ? ~Impl() {

? ? ? ? landmarker_->releaseModel();

? ? ? ? landmarker_->releaseSession(session_);

? ? }

?

? ? int LoadModel(const char* root_path);

? ? int ExtractKeypoints(const cv::Mat& img_face, std::vector<cv::Point2f>* keypoints);? ??

?

? ? std::shared_ptr<MNN::Interpreter> landmarker_;

? ? const int inputSize_ = 96;

? ??

? ? int device_;

? ? int precision_;

? ? int power_;

? ? int memory_;

?

? ? MNN::Session* session_ = nullptr;

? ? MNN::Tensor* input_tensor_ = nullptr;

? ? bool initialized_;

};

int PFLD::Impl::LoadModel(const char* root_path) {

? ? std::string model_file = std::string(root_path) + "/pfld-lite.mnn";

? ? landmarker_ = std::shared_ptr<MNN::Interpreter>(MNN::Interpreter::createFromFile(model_file.c_str()));

? ??

? ? MNN::ScheduleConfig config;

? ? config.numThread = 1;

? ? config.type? ? ? = static_cast<MNNForwardType>(device_);

?

? ? MNN::BackendConfig backendConfig;

? ? backendConfig.precision = (MNN::BackendConfig::PrecisionMode)precision_;

? ? backendConfig.power = (MNN::BackendConfig::PowerMode) power_;

? ? backendConfig.memory = (MNN::BackendConfig::MemoryMode) memory_;

? ? config.backendConfig = &backendConfig;

? ? session_ = landmarker_->createSession(config);

?

? ? // nhwc to nchw

? ? std::vector<int> dims{1, inputSize_, inputSize_, 3};

? ? input_tensor_ = MNN::Tensor::create<float>(dims, NULL, MNN::Tensor::TENSORFLOW);

?

? ? initialized_ = true;

?

? ? return 0;

}


永續(xù)合約及合約交易系統(tǒng)開(kāi)發(fā)需求項(xiàng)目丨永續(xù)合約/合約交易所源碼程序的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
彰化县| 融水| 宁阳县| 五大连池市| 南皮县| 神池县| 新田县| 肇东市| 阜城县| 毕节市| 临泽县| 光山县| 丰城市| 开化县| 张家口市| 大同县| 潮州市| 盐津县| 招远市| 庆城县| 文登市| 清徐县| 瑞安市| 新昌县| 乌兰察布市| 兴宁市| 南华县| 满洲里市| 东安县| 巴彦县| 济阳县| 达拉特旗| 深州市| 留坝县| 乐亭县| 高雄县| 浦江县| 曲靖市| 习水县| 丹东市| 河源市|