Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
monticore
EmbeddedMontiArc
generators
CNNArch2Gluon
Commits
0072991d
Commit
0072991d
authored
Nov 07, 2019
by
Sebastian N.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated target code
parent
9d751e4e
Pipeline
#203326
failed with stages
in 18 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py
...est/resources/target_code/CNNSupervisedTrainer_Alexnet.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py
...arget_code/CNNSupervisedTrainer_CifarClassifierNetwork.py
+2
-2
src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py
src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py
+2
-2
No files found.
src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py
View file @
0072991d
...
...
@@ -354,7 +354,7 @@ class CNNSupervisedTrainer_Alexnet:
attention_resized
=
np
.
resize
(
attention
.
asnumpy
(),
(
8
,
8
))
ax
=
fig
.
add_subplot
(
max_length
//
3
,
max_length
//
4
,
l
+
1
)
ax
.
set_title
(
dict
[
int
(
labels
[
l
+
1
][
0
].
asscalar
())])
img
=
ax
.
imshow
(
train_images
[
0
+
batch_size
*
(
batch_i
)])
img
=
ax
.
imshow
(
train_images
[
0
+
test_
batch_size
*
(
batch_i
)])
ax
.
imshow
(
attention_resized
,
cmap
=
'gray'
,
alpha
=
0.6
,
extent
=
img
.
get_extent
())
...
...
@@ -406,7 +406,7 @@ class CNNSupervisedTrainer_Alexnet:
attention_resized
=
np
.
resize
(
attention
.
asnumpy
(),
(
8
,
8
))
ax
=
fig
.
add_subplot
(
max_length
//
3
,
max_length
//
4
,
l
+
1
)
ax
.
set_title
(
dict
[
int
(
mx
.
nd
.
slice_axis
(
mx
.
nd
.
argmax
(
outputs
[
l
+
1
],
axis
=
1
),
axis
=
0
,
begin
=
0
,
end
=
1
).
asscalar
())])
img
=
ax
.
imshow
(
test_images
[
0
+
batch_size
*
(
batch_i
)])
img
=
ax
.
imshow
(
test_images
[
0
+
test_
batch_size
*
(
batch_i
)])
ax
.
imshow
(
attention_resized
,
cmap
=
'gray'
,
alpha
=
0.6
,
extent
=
img
.
get_extent
())
...
...
src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py
View file @
0072991d
...
...
@@ -354,7 +354,7 @@ class CNNSupervisedTrainer_CifarClassifierNetwork:
attention_resized
=
np
.
resize
(
attention
.
asnumpy
(),
(
8
,
8
))
ax
=
fig
.
add_subplot
(
max_length
//
3
,
max_length
//
4
,
l
+
1
)
ax
.
set_title
(
dict
[
int
(
labels
[
l
+
1
][
0
].
asscalar
())])
img
=
ax
.
imshow
(
train_images
[
0
+
batch_size
*
(
batch_i
)])
img
=
ax
.
imshow
(
train_images
[
0
+
test_
batch_size
*
(
batch_i
)])
ax
.
imshow
(
attention_resized
,
cmap
=
'gray'
,
alpha
=
0.6
,
extent
=
img
.
get_extent
())
...
...
@@ -406,7 +406,7 @@ class CNNSupervisedTrainer_CifarClassifierNetwork:
attention_resized
=
np
.
resize
(
attention
.
asnumpy
(),
(
8
,
8
))
ax
=
fig
.
add_subplot
(
max_length
//
3
,
max_length
//
4
,
l
+
1
)
ax
.
set_title
(
dict
[
int
(
mx
.
nd
.
slice_axis
(
mx
.
nd
.
argmax
(
outputs
[
l
+
1
],
axis
=
1
),
axis
=
0
,
begin
=
0
,
end
=
1
).
asscalar
())])
img
=
ax
.
imshow
(
test_images
[
0
+
batch_size
*
(
batch_i
)])
img
=
ax
.
imshow
(
test_images
[
0
+
test_
batch_size
*
(
batch_i
)])
ax
.
imshow
(
attention_resized
,
cmap
=
'gray'
,
alpha
=
0.6
,
extent
=
img
.
get_extent
())
...
...
src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py
View file @
0072991d
...
...
@@ -354,7 +354,7 @@ class CNNSupervisedTrainer_VGG16:
attention_resized
=
np
.
resize
(
attention
.
asnumpy
(),
(
8
,
8
))
ax
=
fig
.
add_subplot
(
max_length
//
3
,
max_length
//
4
,
l
+
1
)
ax
.
set_title
(
dict
[
int
(
labels
[
l
+
1
][
0
].
asscalar
())])
img
=
ax
.
imshow
(
train_images
[
0
+
batch_size
*
(
batch_i
)])
img
=
ax
.
imshow
(
train_images
[
0
+
test_
batch_size
*
(
batch_i
)])
ax
.
imshow
(
attention_resized
,
cmap
=
'gray'
,
alpha
=
0.6
,
extent
=
img
.
get_extent
())
...
...
@@ -406,7 +406,7 @@ class CNNSupervisedTrainer_VGG16:
attention_resized
=
np
.
resize
(
attention
.
asnumpy
(),
(
8
,
8
))
ax
=
fig
.
add_subplot
(
max_length
//
3
,
max_length
//
4
,
l
+
1
)
ax
.
set_title
(
dict
[
int
(
mx
.
nd
.
slice_axis
(
mx
.
nd
.
argmax
(
outputs
[
l
+
1
],
axis
=
1
),
axis
=
0
,
begin
=
0
,
end
=
1
).
asscalar
())])
img
=
ax
.
imshow
(
test_images
[
0
+
batch_size
*
(
batch_i
)])
img
=
ax
.
imshow
(
test_images
[
0
+
test_
batch_size
*
(
batch_i
)])
ax
.
imshow
(
attention_resized
,
cmap
=
'gray'
,
alpha
=
0.6
,
extent
=
img
.
get_extent
())
...
...
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