forked from prehistoric-systems/comixify
Add 2 workers at the same time
This commit is contained in:
parent
ffc6b2dc28
commit
ae6f8b68c5
4 changed files with 4 additions and 4 deletions
|
|
@ -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.6
|
||||
config.gpu_options.per_process_gpu_memory_fraction = 0.30
|
||||
config.gpu_options.allow_growth = True
|
||||
self.session = tf.Session(graph=self.graph, config=config)
|
||||
with self.graph.as_default():
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
start (){
|
||||
gunicorn --bind :8008 settings.wsgi:application --timeout 300
|
||||
gunicorn --bind :8008 settings.wsgi:application --timeout 300 --workers 2
|
||||
}
|
||||
|
||||
migrate (){
|
||||
|
|
|
|||
|
|
@ -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.6
|
||||
config.gpu_options.per_process_gpu_memory_fraction = 0.2
|
||||
config.gpu_options.allow_growth = True
|
||||
self.session = tf.Session(graph=self.graph, config=config)
|
||||
with self.graph.as_default():
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class StyleTransfer():
|
|||
|
||||
with comixGAN.graph.as_default():
|
||||
with comixGAN.session.as_default():
|
||||
batch_size = 4
|
||||
batch_size = 2
|
||||
stylized_imgs = []
|
||||
for i in range(0, len(frames), batch_size):
|
||||
batch_of_frames = ((np.stack(frames[i:i + batch_size]) / 255) * 2) - 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue