Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
aidge
aidge_core
Commits
76b61da0
Commit
76b61da0
authored
4 months ago
by
Axel Farrugia
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into test_env
parents
e3ac6bfb
b5623fb6
No related branches found
No related tags found
2 merge requests
!279
v0.4.0
,
!250
[Feat](Exports) Add custom options to exports
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/operator/GlobalAveragePooling.cpp
+4
-2
4 additions, 2 deletions
src/operator/GlobalAveragePooling.cpp
unit_tests/operator/Test_GlobalAveragePooling_Op.cpp
+4
-2
4 additions, 2 deletions
unit_tests/operator/Test_GlobalAveragePooling_Op.cpp
with
8 additions
and
4 deletions
src/operator/GlobalAveragePooling.cpp
+
4
−
2
View file @
76b61da0
...
@@ -44,8 +44,10 @@ bool Aidge::GlobalAveragePooling_Op::forwardDims(bool /*allowDataDependency*/) {
...
@@ -44,8 +44,10 @@ bool Aidge::GlobalAveragePooling_Op::forwardDims(bool /*allowDataDependency*/) {
// Global average pooling takes each filter, averages its values and uses
// Global average pooling takes each filter, averages its values and uses
// it as an output(Much like a fancier flatten). 1st dim is batch 2nd is
// it as an output(Much like a fancier flatten). 1st dim is batch 2nd is
// number of filter
// number of filter
mOutputs
[
0
]
->
resize
({
getInput
(
0
)
->
dims
().
at
(
0
),
std
::
vector
<
DimSize_t
>
outputDims
(
getInput
(
0
)
->
nbDims
(),
1
);
getInput
(
0
)
->
dims
().
at
(
1
)});
outputDims
[
0
]
=
getInput
(
0
)
->
dims
()[
0
];
outputDims
[
1
]
=
getInput
(
0
)
->
dims
()[
1
];
mOutputs
[
0
]
->
resize
(
outputDims
);
return
true
;
return
true
;
}
}
...
...
This diff is collapsed.
Click to expand it.
unit_tests/operator/Test_GlobalAveragePooling_Op.cpp
+
4
−
2
View file @
76b61da0
...
@@ -70,12 +70,14 @@ TEST_CASE("[core/operator] GlobalAveragePooling_Op(forwardDims)",
...
@@ -70,12 +70,14 @@ TEST_CASE("[core/operator] GlobalAveragePooling_Op(forwardDims)",
for
(
uint16_t
i
=
0
;
i
<
nb_dims
;
++
i
)
{
for
(
uint16_t
i
=
0
;
i
<
nb_dims
;
++
i
)
{
dims
[
i
]
=
dimsDist
(
gen
)
+
1
;
dims
[
i
]
=
dimsDist
(
gen
)
+
1
;
}
}
std
::
vector
<
DimSize_t
>
dims_out
{
dims
[
0
],
dims
[
1
]};
std
::
vector
<
DimSize_t
>
dims_out
(
nb_dims
,
1
);
dims_out
[
0
]
=
dims
[
0
];
dims_out
[
1
]
=
dims
[
1
];
input_T
->
resize
(
dims
);
input_T
->
resize
(
dims
);
op
->
setInput
(
0
,
input_T
);
op
->
setInput
(
0
,
input_T
);
REQUIRE_NOTHROW
(
op
->
forwardDims
());
REQUIRE_NOTHROW
(
op
->
forwardDims
());
REQUIRE
(
op
->
getOutput
(
0
)
->
dims
()
==
dims_out
);
REQUIRE
(
op
->
getOutput
(
0
)
->
dims
()
==
dims_out
);
REQUIRE
((
op
->
getOutput
(
0
)
->
dims
().
size
())
==
static_cast
<
size_t
>
(
2
)
);
REQUIRE
((
op
->
getOutput
(
0
)
->
dims
().
size
())
==
nb_dims
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment