代码拉取完成,页面将自动刷新
#include <iostream>
#include "util/SocketManager.h"
#include "core/Player.h"
#include "util/IOManager.h"
#include "machine_learning/BPGraph.h"
#include "machine_learning/LSTMGraph.h"
int node_type;
SocketManager::SMMLF tel;
string ips[]={"127.0.0.1","127.0.0.1","127.0.0.1"};
int ports[]={1234,1235,1236};
int globalRound;
int main(int argc, char** argv) {
srand(time(NULL)); // random seed
DBGtest=0;
if (argc < 2) {
DBGprint("Please enter party index:\n");
scanf("%d", &node_type);
}
else {
node_type = argv[1][0] - '0';
}
DBGprint("party index: %d\n", node_type);
Player::init();
IOManager::init();
tel.init(ips,ports);
/** LSTM **/
// LSTMGraph::LSTM *lstm = new LSTMGraph::LSTM(&IOManager::train_data, &IOManager::train_label, &IOManager::test_data, &IOManager::test_label);
// DBGprint("LSTM constructing ...\n");
// lstm->graph();
// DBGprint("LSTM constructed ...\n");
// lstm->train();
/** NN, Linear Regression, Logistic Regression **/
BPGraph::LR *bp = new BPGraph::LR(&IOManager::train_data, &IOManager::train_label, &IOManager::test_data, &IOManager::test_label);
/** Three-layer Model **/
// bp->graph();
/** Logisitc Regression Model **/
// bp->logistic_graph();
/** Linear Regression Model **/
bp->linear_graph();
bp->train();
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。