mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Apply rustfmt to the newly added tests. (#1749)
This commit is contained in:
@ -861,11 +861,7 @@ fn test_shape_operation() -> Result<()> {
|
|||||||
sparse_initializer: vec![],
|
sparse_initializer: vec![],
|
||||||
quantization_annotation: vec![],
|
quantization_annotation: vec![],
|
||||||
}));
|
}));
|
||||||
let x = Tensor::from_vec(
|
let x = Tensor::from_vec(vec![1.0f32, 2.0f32, 3.0f32, 4.0f32], &[2, 2], &Device::Cpu)?;
|
||||||
vec![1.0f32, 2.0f32, 3.0f32, 4.0f32],
|
|
||||||
&[2, 2],
|
|
||||||
&Device::Cpu,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
let mut inputs: HashMap<String, Tensor> = HashMap::new();
|
let mut inputs: HashMap<String, Tensor> = HashMap::new();
|
||||||
inputs.insert(INPUT_X.to_string(), x);
|
inputs.insert(INPUT_X.to_string(), x);
|
||||||
@ -1313,7 +1309,11 @@ fn test_relu_operation() -> Result<()> {
|
|||||||
sparse_initializer: vec![],
|
sparse_initializer: vec![],
|
||||||
quantization_annotation: vec![],
|
quantization_annotation: vec![],
|
||||||
}));
|
}));
|
||||||
let x = Tensor::from_vec(vec![-1.0f32, 1.0f32, -2.0f32, 3.0f32], &[2, 2], &Device::Cpu)?;
|
let x = Tensor::from_vec(
|
||||||
|
vec![-1.0f32, 1.0f32, -2.0f32, 3.0f32],
|
||||||
|
&[2, 2],
|
||||||
|
&Device::Cpu,
|
||||||
|
)?;
|
||||||
|
|
||||||
let mut inputs: HashMap<String, Tensor> = HashMap::new();
|
let mut inputs: HashMap<String, Tensor> = HashMap::new();
|
||||||
inputs.insert(INPUT_X.to_string(), x);
|
inputs.insert(INPUT_X.to_string(), x);
|
||||||
|
Reference in New Issue
Block a user