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
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
Cyril Moineau
aidge_core
Commits
ad0225df
Commit
ad0225df
authored
1 year ago
by
Houssem ROUIS
Committed by
Maxence Naud
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
changed attrs to int32
parent
da633120
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/aidge/operator/Gather.hpp
+4
-4
4 additions, 4 deletions
include/aidge/operator/Gather.hpp
include/aidge/operator/Reshape.hpp
+4
-4
4 additions, 4 deletions
include/aidge/operator/Reshape.hpp
src/operator/Gather.cpp
+1
-1
1 addition, 1 deletion
src/operator/Gather.cpp
with
9 additions
and
9 deletions
include/aidge/operator/Gather.hpp
+
4
−
4
View file @
ad0225df
...
...
@@ -33,16 +33,16 @@ class Gather_Op : public OperatorTensor,
public
Registrable
<
Gather_Op
,
std
::
string
,
std
::
unique_ptr
<
OperatorImpl
>
(
const
Gather_Op
&
)
>
,
public
StaticAttributes
<
GatherAttr
,
std
::
vector
<
std
::
int
64
_t
>
,
std
::
vector
<
DimSize_t
>
,
std
::
int
64
_t
>
{
public
StaticAttributes
<
GatherAttr
,
std
::
vector
<
std
::
int
32
_t
>
,
std
::
vector
<
DimSize_t
>
,
std
::
int
32
_t
>
{
public:
static
const
std
::
string
Type
;
Gather_Op
()
=
delete
;
using
Attributes_
=
StaticAttributes
<
GatherAttr
,
std
::
vector
<
std
::
int
64
_t
>
,
std
::
vector
<
DimSize_t
>
,
std
::
int
64
_t
>
;
using
Attributes_
=
StaticAttributes
<
GatherAttr
,
std
::
vector
<
std
::
int
32
_t
>
,
std
::
vector
<
DimSize_t
>
,
std
::
int
32
_t
>
;
template
<
GatherAttr
e
>
using
attr
=
typename
Attributes_
::
template
attr
<
e
>;
Gather_Op
(
const
std
::
vector
<
std
::
int
64
_t
>&
indices
,
const
std
::
vector
<
DimSize_t
>&
gatheredShape
,
std
::
int
64
_t
axis
)
Gather_Op
(
const
std
::
vector
<
std
::
int
32
_t
>&
indices
,
const
std
::
vector
<
DimSize_t
>&
gatheredShape
,
std
::
int
32
_t
axis
)
:
OperatorTensor
(
Type
,
1
,
0
,
1
),
Attributes_
(
attr
<
GatherAttr
::
Indices
>
(
indices
),
...
...
@@ -84,7 +84,7 @@ public:
}
};
inline
std
::
shared_ptr
<
Node
>
Gather
(
const
std
::
vector
<
std
::
int
64
_t
>&
indices
,
const
std
::
vector
<
DimSize_t
>&
gatheredShape
,
std
::
int
64
_t
axis
=
0
,
const
std
::
string
&
name
=
""
)
{
inline
std
::
shared_ptr
<
Node
>
Gather
(
const
std
::
vector
<
std
::
int
32
_t
>&
indices
,
const
std
::
vector
<
DimSize_t
>&
gatheredShape
,
std
::
int
32
_t
axis
=
0
,
const
std
::
string
&
name
=
""
)
{
return
std
::
make_shared
<
Node
>
(
std
::
make_shared
<
Gather_Op
>
(
indices
,
gatheredShape
,
axis
),
name
);
}
}
// namespace Aidge
...
...
This diff is collapsed.
Click to expand it.
include/aidge/operator/Reshape.hpp
+
4
−
4
View file @
ad0225df
...
...
@@ -29,18 +29,18 @@ enum class ReshapeAttr { Shape };
class
Reshape_Op
:
public
OperatorTensor
,
public
Registrable
<
Reshape_Op
,
std
::
string
,
std
::
unique_ptr
<
OperatorImpl
>
(
const
Reshape_Op
&
)
>
,
public
StaticAttributes
<
ReshapeAttr
,
std
::
vector
<
std
::
int
64
_t
>>
{
public
StaticAttributes
<
ReshapeAttr
,
std
::
vector
<
std
::
int
32
_t
>>
{
public:
static
const
std
::
string
Type
;
Reshape_Op
()
=
delete
;
using
Attributes_
=
StaticAttributes
<
ReshapeAttr
,
std
::
vector
<
std
::
int
64
_t
>>
;
using
Attributes_
=
StaticAttributes
<
ReshapeAttr
,
std
::
vector
<
std
::
int
32
_t
>>
;
template
<
ReshapeAttr
e
>
using
attr
=
typename
Attributes_
::
template
attr
<
e
>;
Reshape_Op
(
const
std
::
vector
<
std
::
int
64
_t
>&
shape
)
Reshape_Op
(
const
std
::
vector
<
std
::
int
32
_t
>&
shape
)
:
OperatorTensor
(
Type
,
1
,
0
,
1
),
Attributes_
(
attr
<
ReshapeAttr
::
Shape
>
(
shape
))
{}
...
...
@@ -79,7 +79,7 @@ public:
}
};
inline
std
::
shared_ptr
<
Node
>
Reshape
(
const
std
::
vector
<
std
::
int
64
_t
>&
shape
,
inline
std
::
shared_ptr
<
Node
>
Reshape
(
const
std
::
vector
<
std
::
int
32
_t
>&
shape
,
const
std
::
string
&
name
=
""
)
{
// FIXME: properly handle default w&b initialization in every cases
return
std
::
make_shared
<
Node
>
(
std
::
make_shared
<
Reshape_Op
>
(
shape
),
name
);
...
...
This diff is collapsed.
Click to expand it.
src/operator/Gather.cpp
+
1
−
1
View file @
ad0225df
...
...
@@ -30,7 +30,7 @@ void Aidge::Gather_Op::computeOutputDims() {
const
std
::
vector
<
DimSize_t
>
gatheredShape
=
this
->
template
getAttr
<
GatherAttr
::
GatheredShape
>();
// TODO: check indices and gatheredShape
const
std
::
int
64
_t
axisIdx
=
this
->
template
getAttr
<
GatherAttr
::
Axis
>()
>=
0
?
const
std
::
int
32
_t
axisIdx
=
this
->
template
getAttr
<
GatherAttr
::
Axis
>()
>=
0
?
this
->
template
getAttr
<
GatherAttr
::
Axis
>()
:
this
->
template
getAttr
<
GatherAttr
::
Axis
>()
+
outDims
.
size
();
outDims
.
erase
(
outDims
.
begin
()
+
static_cast
<
std
::
size_t
>
(
axisIdx
));
...
...
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