Skip to content

Commit

Permalink
update benchmark and test code
Browse files Browse the repository at this point in the history
  • Loading branch information
okdshin committed Sep 27, 2018
1 parent fc3ec79 commit 9dac97a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion benchmark/vgg16_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main(int argc, char** argv) {
menoh::variable_profile_table_builder vpt_builder;
vpt_builder.add_input_profile(conv1_1_in_name, menoh::dtype_t::float_,
{batch_size, 3, 224, 224});
vpt_builder.add_output_profile(softmax_out_name, menoh::dtype_t::float_);
vpt_builder.add_output_name(softmax_out_name);
auto vpt = vpt_builder.build_variable_profile_table(model_data);

// Build model
Expand Down
3 changes: 1 addition & 2 deletions test/backend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ namespace menoh {
std::vector<float> data;
std::tie(std::ignore, output_dims, data) =
menoh_impl::load_np_array(output_filename);
dtype_t dtype = dtype_t::float_; // TODO other dtype
true_output_table.insert({output_name, data});
vpt_builder.add_output_profile(output_name, dtype);
vpt_builder.add_output_name(output_name);
}

auto vpt = vpt_builder.build_variable_profile_table(model_data);
Expand Down
5 changes: 2 additions & 3 deletions test/mkldnn_with_generic_fallback_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@ namespace menoh {
std::string output_name;
std::tie(output_name, std::ignore) = gemm_true_output_filename;
model_data.add_output_name_to_current_node(output_name);
dtype_t dtype = dtype_t::float_; // TODO other dtype
vpt_builder.add_output_profile(output_name, dtype);
vpt_builder.add_output_name(output_name);
}

{
model_data.add_new_node("Relu");
model_data.add_input_name_to_current_node("gemm_out");
model_data.add_output_name_to_current_node("relu_out");
vpt_builder.add_output_profile("relu_out", dtype_t::float_);
vpt_builder.add_output_name("relu_out");
}

auto vpt = vpt_builder.build_variable_profile_table(model_data);
Expand Down

0 comments on commit 9dac97a

Please sign in to comment.