mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 19:47:12 +00:00
Use is_some to check if seed is present
This commit is contained in:
@ -850,11 +850,8 @@ pub fn simple_eval(
|
||||
let low: f32 = get_attr_opt(node, "low")?.copied().unwrap_or(0.0);
|
||||
let high: f32 = get_attr_opt(node, "high")?.copied().unwrap_or(1.0);
|
||||
let seed: Option<f32> = get_attr_opt(node, "seed")?.copied();
|
||||
match seed {
|
||||
Some(_) => {
|
||||
if seed.is_some() {
|
||||
bail!("seed for RandomUniform is currently not supported")
|
||||
}
|
||||
None => {}
|
||||
};
|
||||
let shape: Vec<usize> = get_attr::<[i64]>(node, "shape")?
|
||||
.iter()
|
||||
|
Reference in New Issue
Block a user