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
02fdf34a
Commit
02fdf34a
authored
1 year ago
by
Houssem ROUIS
Browse files
Options
Downloads
Patches
Plain Diff
add more Registrar dims for Transpose
parent
19f7875c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/aidge/operator/Transpose.hpp
+3
-3
3 additions, 3 deletions
include/aidge/operator/Transpose.hpp
python_binding/operator/pybind_Transpose.cpp
+9
-1
9 additions, 1 deletion
python_binding/operator/pybind_Transpose.cpp
with
12 additions
and
4 deletions
include/aidge/operator/Transpose.hpp
+
3
−
3
View file @
02fdf34a
...
...
@@ -103,19 +103,19 @@ class Transpose_Op : public Operator,
inline
std
::
shared_ptr
<
Tensor
>
getInput
(
const
IOIndex_t
inputIdx
)
const
override
final
{
assert
((
inputIdx
==
0
)
&&
"Transpose
O
perator
s
supports only 1 input"
);
assert
((
inputIdx
==
0
)
&&
"Transpose
o
perator supports only 1 input"
);
(
void
)
inputIdx
;
// avoid unused warning
return
mInput
;
}
inline
std
::
shared_ptr
<
Tensor
>
getOutput
(
const
IOIndex_t
outputIdx
)
const
override
final
{
assert
((
outputIdx
==
0
)
&&
"Transpose
O
perator has only 1 output"
);
assert
((
outputIdx
==
0
)
&&
"Transpose
o
perator has only 1 output"
);
(
void
)
outputIdx
;
// avoid unused warning
return
mOutput
;
}
std
::
shared_ptr
<
Data
>
getRawInput
(
const
IOIndex_t
inputIdx
)
const
override
final
{
assert
((
inputIdx
==
0
)
&&
"Transpose
O
perator supports only 1 input"
);
assert
((
inputIdx
==
0
)
&&
"Transpose
o
perator supports only 1 input"
);
return
std
::
static_pointer_cast
<
Data
>
(
mInput
);
}
std
::
shared_ptr
<
Data
>
getRawOutput
(
const
IOIndex_t
outputIdx
)
const
override
final
{
...
...
This diff is collapsed.
Click to expand it.
python_binding/operator/pybind_Transpose.cpp
+
9
−
1
View file @
02fdf34a
...
...
@@ -26,7 +26,7 @@ namespace py = pybind11;
namespace
Aidge
{
template
<
DimIdx_t
DIM
>
void
init
_Transpose
(
py
::
module
&
m
)
{
void
declare
_Transpose
(
py
::
module
&
m
)
{
py
::
class_
<
Transpose_Op
<
DIM
>
,
std
::
shared_ptr
<
Transpose_Op
<
DIM
>>
,
Operator
,
Attributes
>
(
m
,
(
"TransposeOp"
+
std
::
to_string
(
DIM
)
+
"D"
).
c_str
(),
py
::
multiple_inheritance
())
.
def
(
"get_inputs_name"
,
&
Transpose_Op
<
DIM
>::
getInputsName
)
...
...
@@ -41,4 +41,12 @@ void init_Transpose(py::module &m) {
}
void
init_Transpose
(
py
::
module
&
m
)
{
declare_Transpose
<
2
>
(
m
);
declare_Transpose
<
3
>
(
m
);
declare_Transpose
<
4
>
(
m
);
declare_Transpose
<
5
>
(
m
);
declare_Transpose
<
6
>
(
m
);
}
}
// namespace Aidge
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