Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit 7e13898

Browse files
committed
chore: formatting
1 parent d7959d2 commit 7e13898

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

wonnx/tests/localresponsenormalization.rs

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ fn local_response_normalization() {
99
let batches = 1;
1010
let width_height: usize = 3;
1111
let channels: usize = 4;
12-
let data: Vec<f32> = [ 1.,1.,2.,4., 2.,2.,1.,2., 3.,1.,2.,1., 4.,2.,3.,5., 3.,3.,2.,2., 6.,2.,3.,1., 7.,3.,4.,2., 8.,4.,3.,2., 9.,3.,4.,4.].to_vec();
12+
let data: Vec<f32> = [
13+
1., 1., 2., 4., 2., 2., 1., 2., 3., 1., 2., 1., 4., 2., 3., 5., 3., 3., 2., 2., 6., 2., 3.,
14+
1., 7., 3., 4., 2., 8., 4., 3., 2., 9., 3., 4., 4.,
15+
]
16+
.to_vec();
1317

1418
let shape = vec![
1519
batches as i64,
@@ -20,21 +24,22 @@ fn local_response_normalization() {
2024
input_data.insert("X".to_string(), data.as_slice().into());
2125

2226
let bn_model = model(graph(
23-
vec![tensor("X", &shape)], // input
24-
vec![tensor("Y", &shape)], // output
25-
vec![], // infos
26-
vec![], // intializers
27-
27+
vec![tensor("X", &shape)], // input
28+
vec![tensor("Y", &shape)], // output
29+
vec![], // infos
30+
vec![], // intializers
2831
// nodes
2932
vec![node(
3033
vec!["X"],
3134
vec!["Y"],
3235
"lrn",
3336
"LRN",
34-
vec![ attribute("alpha", 1.0),
35-
attribute("beta", 1.0),
36-
attribute("bias", 0.0),
37-
attribute("size", 2)],
37+
vec![
38+
attribute("alpha", 1.0),
39+
attribute("beta", 1.0),
40+
attribute("bias", 0.0),
41+
attribute("size", 2),
42+
],
3843
)],
3944
));
4045

@@ -47,6 +52,10 @@ fn local_response_normalization() {
4752

4853
common::assert_eq_vector(
4954
out_y.try_into().unwrap(),
50-
&[1.0, 0.4, 0.2, 0.5, 0.5, 0.8, 0.4, 1.0, 0.6, 0.4, 0.8, 2.0, 0.4, 0.30769232, 0.1764706, 0.39999998, 0.33333334, 0.4615385, 0.5, 1.0, 0.3, 0.30769232, 0.6, 2.0, 0.2413793, 0.24, 0.4, 1.0, 0.2, 0.32, 0.4615385, 1.0, 0.2, 0.24, 0.25, 0.5],
55+
&[
56+
1.0, 0.4, 0.2, 0.5, 0.5, 0.8, 0.4, 1.0, 0.6, 0.4, 0.8, 2.0, 0.4, 0.30769232, 0.1764706,
57+
0.39999998, 0.33333334, 0.4615385, 0.5, 1.0, 0.3, 0.30769232, 0.6, 2.0, 0.2413793,
58+
0.24, 0.4, 1.0, 0.2, 0.32, 0.4615385, 1.0, 0.2, 0.24, 0.25, 0.5,
59+
],
5160
);
52-
}
61+
}

0 commit comments

Comments
 (0)