util¶
- util.setup_device(args)¶
Set the device for training and the default device is cuda:0. If torch.cuda is not available, use cpu instead.
- util.setup_seed(args)¶
Set random seed for python, numpy and torch.
- util.setup_current_time(args)¶
Set current time for .log file w.r.t differrent platforms.
- util.create_model_path(args)¶
Create the model folder and subfolders. Model folder contains five subfolders: checkpoint, lossfile, pic, data, log.
- util.setup_logging(args)¶
Initialize the settings for logging. The .log file will be saved in Model/your_model/log/.
- util.logging_args(args)¶
Show hyper-parameters in the header of log file.