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
da633120
Commit
da633120
authored
1 year ago
by
Houssem ROUIS
Committed by
Maxence Naud
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
add consts
parent
82c69826
No related branches found
No related tags found
2 merge requests
!105
version 0.2.0
,
!74
Update vit operators
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/operator/Gather.cpp
+4
-4
4 additions, 4 deletions
src/operator/Gather.cpp
src/operator/Slice.cpp
+1
-1
1 addition, 1 deletion
src/operator/Slice.cpp
with
5 additions
and
5 deletions
src/operator/Gather.cpp
+
4
−
4
View file @
da633120
...
@@ -27,12 +27,12 @@ void Aidge::Gather_Op::computeOutputDims() {
...
@@ -27,12 +27,12 @@ void Aidge::Gather_Op::computeOutputDims() {
}
}
std
::
vector
<
DimSize_t
>
outDims
=
getInput
(
0
)
->
dims
();
std
::
vector
<
DimSize_t
>
outDims
=
getInput
(
0
)
->
dims
();
std
::
vector
<
DimSize_t
>
gatheredShape
=
this
->
template
getAttr
<
GatherAttr
::
GatheredShape
>();
const
std
::
vector
<
DimSize_t
>
gatheredShape
=
this
->
template
getAttr
<
GatherAttr
::
GatheredShape
>();
// TODO: check indices and gatheredShape
// TODO: check indices and gatheredShape
std
::
int64_t
axisIdx
=
this
->
template
getAttr
<
GatherAttr
::
Axis
>()
>=
0
?
const
std
::
int64_t
axisIdx
=
this
->
template
getAttr
<
GatherAttr
::
Axis
>()
>=
0
?
this
->
template
getAttr
<
GatherAttr
::
Axis
>()
:
this
->
template
getAttr
<
GatherAttr
::
Axis
>()
:
this
->
template
getAttr
<
GatherAttr
::
Axis
>()
+
outDims
.
size
();
this
->
template
getAttr
<
GatherAttr
::
Axis
>()
+
outDims
.
size
();
outDims
.
erase
(
outDims
.
begin
()
+
static_cast
<
std
::
size_t
>
(
axisIdx
));
outDims
.
erase
(
outDims
.
begin
()
+
static_cast
<
std
::
size_t
>
(
axisIdx
));
if
(
!
gatheredShape
.
empty
())
if
(
!
gatheredShape
.
empty
())
{
{
...
...
This diff is collapsed.
Click to expand it.
src/operator/Slice.cpp
+
1
−
1
View file @
da633120
...
@@ -30,7 +30,7 @@ void Aidge::Slice_Op::computeOutputDims() {
...
@@ -30,7 +30,7 @@ void Aidge::Slice_Op::computeOutputDims() {
AIDGE_THROW_OR_ABORT
(
std
::
runtime_error
,
"Every input should be associated with a Tensor"
);
AIDGE_THROW_OR_ABORT
(
std
::
runtime_error
,
"Every input should be associated with a Tensor"
);
}
}
DimSize_t
nbAxes
=
this
->
template
getAttr
<
SliceAttr
::
Axes
>().
size
();
const
DimSize_t
nbAxes
=
this
->
template
getAttr
<
SliceAttr
::
Axes
>().
size
();
std
::
vector
<
DimSize_t
>
outDims
=
getInput
(
0
)
->
dims
();
std
::
vector
<
DimSize_t
>
outDims
=
getInput
(
0
)
->
dims
();
for
(
std
::
size_t
i
=
0
;
i
<
nbAxes
;
++
i
)
{
for
(
std
::
size_t
i
=
0
;
i
<
nbAxes
;
++
i
)
{
// For each slice operation get the params and cast them to size_t
// For each slice operation get the params and cast them to size_t
...
...
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