help='sample when decoding for generation') parser.add_argument('--log_interval', type=int, default=1, help='interval to log autoencoder training results') # Other parser.add_argument('--seed', type=int, default=1111, help='random seed') parser.add_argument('--cuda', dest='cuda', action='store_true', help='use CUDA') parser.add_argument('--no-cuda', dest='cuda', action='store_true', help='not using CUDA') parser.set_defaults(cuda=True) parser.add_argument('--device_id', type=str, default='0') # create default output file name args.outf = output_file_name(args.outf, "bleu") # make output directory if it doesn't already exist make_output_directory(args.outf) os.environ['CUDA_VISIBLE_DEVICES'] = args.device_id # Set the random seed manually for reproducibility. random.seed(args.seed) np.random.seed(args.seed) torch.manual_seed(args.seed) if torch.cuda.is_available(): if not args.cuda: print("WARNING: You have a CUDA device, " "so you should probably run with --cuda") else:
parser.add_argument('--cuda', dest='cuda', action='store_true', help='use CUDA') parser.add_argument('--no-cuda', dest='cuda', action='store_true', help='not using CUDA') parser.set_defaults(cuda=True) parser.add_argument('--device_id', type=str, default='0') args = parser.parse_args() args.data_path, # create default output file name args.outf = output_file_name(args.data_path, args.outf, "gelu-mlp") # make output directory if it doesn't already exist make_output_directory(args.data_path, args.outf) os.environ['CUDA_VISIBLE_DEVICES'] = args.device_id # Set the random seed manually for reproducibility. random.seed(args.seed) np.random.seed(args.seed) torch.manual_seed(args.seed) if torch.cuda.is_available(): if not args.cuda: print("WARNING: You have a CUDA device, " "so you should probably run with --cuda") else:
parser.add_argument('--seed', type=int, default=1111, help='random seed') parser.add_argument('--cuda', dest='cuda', action='store_true', help='use CUDA') parser.add_argument('--no-cuda', dest='cuda', action='store_true', help='not using CUDA') parser.set_defaults(cuda=True) parser.add_argument('--device_id', type=str, default='0') args = parser.parse_args() # create default output file name if no output args.outf = output_file_name(args.data_path, args.outf, "cnn") # make output directory if it doesn't already exist make_output_directory(args.outf) os.environ['CUDA_VISIBLE_DEVICES'] = args.device_id # Set the random seed manually for reproducibility. random.seed(args.seed) np.random.seed(args.seed) torch.manual_seed(args.seed) if torch.cuda.is_available(): if not args.cuda: print("WARNING: You have a CUDA device, " "so you should probably run with --cuda") else:
# Other parser.add_argument('--seed', type=int, default=1111, help='random seed') parser.add_argument('--cuda', dest='cuda', action='store_true', help='use CUDA') parser.add_argument('--no-cuda', dest='cuda', action='store_true', help='not using CUDA') parser.set_defaults(cuda=True) parser.add_argument('--device_id', type=str, default='0') # create default output file name args.outf = output_file_name(args.outf, "glove") # make output directory if it doesn't already exist make_output_directory(args.outf) os.environ['CUDA_VISIBLE_DEVICES'] = args.device_id # Set the random seed manually for reproducibility. random.seed(args.seed) np.random.seed(args.seed) torch.manual_seed(args.seed) if torch.cuda.is_available(): if not args.cuda: print("WARNING: You have a CUDA device, " "so you should probably run with --cuda") else:
help='interval to log autoencoder training results') # Other parser.add_argument('--seed', type=int, default=1111, help='random seed') parser.add_argument('--cuda', dest='cuda', action='store_true', help='use CUDA') parser.add_argument('--no-cuda', dest='cuda', action='store_true', help='not using CUDA') parser.set_defaults(cuda=True) parser.add_argument('--device_id', type=str, default='0') args = parser.parse_args() # create default output file name if no output args.outf = output_file_name(args.data_path, args.outf, "gelu_cnn1") # make output directory if it doesn't already exist make_output_directory(args.data_path, args.outf) # Set the random seed manually for reproducibility. random.seed(args.seed) np.random.seed(args.seed) torch.manual_seed(args.seed) if torch.cuda.is_available(): if not args.cuda: print("WARNING: You have a CUDA device, " "so you should probably run with --cuda") else: torch.cuda.manual_seed(args.seed)
parser.add_argument('--seed', type=int, default=1111, help='random seed') parser.add_argument('--cuda', dest='cuda', action='store_true', help='use CUDA') parser.add_argument('--no-cuda', dest='cuda', action='store_true', help='not using CUDA') parser.set_defaults(cuda=True) parser.add_argument('--device_id', type=str, default='0') args = parser.parse_args() # create default output file name if no output args.outf = output_file_name(args.data_path, args.outf, "gelu_cnn_model_summary") # make output directory if it doesn't already exist make_output_directory(args.data_path, args.outf) # Set the random seed manually for reproducibility. random.seed(args.seed) np.random.seed(args.seed) torch.manual_seed(args.seed) if torch.cuda.is_available(): if not args.cuda: print("WARNING: You have a CUDA device, " "so you should probably run with --cuda") else: torch.cuda.manual_seed(args.seed)