Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LearningEnvironment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
Armin Co
LearningEnvironment
Commits
b39317dc
Commit
b39317dc
authored
4 years ago
by
Armin Co
Browse files
Options
Downloads
Patches
Plain Diff
New benchmarking configurations
Fixed GPU disabling.
parent
1b465405
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
environment_wrapper.py
+0
-4
0 additions, 4 deletions
environment_wrapper.py
networks.py
+4
-0
4 additions, 0 deletions
networks.py
run_scripts/benchmarks.py
+10
-2
10 additions, 2 deletions
run_scripts/benchmarks.py
with
14 additions
and
6 deletions
environment_wrapper.py
+
0
−
4
View file @
b39317dc
...
...
@@ -31,10 +31,6 @@ class Config:
def
conf_to_name
(
self
):
# 0. Allow GPU usage or force tensorflow to use the CPU.
if
self
.
force_cpu
:
os
.
environ
[
"
CUDA_DEVICE_ORDER
"
]
=
"
PCI_BUS_ID
"
os
.
environ
[
"
CUDA_VISIBLE_DEVICES
"
]
=
""
self
.
name
=
self
.
env_type
+
'
_
'
+
self
.
name
for
layer
in
self
.
net_layout
:
self
.
name
+=
'
_
'
+
str
(
layer
)
+
'
_
'
...
...
This diff is collapsed.
Click to expand it.
networks.py
+
4
−
0
View file @
b39317dc
import
os
from
keras
import
Sequential
from
keras.models
import
load_model
from
keras.layers
import
Dense
...
...
@@ -10,6 +11,9 @@ class QNet:
learn_rate
=
0.0005
def
__init__
(
self
,
conf
):
if
conf
.
force_cpu
:
os
.
environ
[
"
CUDA_DEVICE_ORDER
"
]
=
"
PCI_BUS_ID
"
os
.
environ
[
"
CUDA_VISIBLE_DEVICES
"
]
=
""
self
.
net
=
None
self
.
net
=
Sequential
()
self
.
compile_net
(
conf
)
...
...
This diff is collapsed.
Click to expand it.
run_scripts/benchmarks.py
+
10
−
2
View file @
b39317dc
...
...
@@ -23,9 +23,9 @@ smallNet.net_layout = [128, 32]
smallNet
.
conf_to_name
()
smallNetSlow
=
copy
.
deepcopy
(
c
)
smallNetSlow
.
name
=
'
SmallNet
Slow
'
smallNetSlow
.
name
=
'
SmallNet
'
smallNetSlow
.
net_layout
=
[
128
,
32
]
smallNetSlow
.
learn_rate
=
0.
0005
smallNetSlow
.
eps_decay
=
0.
9996
smallNetSlow
.
conf_to_name
()
smallNetDeep
=
copy
.
deepcopy
(
c
)
...
...
@@ -92,6 +92,12 @@ verryLittleNetDeep.name = 'VerryLittleNetDeep'
verryLittleNetDeep
.
net_layout
=
[
64
,
32
,
32
]
verryLittleNetDeep
.
conf_to_name
()
ThisHasToBeTooBig
=
copy
.
deepcopy
(
c
)
ThisHasToBeTooBig
.
name
=
'
ThisHasToBeTooBig
'
ThisHasToBeTooBig
.
force_cpu
=
False
ThisHasToBeTooBig
.
net_layout
=
[
4096
,
2048
]
ThisHasToBeTooBig
.
conf_to_name
()
lun
=
copy
.
deepcopy
(
c
)
lun
.
run_episodes
=
500
lun
.
name
=
'
NormalLunarDoubleNotSoMoreLearn
'
...
...
@@ -114,6 +120,8 @@ configuration = smallNetSlow
# configuration = deepNetSlowLearn
# configuration = smallNetDeepSlowLearn
# configuration = lun
configuration
=
ThisHasToBeTooBig
print
(
configuration
.
name
)
configuration
.
agent
=
QAgent
(
configuration
)
main
.
run
(
configuration
)
...
...
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