Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

Commit

Permalink
roll back rrelu test way
Browse files Browse the repository at this point in the history
  • Loading branch information
antinucleon committed Aug 4, 2015
1 parent 2145f6a commit 219d568
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/layer/insanity_layer-inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ 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, (ub_ - lb_) / (log(ub_) - log(lb_)));
// nodes_in[0]->data = F<op::xelu>(nodes_in[0]->data, (ub_ - lb_) / (log(ub_) - log(lb_)));
// better performance
nodes_in[0]->data = F<op::xelu>(nodes_in[0]->data, (ub_ + lb_) / 2.0f);
mshadow::Copy(nodes_out[0]->data, nodes_in[0]->data, nodes_out[0]->data.stream_);
}
}
Expand Down

0 comments on commit 219d568

Please sign in to comment.