Change parameters

This commit is contained in:
Maciej Pęśko 2018-11-10 21:59:33 +01:00
parent 84872ed274
commit 31e0e8328a
3 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ class ComixGAN:
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), settings.COMIX_GAN_MODEL_PATH)
self.graph = tf.Graph()
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.8
config.gpu_options.per_process_gpu_memory_fraction = 0.6
config.gpu_options.allow_growth = True
self.session = tf.Session(graph=self.graph, config=config)
with self.graph.as_default():

View file

@ -16,7 +16,7 @@ class NeuralImageAssessment:
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), settings.NIMA_MODEL_PATH)
self.graph = tf.Graph()
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.8
config.gpu_options.per_process_gpu_memory_fraction = 0.6
config.gpu_options.allow_growth = True
self.session = tf.Session(graph=self.graph, config=config)
with self.graph.as_default():

View file

@ -51,7 +51,7 @@ class StyleTransfer():
with comixGAN.graph.as_default():
with comixGAN.session.as_default():
batch_size = 5
batch_size = 4
stylized_imgs = []
for i in range(0, len(frames), batch_size):
batch_of_frames = ((np.stack(frames[i:i + batch_size]) / 255) * 2) - 1