diff --git a/src/core/graph/autodiff.rs b/src/core/graph/autodiff.rs index b802d8b..b54faee 100644 --- a/src/core/graph/autodiff.rs +++ b/src/core/graph/autodiff.rs @@ -64,7 +64,9 @@ impl Context { //Again again, clone() here is not wonderful, there's gotta be a better way to //store the i64 vec for Transpose match self.nodes[dependent_node].operation.clone() { - Operation::Constant(_) => panic!("Constant found as dependent node!"), + Operation::Constant(_) + | Operation::RngUniform(_, _, _) + | Operation::RngNormal(_, _, _) => panic!("Constant found as dependent node!"), Operation::Parameter(_) => panic!("Parameter found as dependent node!"), Operation::StopGradient(_) => continue, @@ -73,8 +75,6 @@ impl Context { | Operation::LessThan(_, _) | Operation::LessThanEq(_, _) | Operation::GreaterThan(_, _) - | Operation::RngNormal(_, _, _) - | Operation::RngUniform(_, _, _) | Operation::GreaterThanEq(_, _) => { return Err(ContextError::NonDifferentiableOpError( self.nodes[dependent_node].callsite.clone(),