"docs/vscode:/vscode.git/clone" did not exist on "c993f767a8a5ce041921c1825ac407d9be847bb9"
Commit 26df5406 authored by Khalique's avatar Khalique
Browse files

formatting

parent 3acbd087
...@@ -41,7 +41,7 @@ struct tf_parser ...@@ -41,7 +41,7 @@ struct tf_parser
auto attrs = attributes.at(s).list().i(); auto attrs = attributes.at(s).list().i();
std::vector<size_t> axes; std::vector<size_t> axes;
copy(attrs.begin(), attrs.end(), std::back_inserter(axes)); copy(attrs.begin(), attrs.end(), std::back_inserter(axes));
if (is_nhwc) if(is_nhwc)
{ {
for(size_t i = 0; i < axes.size(); ++i) for(size_t i = 0; i < axes.size(); ++i)
{ {
...@@ -78,7 +78,6 @@ struct tf_parser ...@@ -78,7 +78,6 @@ struct tf_parser
default: break; default: break;
} }
} }
} }
tf_parser() tf_parser()
...@@ -209,7 +208,7 @@ struct tf_parser ...@@ -209,7 +208,7 @@ struct tf_parser
parse_biasadd(const std::string&, const attribute_map&, std::vector<instruction_ref> args) parse_biasadd(const std::string&, const attribute_map&, std::vector<instruction_ref> args)
{ {
uint64_t axis = 1; // assume output of previous layer is in NCHW (broadcast on channel) uint64_t axis = 1; // assume output of previous layer is in NCHW (broadcast on channel)
auto l0 = prog.add_instruction(op::broadcast{axis, args[0]->get_shape()}, args[1]); auto l0 = prog.add_instruction(op::broadcast{axis, args[0]->get_shape()}, args[1]);
return prog.add_instruction(op::add{}, args[0], l0); return prog.add_instruction(op::add{}, args[0], l0);
} }
...@@ -286,13 +285,13 @@ struct tf_parser ...@@ -286,13 +285,13 @@ struct tf_parser
op.dilation[1] = dilation[3]; op.dilation[1] = dilation[3];
} }
auto l0 = args[1]; auto l0 = args[1];
if (l0->get_operator().name() == "transpose" and is_nhwc) if(l0->get_operator().name() == "transpose" and is_nhwc)
{ {
l0 = prog.add_instruction(op::transpose{{1, 3, 0, 2}}, args[1]); l0 = prog.add_instruction(op::transpose{{1, 3, 0, 2}}, args[1]);
} }
else else
l0 = prog.add_instruction(op::transpose{{3, 2, 0, 1}}, args[1]); l0 = prog.add_instruction(op::transpose{{3, 2, 0, 1}}, args[1]);
return prog.add_instruction(op, {args[0], l0}); return prog.add_instruction(op, {args[0], l0});
} }
...@@ -334,7 +333,7 @@ struct tf_parser ...@@ -334,7 +333,7 @@ struct tf_parser
if(ksize.size() != 4) if(ksize.size() != 4)
{ {
MIGRAPHX_THROW("ksize should have 4 values"); MIGRAPHX_THROW("ksize should have 4 values");
} }
op.lengths[0] = ksize[2]; op.lengths[0] = ksize[2];
op.lengths[1] = ksize[3]; op.lengths[1] = ksize[3];
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment