CNN(Pytorch版)实现GTA5的自动驾驶——第三.0节(conf文件编写)

因为需要方法修改超参数,训练等数据,编写conf文件

import torch
class config():
    def __init__(self):
        self.BATCH_SIZE = 100
        self.BASE_PATH = "你的保存数据集的文件"
        self.DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
        self.LOAD_MODEL = False
        self.LEARNING_RATE = 4e-5
        self.NUM_EPOCHS = 30
        self.MODEL_NAME = [ 'resnet18', 'alexnet']
        self.AUG = "NO_AUG"
        self.WEIGHT_DECAY = 4e-5
        self.HEIGHT = 128
        self.train_test_rate = 0.3

posted @ 2021-12-20 21:50  Adam_lxd  阅读(328)  评论(0编辑  收藏  举报