(&self)
| 266 | } |
| 267 | |
| 268 | pub fn is_const_optimizable(&self) -> Result<bool> { |
| 269 | match self { |
| 270 | // Zeros and Ones exist precisely because we don't want to store them as Constants |
| 271 | // to keep the graph size small. |
| 272 | Operation::Zeros(_) | Operation::Ones(_) => Ok(false), |
| 273 | op => Ok(!op.is_input() && !op.is_randomizing()?), |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | // If an operation computes a randomized output, return true |
| 278 | pub fn is_randomizing(&self) -> Result<bool> { |
no test coverage detected