Commit e47c0140 authored by turneram's avatar turneram
Browse files

Formatting

parent fe7562cb
...@@ -72,7 +72,7 @@ struct layernorm ...@@ -72,7 +72,7 @@ struct layernorm
mean_inv_std_dev_dim.at(i) = 1; mean_inv_std_dev_dim.at(i) = 1;
} */ } */
if (args.size() == 3) if(args.size() == 3)
{ {
visit_all(result, args[0], args[1], args[2])( visit_all(result, args[0], args[1], args[2])(
[&](auto output, auto data, auto weights, auto bias) { [&](auto output, auto data, auto weights, auto bias) {
...@@ -101,8 +101,7 @@ struct layernorm ...@@ -101,8 +101,7 @@ struct layernorm
} }
else else
{ {
visit_all(result, args[0])( visit_all(result, args[0])([&](auto output, auto data) {
[&](auto output, auto data) {
par_for(norm_count, [&](auto idx) { par_for(norm_count, [&](auto idx) {
auto offset = idx * norm_size; auto offset = idx * norm_size;
double mean = 0; double mean = 0;
......
...@@ -32,7 +32,7 @@ struct parse_layernorm : op_parser<parse_layernorm> ...@@ -32,7 +32,7 @@ struct parse_layernorm : op_parser<parse_layernorm>
if(args.size() >= 2) if(args.size() >= 2)
layernorm = info.add_instruction(make_op("mul"), layernorm, args.at(1)); layernorm = info.add_instruction(make_op("mul"), layernorm, args.at(1));
if (args.size() == 3) if(args.size() == 3)
layernorm = info.add_instruction(make_op("add"), layernorm, args.at(2)); layernorm = info.add_instruction(make_op("add"), layernorm, args.at(2));
return layernorm; return layernorm;
......
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