"vscode:/vscode.git/clone" did not exist on "fc2c81d3a64c587590b9c3c5f0470e51c4ff4b26"
resnet50-test.py 805 Bytes
Newer Older
renzhc's avatar
renzhc committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
_base_ = [
    'configs/_base_/models/resnet50.py', 'configs/_base_/datasets/tiny_imagenet_bs32.py',
    'configs/_base_/schedules/imagenet_bs256.py', 'configs/_base_/default_runtime.py'
]

import torch

torch.backends.cuda.matmul.allow_tf32=True
torch.backends.cudnn.allow_tf32=True

# optimizer
optim_wrapper = dict(
        #type='AmpOptimWrapper',
        #dtype='float16',
    optimizer=dict(type='SGD', lr=0.1, momentum=0.9, weight_decay=0.0001))

custom_hooks = [
        dict(type='ProfilerHook', by_epoch=False,
            profile_times=12,
            with_stack=True,
            with_flops=True,
            on_trace_ready=dict(type="log_trace", sort_by="self_cuda_time_total"),
            activity_with_cuda=True,
            schedule=dict(wait=1, warmup=1, active=10, repeat=1))
        ]