Commit 98338dea authored by Shucai Xiao's avatar Shucai Xiao
Browse files

refine the print out information

parent 2093d79e
......@@ -30,8 +30,8 @@ struct gru
template <class Self, class F>
static auto reflect(Self& self, F f)
{
return pack(f(self.hidden_size, "hidden size"),
f(self.actv_funcs, "activation functions"),
return pack(f(self.hidden_size, "hidden_size"),
f(self.actv_funcs, "actv_func"),
f(self.direction, "direction"),
f(self.clip, "clip"),
f(self.linear_before_reset, "linear_before_reset"));
......
......@@ -28,8 +28,8 @@ struct lstm
template <class Self, class F>
static auto reflect(Self& self, F f)
{
return pack(f(self.hidden_size, "hidden size"),
f(self.actv_funcs, "activation functions"),
return pack(f(self.hidden_size, "hidden_size"),
f(self.actv_funcs, "actv_func"),
f(self.direction, "direction"),
f(self.input_forget, "input_forget"));
}
......
......@@ -28,8 +28,8 @@ struct rnn
template <class Self, class F>
static auto reflect(Self& self, F f)
{
return pack(f(self.hidden_size, "hidden size"),
f(self.actv_funcs, "activation functions"),
return pack(f(self.hidden_size, "hidden_size"),
f(self.actv_funcs, "actv_func"),
f(self.direction, "direction"),
f(self.clip, "clip"));
}
......
......@@ -1170,7 +1170,8 @@ std::vector<operation> rewrite_rnn::lstm_actv_funcs(instruction_ref ins) const
namespace op {
std::ostream& operator<<(std::ostream& os, rnn_direction v)
{
os << static_cast<std::underlying_type<rnn_direction>::type>(v);
std::vector<std::string> rnn_direction_str = {"forward", "reverse", "bidirectional"};
os << rnn_direction_str[static_cast<std::underlying_type<rnn_direction>::type>(v)];
return os;
}
} // namespace op
......
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