Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
EMADL2CPP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
generators
EMADL2CPP
Commits
8a8ed262
Commit
8a8ed262
authored
May 16, 2019
by
Nicola Gatto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust tests
parent
cdc08ba5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
src/test/resources/target_code/gluon/CNNNet_mnist_mnistClassifier_net.py
...ces/target_code/gluon/CNNNet_mnist_mnistClassifier_net.py
+4
-4
src/test/resources/target_code/gluon/reinforcementModel/cartpole/CNNNet_cartpole_master_dqn.py
...reinforcementModel/cartpole/CNNNet_cartpole_master_dqn.py
+4
-4
src/test/resources/target_code/gluon/reinforcementModel/torcs/CNNNet_torcs_agent_torcsAgent_dqn.py
...forcementModel/torcs/CNNNet_torcs_agent_torcsAgent_dqn.py
+4
-4
No files found.
src/test/resources/target_code/gluon/CNNNet_mnist_mnistClassifier_net.py
View file @
8a8ed262
...
...
@@ -74,9 +74,9 @@ class Net(gluon.HybridBlock):
with
self
.
name_scope
():
if
not
data_mean
is
None
:
assert
(
not
data_std
is
None
)
self
.
input_normalization
=
ZScoreNormalization
(
data_mean
=
data_mean
,
data_std
=
data_std
)
self
.
i
mage_i
nput_normalization
=
ZScoreNormalization
(
data_mean
=
data_mean
,
data_std
=
data_std
)
else
:
self
.
input_normalization
=
NoNormalization
()
self
.
i
mage_i
nput_normalization
=
NoNormalization
()
self
.
conv1_
=
gluon
.
nn
.
Conv2D
(
channels
=
20
,
kernel_size
=
(
5
,
5
),
...
...
@@ -112,8 +112,8 @@ class Net(gluon.HybridBlock):
self
.
last_layer
=
'softmax'
def
hybrid_forward
(
self
,
F
,
x
):
image
=
self
.
i
nput_normalization
(
x
)
def
hybrid_forward
(
self
,
F
,
image
):
image
=
self
.
i
mage_input_normalization
(
image
)
conv1_
=
self
.
conv1_
(
image
)
pool1_
=
self
.
pool1_
(
conv1_
)
conv2_
=
self
.
conv2_
(
pool1_
)
...
...
src/test/resources/target_code/gluon/reinforcementModel/cartpole/CNNNet_cartpole_master_dqn.py
View file @
8a8ed262
...
...
@@ -74,9 +74,9 @@ class Net(gluon.HybridBlock):
with
self
.
name_scope
():
if
not
data_mean
is
None
:
assert
(
not
data_std
is
None
)
self
.
input_normalization
=
ZScoreNormalization
(
data_mean
=
data_mean
,
data_std
=
data_std
)
self
.
state_
input_normalization
=
ZScoreNormalization
(
data_mean
=
data_mean
,
data_std
=
data_std
)
else
:
self
.
input_normalization
=
NoNormalization
()
self
.
state_
input_normalization
=
NoNormalization
()
self
.
fc1_
=
gluon
.
nn
.
Dense
(
units
=
128
,
use_bias
=
True
)
# fc1_, output shape: {[128,1,1]}
...
...
@@ -93,8 +93,8 @@ class Net(gluon.HybridBlock):
self
.
last_layer
=
'linear'
def
hybrid_forward
(
self
,
F
,
x
):
state
=
self
.
input_normalization
(
x
)
def
hybrid_forward
(
self
,
F
,
state
):
state
=
self
.
state_input_normalization
(
state
)
fc1_
=
self
.
fc1_
(
state
)
tanh1_
=
self
.
tanh1_
(
fc1_
)
fc2_
=
self
.
fc2_
(
tanh1_
)
...
...
src/test/resources/target_code/gluon/reinforcementModel/torcs/CNNNet_torcs_agent_torcsAgent_dqn.py
View file @
8a8ed262
...
...
@@ -74,9 +74,9 @@ class Net(gluon.HybridBlock):
with
self
.
name_scope
():
if
not
data_mean
is
None
:
assert
(
not
data_std
is
None
)
self
.
input_normalization
=
ZScoreNormalization
(
data_mean
=
data_mean
,
data_std
=
data_std
)
self
.
state_
input_normalization
=
ZScoreNormalization
(
data_mean
=
data_mean
,
data_std
=
data_std
)
else
:
self
.
input_normalization
=
NoNormalization
()
self
.
state_
input_normalization
=
NoNormalization
()
self
.
fc1_
=
gluon
.
nn
.
Dense
(
units
=
512
,
use_bias
=
True
)
# fc1_, output shape: {[512,1,1]}
...
...
@@ -93,8 +93,8 @@ class Net(gluon.HybridBlock):
self
.
last_layer
=
'linear'
def
hybrid_forward
(
self
,
F
,
x
):
state
=
self
.
input_normalization
(
x
)
def
hybrid_forward
(
self
,
F
,
state
):
state
=
self
.
state_input_normalization
(
state
)
fc1_
=
self
.
fc1_
(
state
)
tanh1_
=
self
.
tanh1_
(
fc1_
)
fc2_
=
self
.
fc2_
(
tanh1_
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment