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
990a1382
Commit
990a1382
authored
10 months ago
by
Cyril Moineau
Browse files
Options
Downloads
Patches
Plain Diff
Rename initGradient -> initGrad for name consistency.
parent
7729a5a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!119
0.2.1
,
!118
Update how loss function work
Pipeline
#45153
failed
10 months ago
Stage: static_analysis
Stage: build
Stage: test
Stage: coverage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/aidge/data/Tensor.hpp
+1
-1
1 addition, 1 deletion
include/aidge/data/Tensor.hpp
python_binding/data/pybind_Tensor.cpp
+2
-2
2 additions, 2 deletions
python_binding/data/pybind_Tensor.cpp
src/recipes/GraphViewHelper.cpp
+2
-2
2 additions, 2 deletions
src/recipes/GraphViewHelper.cpp
with
5 additions
and
5 deletions
include/aidge/data/Tensor.hpp
+
1
−
1
View file @
990a1382
...
...
@@ -569,7 +569,7 @@ public:
* @note If Tensor instance and implementation already existed for the gradient
* nothing is done.
*/
void
initGrad
ient
()
{
void
initGrad
()
{
if
(
!
mGrad
)
{
mGrad
=
std
::
make_shared
<
Tensor
>
(
mDims
);
}
...
...
This diff is collapsed.
Click to expand it.
python_binding/data/pybind_Tensor.cpp
+
2
−
2
View file @
990a1382
/********************************************************************************
.
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* This program and the accompanying materials are made available under the
...
...
@@ -79,7 +79,7 @@ void init_Tensor(py::module& m){
.
def
(
"grad"
,
&
Tensor
::
grad
)
.
def
(
"set_grad"
,
&
Tensor
::
setGrad
)
.
def
(
"dtype"
,
&
Tensor
::
dataType
)
.
def
(
"init_grad
ient
"
,
&
Tensor
::
initGrad
ient
)
.
def
(
"init_grad"
,
&
Tensor
::
initGrad
)
.
def
(
"size"
,
&
Tensor
::
size
)
.
def
(
"resize"
,
(
void
(
Tensor
::*
)(
const
std
::
vector
<
DimSize_t
>&
,
std
::
vector
<
DimSize_t
>
))
&
Tensor
::
resize
)
.
def
(
"has_impl"
,
&
Tensor
::
hasImpl
)
...
...
This diff is collapsed.
Click to expand it.
src/recipes/GraphViewHelper.cpp
+
2
−
2
View file @
990a1382
...
...
@@ -51,7 +51,7 @@ void Aidge::compile_gradient(std::shared_ptr<Aidge::GraphView> gv) {
AIDGE_ASSERT
(
node
->
getOperator
()
->
operatorType
()
==
OperatorType
::
Tensor
,
"Cannot instanciate gradient of an Operator ({}) that doesn't use Tensor."
,
node
->
getOperator
()
->
type
());
const
std
::
shared_ptr
<
OperatorTensor
>
op
=
std
::
dynamic_pointer_cast
<
OperatorTensor
>
(
node
->
getOperator
());
for
(
std
::
size_t
o
=
0
;
o
<
node
->
nbOutputs
();
++
o
)
{
op
->
getOutput
(
o
)
->
initGrad
ient
();
op
->
getOutput
(
o
)
->
initGrad
();
}
}
}
\ No newline at end of file
}
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