def test_attention_model(): params = [4, 4, 8, 8, 16] model = ResNet152(params, att=True) _ = model(sample_input) del model
def test_resnet(): params = [4, 4, 8, 8, 16] ResNet18(params) ResNet34(params) ResNet50(params) ResNet101(params) ResNet152(params)
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)