Commit c17d2d0b authored by Shucai Xiao's avatar Shucai Xiao
Browse files

refine code.

parent e41908ad
...@@ -1190,7 +1190,7 @@ struct rnn_last_output ...@@ -1190,7 +1190,7 @@ struct rnn_last_output
struct undefined struct undefined
{ {
std::string name() const { return "undefined"; } std::string name() const { return "undefined"; }
shape compute_shape(std::vector<shape> inputs) const shape compute_shape(const std::vector<shape> &inputs) const
{ {
check_shapes{inputs, *this}.has(0); check_shapes{inputs, *this}.has(0);
return {}; return {};
......
...@@ -272,7 +272,7 @@ std::vector<operation> rewrite_rnn::compute_actv_funcs(instruction_ref ins) cons ...@@ -272,7 +272,7 @@ std::vector<operation> rewrite_rnn::compute_actv_funcs(instruction_ref ins) cons
// algorithm in parse_rnn to make 2 actv functions // algorithm in parse_rnn to make 2 actv functions
if(rnn_op.direction == op::rnn::bidirectional) if(rnn_op.direction == op::rnn::bidirectional)
{ {
if(rnn_op.actv_funcs.size() == 0) if(rnn_op.actv_funcs.empty())
{ {
// default is tanh // default is tanh
return {op::tanh{}, op::tanh{}}; return {op::tanh{}, op::tanh{}};
...@@ -288,7 +288,7 @@ std::vector<operation> rewrite_rnn::compute_actv_funcs(instruction_ref ins) cons ...@@ -288,7 +288,7 @@ std::vector<operation> rewrite_rnn::compute_actv_funcs(instruction_ref ins) cons
} }
else else
{ {
if(rnn_op.actv_funcs.size() == 0) if(rnn_op.actv_funcs.empty())
{ {
// default is tanh // default is tanh
return {op::tanh{}}; return {op::tanh{}};
......
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