Skip to content

Commit

Permalink
fix/native: Fix sigmoid_grad to use x_diff instead of x for dx
Browse files Browse the repository at this point in the history
  • Loading branch information
Ewan Higgs committed Jan 20, 2016
1 parent 892ce8f commit c25a32a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/frameworks/native/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ macro_rules! impl_ops_sigmoid_for {
result_diff: &mut ::co::tensor::SharedTensor<$t>
) -> Result<(), ::co::error::Error> {
if let Some(sig_data) = x.get(self.device()).unwrap().as_native() {
if let Some(sig_dx) = x.get(self.device()).unwrap().as_native() {
if let Some(sig_dx) = x_diff.get(self.device()).unwrap().as_native() {
let res = sig_data.as_slice::<$t>().iter()
.zip(sig_dx.as_slice::<$t>().iter())
.map(|(t, dt)| ::frameworks::native::helper::sigmoid_grad(t, dt));
Expand Down

0 comments on commit c25a32a

Please sign in to comment.