PHP/JAVA原生交易所系統(tǒng)開發(fā)案例項(xiàng)目丨交易所系統(tǒng)開發(fā)(多版本)丨交易所源碼海外版
狹義來(lái)講,區(qū)塊鏈?zhǔn)且环N按照時(shí)間順序?qū)?shù)據(jù)區(qū)塊(什么是區(qū)塊)以順序相連的方式組合成的一種鏈?zhǔn)綌?shù)據(jù)結(jié)構(gòu),并以密碼學(xué)方式保證的不可篡改和不可偽造的分布式賬本.
廣義來(lái)講,區(qū)塊鏈技術(shù)是利用塊鏈?zhǔn)綌?shù)據(jù)結(jié)構(gòu)來(lái)驗(yàn)證與存儲(chǔ)數(shù)據(jù)、利用分布式節(jié)點(diǎn)共識(shí)算法來(lái)生成和更新數(shù)據(jù)、利用密碼學(xué)的方式保證數(shù)據(jù)傳輸和訪問的安全、利用由自動(dòng)化腳本代碼組成的智能合約來(lái)編程和操作數(shù)據(jù)的一種全新的分布式基礎(chǔ)架構(gòu)與計(jì)算范式.
區(qū)塊鏈技術(shù)是構(gòu)建價(jià)值互聯(lián)網(wǎng)不可或缺的底層應(yīng)用技術(shù),是具備多級(jí)層和多類型應(yīng)用的價(jià)值傳輸技術(shù)集合。它的本質(zhì)是一種分布式數(shù)據(jù)庫(kù)(注意:區(qū)塊鏈與分布式數(shù)據(jù)庫(kù)的差別),或者說(shuō)是一個(gè)可共享且不易更改的分布式分類總賬
void Calibration::_initMNNSession(const uint8_t* modelBuffer, const int bufferSize, const int channels) {
? ? _interpreter.reset(MNN::Interpreter::createFromBuffer(modelBuffer, bufferSize));
? ? MNN::ScheduleConfig config;
? ? _session? ? ?= _interpreter->createSession(config);
? ? _inputTensor = _interpreter->getSessionInput(_session, NULL);
? ? _inputTensorDims.resize(4);
? ? auto inputTensorDataFormat = MNN::TensorUtils::getDescribe(_inputTensor)->dimensionFormat;
? ? DCHECK(4 == _inputTensor->dimensions()) << "Only support 4 dimensions input";
? ? if (inputTensorDataFormat == MNN::MNN_DATA_FORMAT_NHWC) {
? ? ? ? _inputTensorDims[0] = 1;
? ? ? ? _inputTensorDims[1] = _height;
? ? ? ? _inputTensorDims[2] = _width;
? ? ? ? _inputTensorDims[3] = channels;
? ? } else if (inputTensorDataFormat == MNN::MNN_DATA_FORMAT_NC4HW4) {
? ? ? ? _inputTensorDims[0] = 1;
? ? ? ? _inputTensorDims[1] = channels;
? ? ? ? _inputTensorDims[2] = _height;
? ? ? ? _inputTensorDims[3] = _width;
? ? } else {
? ? ? ? DLOG(ERROR) << "Input Data Format ERROR!";
? ? }
? ? if (_featureQuantizeMethod == "KL") {
? ? ? ? _interpreter->resizeTensor(_inputTensor, _inputTensorDims);
? ? ? ? _interpreter->resizeSession(_session);
? ? } else if (_featureQuantizeMethod == "ADMM") {
? ? ? ? DCHECK((_imageNum * 4 * _height * _width) < (INT_MAX / 4)) << "Use Little Number of Images When Use ADMM";
? ? ? ? _inputTensorDims[0] = _imageNum;
? ? ? ? _interpreter->resizeTensor(_inputTensor, _inputTensorDims);
? ? ? ? _interpreter->resizeSession(_session);
? ? }
? ? _interpreter->releaseModel();
}