1 Star 0 Fork 0

张辉/SecMML

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.cpp 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
leojiang199611 提交于 2021-07-30 14:23 . ip/port configuration added
#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;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/lvying0019/SecMML.git
git@gitee.com:lvying0019/SecMML.git
lvying0019
SecMML
SecMML
main

搜索帮助