mmpretrain icon indicating copy to clipboard operation
mmpretrain copied to clipboard

在终端输出中没有mode train只会打印mode val, 怎样设置才能打印mode train

Open xiaolifeimianbao opened this issue 2 years ago • 3 comments

举例例子,如下这种mode train 怎样设置终端才打印 {"mode": "train", "epoch": 1, "iter": 100, "lr": 0.01, "memory": 4745, "data_time": 0.42691, "loss": 6.9082, "top-1": 0.15234, "top-5": 0.57031, "time": 0.84829}

xiaolifeimianbao avatar May 10 '22 18:05 xiaolifeimianbao

Please use English or English & Chinese for issues so that we could have broader discussion.

mm-assistant[bot] avatar May 10 '22 18:05 mm-assistant[bot]

try to modify your head config, for example resnet50 head

head=dict(
        type='LinearClsHead',
        num_classes=1000,
        in_channels=2048,
        loss=dict(
            type='LabelSmoothLoss',
            label_smooth_val=0.1,
            num_classes=1000,
            reduction='mean',
            loss_weight=1.0),
        topk=(1, 5),
        cal_acc=True))

Ezra-Yu avatar May 16 '22 05:05 Ezra-Yu

数据集很小batchsize很大就不打印,可以在default_runtime.py里设置interval小一些 log_config = dict( interval=100, hooks=[ dict(type='TextLoggerHook'), # dict(type='TensorboardLoggerHook') ])

AlenLi817 avatar May 16 '22 06:05 AlenLi817