Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
hpvm-release
Commits
ef55d552
Commit
ef55d552
authored
5 years ago
by
Hashim Sharif
Browse files
Options
Downloads
Patches
Plain Diff
removing unused code from AlexNet Keras script
parent
7b244d48
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/projects/keras/src/alexnet.py
+0
-42
0 additions, 42 deletions
llvm/projects/keras/src/alexnet.py
with
0 additions
and
42 deletions
llvm/projects/keras/src/alexnet.py
+
0
−
42
View file @
ef55d552
...
@@ -27,9 +27,6 @@ from frontend.weight_utils import dumpHPVMToKerasModel
...
@@ -27,9 +27,6 @@ from frontend.weight_utils import dumpHPVMToKerasModel
class
AlexNet
(
Benchmark
):
class
AlexNet
(
Benchmark
):
#def __init__(self):
# self.name = "AlexNet"
def
lr_schedule
(
self
,
epoch
):
def
lr_schedule
(
self
,
epoch
):
...
@@ -82,35 +79,6 @@ class AlexNet(Benchmark):
...
@@ -82,35 +79,6 @@ class AlexNet(Benchmark):
def
buildModel_old
():
model
=
Sequential
()
model
.
add
(
Conv2D
(
128
,
kernel_size
=
(
3
,
3
),
activation
=
'
tanh
'
,
input_shape
=
(
3
,
32
,
32
),
padding
=
'
same
'
))
model
.
add
(
Conv2D
(
256
,
kernel_size
=
(
3
,
3
),
activation
=
'
tanh
'
,
padding
=
'
same
'
))
model
.
add
(
MaxPooling2D
(
pool_size
=
(
2
,
2
)))
#model.add(Dropout(0.25))
model
.
add
(
Conv2D
(
256
,
kernel_size
=
(
3
,
3
),
activation
=
'
tanh
'
,
padding
=
'
same
'
))
model
.
add
(
MaxPooling2D
(
pool_size
=
(
2
,
2
)))
model
.
add
(
Conv2D
(
256
,
kernel_size
=
(
3
,
3
),
activation
=
'
tanh
'
,
padding
=
'
same
'
))
model
.
add
(
MaxPooling2D
(
pool_size
=
(
2
,
2
)))
model
.
add
(
Conv2D
(
256
,
kernel_size
=
(
3
,
3
),
activation
=
'
tanh
'
,
padding
=
'
same
'
))
model
.
add
(
MaxPooling2D
(
pool_size
=
(
2
,
2
)))
#model.add(Dropout(0.25))
model
.
add
(
Flatten
())
#model.add(Flatten())
model
.
add
(
Dense
(
4096
,
activation
=
'
tanh
'
))
#model.add(Dropout(0.5))
model
.
add
(
Dense
(
2048
,
activation
=
'
tanh
'
))
model
.
add
(
Dense
(
10
,
activation
=
'
tanh
'
))
model
.
add
(
Activation
(
'
softmax
'
))
return
model
def
trainModel
(
self
,
model
):
def
trainModel
(
self
,
model
):
...
@@ -168,16 +136,6 @@ class AlexNet(Benchmark):
...
@@ -168,16 +136,6 @@ class AlexNet(Benchmark):
def
reloadKerasModel
(
model_path
):
model
=
load_model
(
model_path
)
score
=
model
.
evaluate
(
X_test
,
to_categorical
(
Y_test
,
10
),
verbose
=
0
)
print
(
'
Test loss2:
'
,
score
[
0
])
print
(
'
Test accuracy2:
'
,
score
[
1
])
def
data_preprocess
(
self
):
def
data_preprocess
(
self
):
(
X_train
,
Y_train
),
(
X_test
,
Y_test
)
=
cifar10
.
load_data
()
(
X_train
,
Y_train
),
(
X_test
,
Y_test
)
=
cifar10
.
load_data
()
...
...
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