Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_backend_cpu
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_backend_cpu
Commits
655e54d2
Commit
655e54d2
authored
1 year ago
by
Olivier BICHLER
Browse files
Options
Downloads
Patches
Plain Diff
Producer must be inside the scheduled GraphView
parent
dd7597e9
No related branches found
No related tags found
2 merge requests
!50
version 0.2.0
,
!37
Support for recurrent networks
Pipeline
#39468
failed
1 year ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aidge_backend_cpu/unit_tests/test_recipies.py
+1
-4
1 addition, 4 deletions
aidge_backend_cpu/unit_tests/test_recipies.py
aidge_backend_cpu/unit_tests/test_scheduler.py
+2
-9
2 additions, 9 deletions
aidge_backend_cpu/unit_tests/test_scheduler.py
with
3 additions
and
13 deletions
aidge_backend_cpu/unit_tests/test_recipies.py
+
1
−
4
View file @
655e54d2
...
...
@@ -33,12 +33,9 @@ class test_recipies(unittest.TestCase):
conv
=
aidge_core
.
Conv2D
(
1
,
1
,
[
3
,
3
],
name
=
"
Conv0
"
)
bn
=
aidge_core
.
BatchNorm2D
(
1
,
name
=
"
Add0
"
)
graph_view
=
aidge_core
.
sequential
([
conv
,
bn
])
graph_view
=
aidge_core
.
sequential
([
input_node
,
conv
,
bn
])
# Add random values to conv and BatchNorm parameters
input_node
.
add_child
(
graph_view
)
input_node
.
get_operator
().
set_datatype
(
aidge_core
.
DataType
.
Float32
)
input_node
.
get_operator
().
set_backend
(
"
cpu
"
)
graph_view
.
set_datatype
(
aidge_core
.
DataType
.
Float32
)
graph_view
.
set_backend
(
"
cpu
"
)
...
...
This diff is collapsed.
Click to expand it.
aidge_backend_cpu/unit_tests/test_scheduler.py
+
2
−
9
View file @
655e54d2
...
...
@@ -40,18 +40,14 @@ class test_scheduler(unittest.TestCase):
input_data
=
np
.
array
([
0
]).
astype
(
np
.
float32
)
input_tensor
=
aidge_core
.
Tensor
(
input_data
)
input_node
=
aidge_core
.
Producer
(
input_tensor
,
"
X
"
)
graph_view
=
aidge_core
.
sequential
([
aidge_core
.
Producer
(
input_tensor
,
"
X
"
),
aidge_core
.
FC
(
1
,
50
,
name
=
'
0
'
),
aidge_core
.
FC
(
50
,
50
,
name
=
'
1
'
),
aidge_core
.
FC
(
50
,
10
,
name
=
'
2
'
),
])
EXPECTED_SCHEDULE
=
[
'
0
'
,
'
1
'
,
'
2
'
]
input_node
.
add_child
(
graph_view
)
input_node
.
get_operator
().
set_datatype
(
aidge_core
.
DataType
.
Float32
)
input_node
.
get_operator
().
set_backend
(
"
cpu
"
)
graph_view
.
set_datatype
(
aidge_core
.
DataType
.
Float32
)
graph_view
.
set_backend
(
"
cpu
"
)
...
...
@@ -69,8 +65,8 @@ class test_scheduler(unittest.TestCase):
input_data
=
np
.
array
([
0
]).
astype
(
np
.
float32
)
input_tensor
=
aidge_core
.
Tensor
(
input_data
)
input_node
=
aidge_core
.
Producer
(
input_tensor
,
"
X
"
)
graph_view
=
aidge_core
.
sequential
([
aidge_core
.
Producer
(
input_tensor
,
"
X
"
),
aidge_core
.
FC
(
1
,
50
,
name
=
'
0
'
),
aidge_core
.
parallel
([
aidge_core
.
FC
(
50
,
50
,
name
=
'
1
'
),
aidge_core
.
FC
(
50
,
50
,
name
=
'
3
'
)]),
aidge_core
.
Add
(
2
,
name
=
'
2
'
),
...
...
@@ -78,9 +74,6 @@ class test_scheduler(unittest.TestCase):
EXPECTED_SCHEDULE
=
[[
'
0
'
,
'
1
'
,
'
3
'
,
'
2
'
],
[
'
0
'
,
'
3
'
,
'
1
'
,
'
2
'
]]
# Both scheduling are valid !
input_node
.
add_child
(
graph_view
)
input_node
.
get_operator
().
set_datatype
(
aidge_core
.
DataType
.
Float32
)
input_node
.
get_operator
().
set_backend
(
"
cpu
"
)
graph_view
.
set_datatype
(
aidge_core
.
DataType
.
Float32
)
graph_view
.
set_backend
(
"
cpu
"
)
...
...
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