EXPECT_EQ(layer->getType(), "concat");
EXPECT_NO_THROW(layer = ml::train::layer::MultiOut());
- EXPECT_EQ(layer->getType(), "output");
+ EXPECT_EQ(layer->getType(), "multiout");
#ifdef ENABLE_NNSTREAMER_BACKBONE
EXPECT_NO_THROW(layer = ml::train::layer::BackboneNNStreamer());
std::shared_ptr<ml::train::Layer> layer;
EXPECT_NO_THROW(layer = ml::train::loss::MSE());
- EXPECT_EQ(layer->getType(), "loss");
+ EXPECT_EQ(layer->getType(), "mse");
- EXPECT_NO_THROW(layer = ml::train::loss::CrossEntropy());
- EXPECT_EQ(layer->getType(), "loss");
+ EXPECT_NO_THROW(layer = ml::train::loss::CrossEntropySigmoid());
+ EXPECT_EQ(layer->getType(), "cross_sigmoid");
+
+ EXPECT_NO_THROW(layer = ml::train::loss::CrossEntropySoftmax());
+ EXPECT_EQ(layer->getType(), "cross_softmax");
}
/**
static nntrainer::IniSection inputlayer("inputlayer",
"Type = input"
"| Input_Shape = 1:1:62720"
- "| bias_initializer = zeros"
"| Normalization = true"
"| Activation = sigmoid");
EXPECT_NO_THROW(model =
ml::train::createModel(ml::train::ModelType::NEURAL_NET));
- EXPECT_NO_THROW(layer = ml::train::layer::Input({"input_shape=1:1:62720",
- "normalization=true",
- "bias_initializer=zeros"}));
+ EXPECT_NO_THROW(layer = ml::train::layer::Input(
+ {"input_shape=1:1:62720", "normalization=true"}));
EXPECT_NO_THROW(model->addLayer(layer));
EXPECT_NO_THROW(
EXPECT_NO_THROW(model =
ml::train::createModel(ml::train::ModelType::NEURAL_NET));
- EXPECT_NO_THROW(layer = ml::train::layer::Input({"input_shape=1:1:62720",
- "normalization=true",
- "bias_initializer=zeros"}));
+ EXPECT_NO_THROW(layer = ml::train::layer::Input(
+ {"input_shape=1:1:62720", "normalization=true"}));
EXPECT_NO_THROW(model->addLayer(layer));
EXPECT_NO_THROW(
EXPECT_NO_THROW(model =
ml::train::createModel(ml::train::ModelType::NEURAL_NET));
- EXPECT_NO_THROW(layer = ml::train::layer::Input({"input_shape=1:1:62720",
- "normalization=true",
- "bias_initializer=zeros"}));
+ EXPECT_NO_THROW(layer = ml::train::layer::Input(
+ {"input_shape=1:1:62720", "normalization=true"}));
EXPECT_NO_THROW(model->addLayer(layer));
EXPECT_NO_THROW(
static nntrainer::IniSection inputlayer("inputlayer",
"Type = input"
"| Input_Shape = 1:1:62720"
- "| bias_initializer = zeros"
"| Normalization = true"
"| Activation = sigmoid");
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_layer_set_property(layers[0], "input_shape=1:1:62720",
- "normalization=true",
- "bias_initializer=zeros", NULL);
+ "normalization=true", NULL);
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_model_add_layer(model, layers[0]);
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_layer_set_property(layers[0], "input_shape=1:1:62720",
- "normalization=true",
- "bias_initializer=zeros", NULL);
+ "normalization=true", NULL);
EXPECT_EQ(status, ML_ERROR_NONE);
/** Find layer before adding */
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_layer_set_property(layers[0], "input_shape=1:1:62720",
- "normalization=true",
- "bias_initializer=zeros", NULL);
+ "normalization=true", NULL);
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_model_add_layer(model, layers[0]);
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_layer_set_property(layers[0], "input_shape=1:1:62720",
- "normalization=true",
- "bias_initializer=zeros", NULL);
+ "normalization=true", NULL);
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_model_add_layer(model, layers[0]);
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_layer_set_property(layers[0], "input_shape=1:1:62720",
- "normalization=true",
- "bias_initializer=zeros", NULL);
+ "normalization=true", NULL);
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_model_add_layer(model, layers[0]);
status = ml_train_layer_create(&layers[0], ML_TRAIN_LAYER_TYPE_INPUT);
EXPECT_EQ(status, ML_ERROR_NONE);
- status = ml_train_layer_set_property(
- layers[0], "input_shape=1:1:62720", "normalization=true",
- "bias_initializer=zeros", "name=inputlayer", NULL);
+ status =
+ ml_train_layer_set_property(layers[0], "input_shape=1:1:62720",
+ "normalization=true", "name=inputlayer", NULL);
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_model_add_layer(model, layers[0]);
status = ml_train_layer_create(&layers[0], ML_TRAIN_LAYER_TYPE_INPUT);
EXPECT_EQ(status, ML_ERROR_NONE);
- status = ml_train_layer_set_property(
- layers[0], "input_shape=1:1:62720", "normalization=true",
- "bias_initializer=zeros", "name=inputlayer", NULL);
+ status =
+ ml_train_layer_set_property(layers[0], "input_shape=1:1:62720",
+ "normalization=true", "name=inputlayer", NULL);
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_model_add_layer(model, layers[0]);
status = ml_train_layer_create(&layers[0], ML_TRAIN_LAYER_TYPE_INPUT);
EXPECT_EQ(status, ML_ERROR_NONE);
- status = ml_train_layer_set_property(
- layers[0], "input_shape=1:1:100", "normalization=true",
- "bias_initializer=true", "name=inputlayer", NULL);
+ status =
+ ml_train_layer_set_property(layers[0], "input_shape=1:1:100",
+ "normalization=true", "name=inputlayer", NULL);
EXPECT_EQ(status, ML_ERROR_NONE);
status = ml_train_layer_create(&layers[1], ML_TRAIN_LAYER_TYPE_FC);