提交 017f5ed4 编写于 作者: W willzhang4a58

proto 2to3

上级 1274acf4
syntax = "proto2";
syntax = "proto3";
package oneflow;
import "layer/layer_conf.proto";
message DLNetConf {
required string name = 1;
string name = 1;
repeated LayerConf layer_conf = 100;
}
syntax = "proto2";
syntax = "proto3";
package oneflow;
import "job/dlnet_conf.proto";
......@@ -6,14 +6,14 @@ import "job/resource.proto";
import "job/strategy.proto";
message JobUserConf {
required string train_dlnet_conf_filepath = 1;
required string resource_filepath = 2;
required string strategy_filepath = 3;
string train_dlnet_conf_filepath = 1;
string resource_filepath = 2;
string strategy_filepath = 3;
}
message JobSysConf {
required JobUserConf user_conf = 1;
required DLNetConf train_dlnet_conf = 2;
required Resource resource = 3;
required Strategy strategy = 4;
JobUserConf user_conf = 1;
DLNetConf train_dlnet_conf = 2;
Resource resource = 3;
Strategy strategy = 4;
}
syntax = "proto2";
syntax = "proto3";
package oneflow;
message Machine {
required string addr = 1; // domain name or ip
required string port = 2;
string addr = 1; // domain name or ip
string port = 2;
repeated int32 device_vec = 3;
}
......
syntax = "proto2";
syntax = "proto3";
package oneflow;
message Section {
required int32 first_id = 1;
required int32 last_id = 2;
int32 first_id = 1;
int32 last_id = 2;
}
message DeviceGroup {
......@@ -19,7 +19,7 @@ message ParallelConf {
DataParallel = 0;
ModelParallel = 1;
}
required Policy policy = 1;
Policy policy = 1;
oneof device_or_machine {
DeviceGroup device_group = 2;
MachineGroup machine_group = 3;
......@@ -27,9 +27,9 @@ message ParallelConf {
}
message PlacementGroup {
required string name = 1;
string name = 1;
repeated string layer_name_vec = 2;
optional ParallelConf parallel_conf = 3;
ParallelConf parallel_conf = 3;
}
message Strategy {
......
syntax = "proto2";
syntax = "proto3";
package oneflow;
message ConstantModelParamInitializerConf {
required float const_val = 1;
float const_val = 1;
}
message UniformModelParamInitializerConf {
required float min = 1;
required float max = 2;
float min = 1;
float max = 2;
}
message GaussianModelParamInitializerConf {
required float mean = 1;
required float std = 2;
float mean = 1;
float std = 2;
// The expected number of non-zero output weights for a given input
// the default -1 means don't perform sparsification
optional int32 sparse = 3 [default = -1];
// set -1 means don't perform sparsification
int32 sparse = 3;
}
message ModelParamInitializerConf {
......@@ -27,12 +27,12 @@ message ModelParamInitializerConf {
}
message SplitLayerConf {
required string in = 1;
string in = 1;
repeated string out = 2;
}
message LayerConf {
required string name = 1;
string name = 1;
oneof conf_for_specified_layer {
// TODO: add other layers
SplitLayerConf split_layer_conf = 101;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册