本文整理汇总了Python中experiment_tools.wait_for_gpu函数的典型用法代码示例。如果您正苦于以下问题:Python wait_for_gpu函数的具体用法?Python wait_for_gpu怎么用?Python wait_for_gpu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wait_for_gpu函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
"""
Multilayer VAE + Pixel CNN
Ishaan Gulrajani + Faruk Ahmed
"""
import os, sys
sys.path.append(os.getcwd())
sys.path.append('/u/ahmedfar/my_fork/nn/')
try: # This only matters on Ishaan's computer
import experiment_tools
experiment_tools.wait_for_gpu(tf=True)
except ImportError:
pass
import tflib as lib
import tflib.debug
import tflib.train_loop
import tflib.ops.kl_unit_gaussian
import tflib.ops.kl_gaussian_gaussian
import tflib.ops.conv2d
import tflib.ops.deconv2d
import tflib.ops.linear
import tflib.mnist_binarized
import numpy as np
import tensorflow as tf
from tensorflow.python.ops import math_ops
import scipy.misc
from scipy.misc import imsave
示例2:
"""
Pixel RNN on MNIST
Ishaan Gulrajani
"""
import os, sys
sys.path.append(os.getcwd())
try: # This only matters on Ishaan's computer
import experiment_tools
experiment_tools.wait_for_gpu(high_priority=False)
except ImportError:
pass
import lib
import lib.train_loop
import lib.mnist_binarized
import lib.mnist_256ary
import lib.ops.conv2d
import lib.ops.diagonal_bilstm
import lib.ops.relu
import lib.ops.softmax_and_sample
import numpy as np
import theano
import theano.tensor as T
import scipy.misc
import lasagne
import functools
示例3: xrange
import os, sys
sys.path.append(os.getcwd())
N_GPUS = 1
try: # This only matters on Ishaan's computer
import experiment_tools
experiment_tools.wait_for_gpu(tf=True, n_gpus=N_GPUS)
except ImportError:
pass
import tflib as lib
import tflib.train_loop
import tflib.mnist
import tflib.ops.mlp
import numpy as np
import tensorflow as tf
import functools
LR = 1e-3
BATCH_SIZE = 100
DEVICES = ['/gpu:{}'.format(i) for i in xrange(N_GPUS)]
TIMES = {
'mode': 'iters',
'print_every': 1*500,
'stop_after': 100*500,
'test_every': 10*500
示例4:
"""
Train a PixCNN, then extract epsilons, then train a VAE on those.
Ishaan Gulrajani
"""
import os, sys
sys.path.append(os.getcwd())
try: # This only matters on Ishaan's computer
import experiment_tools
experiment_tools.wait_for_gpu(tf=True, n_gpus=1)
except ImportError:
pass
import tflib as lib
import tflib.debug
import tflib.train_loop_2
import tflib.ops.kl_unit_gaussian
import tflib.ops.kl_gaussian_gaussian
import tflib.ops.conv2d
import tflib.ops.deconv2d
import tflib.ops.linear
import tflib.ops.batchnorm
import tflib.ops.embedding
import tflib.lsun_bedrooms
import tflib.mnist_256
import tflib.small_imagenet
import numpy as np
import tensorflow as tf
示例5:
import os, sys
sys.path.append(os.getcwd())
try: # This only matters on Ishaan's computer
import experiment_tools
experiment_tools.wait_for_gpu()
except ImportError:
pass
import lasagne
import lib
import lib.lsun_downsampled
import lib.ops.gru
import lib.ops.linear
import lib.ops.lstm
import numpy as np
import theano
import theano.tensor as T
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
import time
# import tflib.save_images
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
BATCH_SIZE = 64
ITERS = 200000
DIM = 128
SEQ_LEN = 8
示例6:
"""
Multilayer VAE + Pixel CNN
Ishaan Gulrajani
"""
import os, sys
if 'ISHAAN_NN_LIB' in os.environ:
sys.path.append(os.environ['ISHAAN_NN_LIB'])
else:
sys.path.append(os.getcwd())
N_GPUS = 1
try: # This only matters on Ishaan's computer
import experiment_tools
experiment_tools.wait_for_gpu(tf=True, n_gpus=N_GPUS, skip=[3])
except ImportError:
pass
import tflib as lib
import tflib.debug
import tflib.train_loop_2
import tflib.ops.kl_unit_gaussian
import tflib.ops.kl_gaussian_gaussian
import tflib.ops.conv2d
import tflib.ops.deconv2d
import tflib.ops.linear
import tflib.ops.batchnorm
import tflib.ops.embedding
import tflib.lsun_bedrooms
示例7:
"""
RNN Speech Generation Model
Ishaan Gulrajani
"""
import os, sys
sys.path.append(os.getcwd())
try: # This only matters on Ishaan's computer
import experiment_tools
experiment_tools.register_crash_notifier()
experiment_tools.wait_for_gpu(high_priority=False, debug=True)
except ImportError:
pass
import numpy
numpy.random.seed(123)
import random
random.seed(123)
import dataset
import theano
import theano.tensor as T
import theano.tensor.nnet.neighbours
import theano.ifelse
import lib
import lasagne
import scipy.io.wavfile
import time