def parser_(desc):
parser = ap.ArgumentParser(description=desc)
parser.add_argument(
'--mgpu', action='store', nargs='?', type=int,
const=-1, # if mgpu is specified but value not provided then -1
# if mgpu is not specified then defaults to 0 - single gpu
# mgpu = 0 if getattr(args, 'mgpu', None) is None else args.mgpu
default=ap.SUPPRESS,
help='Run on multiple-GPUs using all available GPUs on a system.\n'
'If not passed does not use multiple GPU. If passed uses all GPUs.\n'
'Optionally specify a number to use that many GPUs. Another\n'
'approach is to specify CUDA_VISIBLE_DEVICES=0,1,... when calling\n'
'script and specify --mgpu to use this specified device list.\n'
'This option is only supported with TensorFlow backend.\n')
parser.add_argument('--epochs', type=int, default=5,
help='Number of epochs to run training for.')
args = parser.parse_args()
return args
variational_autoencoder_deconv_mgpu.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录