示例#1
0
def test_attention_model():

    params = [4, 4, 8, 8, 16]
    model = ResNet152(params, att=True)
    _ = model(sample_input)

    del model
示例#2
0
def test_resnet():
    params = [4, 4, 8, 8, 16]
    ResNet18(params)
    ResNet34(params)
    ResNet50(params)
    ResNet101(params)
    ResNet152(params)
示例#3
0
def test_attention_model():
    params = [4, 4, 8, 8, 16]
    sample_input = torch.ones(size=(1, 3, 32, 32), requires_grad=False)
    model = ResNet152(params, att=True)
    sample_output = model(sample_input)
    print(sample_output)