Skip to content

Commit

Permalink
fix rrelu testing
Browse files Browse the repository at this point in the history
  • Loading branch information
winstywang committed May 25, 2015
1 parent f077121 commit 499a175
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layer/insanity_layer-inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class InsanityLayer : public ILayer<xpu> {
ConnectState<xpu> *p_cstate) {
if (!init_) {
init_ = true;
delta_ = (ub_ + lb_) / 2.0f;
delta_ = (ub_ - lb_) / (log(ub_) - log(lb_));
delta_ = ub_ - delta_;
delta_ /= (saturation_end_ - saturation_start_);
}
Expand All @@ -67,7 +67,7 @@ class InsanityLayer : public ILayer<xpu> {
nodes_in[0]->data = F<op::xelu>(nodes_in[0]->data, mask);
mshadow::Copy(nodes_out[0]->data, nodes_in[0]->data, nodes_out[0]->data.stream_);
} else {
nodes_in[0]->data = F<op::xelu>(nodes_in[0]->data, (lb_ + ub_) / 2.0f);
nodes_in[0]->data = F<op::xelu>(nodes_in[0]->data, (ub_ - lb_) / (log(ub_) - log(lb_)));
mshadow::Copy(nodes_out[0]->data, nodes_in[0]->data, nodes_out[0]->data.stream_);
}
}
Expand Down

0 comments on commit 499a175

Please sign in to comment.