Commit 623d57c6 authored by zhiyang.zhou's avatar zhiyang.zhou

minor changes

parent ad22348f
......@@ -33,12 +33,14 @@ parser.add_argument('--log_interval', type=int, default=10, metavar='N',
args = parser.parse_args()
NUM_CLASSES = 8
use_cuda = not args.no_cuda and torch.cuda.is_available()
# GPU settings
GPUID = args.gpuid
os.environ["CUDA_VISIBLE_DEVICES"] = str(GPUID)
use_cuda = not args.no_cuda and torch.cuda.is_available()
torch.manual_seed(args.seed)
device = torch.device("cuda" if use_cuda else "cpu")
torch.manual_seed(1)
# settings
# model-saving dir setting
model_dir = args.model_dir
if not os.path.exists(model_dir):
os.makedirs(model_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment