Skip to content
Snippets Groups Projects
Commit b39317dc authored by Armin Co's avatar Armin Co
Browse files

New benchmarking configurations

Fixed GPU disabling.
parent 1b465405
Branches
No related tags found
No related merge requests found
......@@ -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) + '_'
......
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)
......
......@@ -23,9 +23,9 @@ smallNet.net_layout = [128, 32]
smallNet.conf_to_name()
smallNetSlow = copy.deepcopy(c)
smallNetSlow.name = 'SmallNetSlow'
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment