Skip to content

Commit

Permalink
Update the api names in ex_model_builder.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed Nov 21, 2019
1 parent 3500f1a commit 594ee33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions binaries/ex_model_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ int main() {
{Type::TENSOR_QUANT8_ASYMM, {3, 1, 1, 3}, 0.1, 150});
builder.AddTensorFromBuffer("bias", bias_buf,
{Type::TENSOR_INT32, {3}, 0.1, 0});
builder.AddLayerDEPTHWISE_CONV_2D("data", "weight", "bias", 1, 1, 0, 0, 0, 0,
builder.AddLayer_DEPTHWISE_CONV_2D("data", "weight", "bias", 1, 1, 0, 0, 0, 0,
ModelBuilder::ACTIVATION_NONE, 1,
"conv_fwd",
std::make_optional<ModelBuilder::QuantInfo>(
{Type::TENSOR_QUANT8_ASYMM, {0.5}, 100}));
builder.AddLayerRELU("conv_fwd", "relu_fwd");
builder.AddLayerADD("data", "relu_fwd", ModelBuilder::ACTIVATION_NONE, "output",
builder.AddLayer_RELU("conv_fwd", "relu_fwd");
builder.AddLayer_ADD("data", "relu_fwd", ModelBuilder::ACTIVATION_NONE, "output",
std::make_optional<ModelBuilder::QuantInfo>(
{Type::TENSOR_QUANT8_ASYMM, {0.05}, 100}));
} else {
Expand All @@ -41,7 +41,7 @@ int main() {
{Type::TENSOR_FLOAT32, {3, 1, 1, 3}});
builder.AddTensorFromBuffer("bias", bias_buf,
{Type::TENSOR_FLOAT32, {3}});
builder.AddLayerCONV_2D("data", "weight", "bias", 1, 1, 0, 0, 0, 0, ModelBuilder::ACTIVATION_NONE,
builder.AddLayer_CONV_2D("data", "weight", "bias", 1, 1, 0, 0, 0, 0, ModelBuilder::ACTIVATION_NONE,
"output", dnn::nullopt);
}
auto model = builder.AddOutput("output").Compile(
Expand Down

0 comments on commit 594ee33

Please sign in to comment.