Hi K. Frank,
I want to do a multi-label (multiple class) problem
one sample can belong to more than 1 class
so this means [1. 0. 1. 0. 0. 0. 1. 0. 0. 0. 0. 0. 0. 0. 0.] that the sample belongs to 3 classes
(tensor([[[-1.9000, -1.9000, -1.9000,  …, -1.9000, -1.9000, -1.9000],
[-1.9000, -1.9000, -1.9000,  …, -1.8826, -1.8826, -1.8826],
[-1.9000, -1.9000, -1.9000,  …, -1.8826, -1.8826, -1.8826],
…,
[ 0.2864,  0.5467,  0.6334,  …, -0.5118, -0.4771, -0.5465],
[ 0.2864,  0.5293,  0.6508,  …, -0.5292, -0.4597, -0.5118],
[ 0.0955,  0.2864,  0.4079,  …, -0.6506, -0.5986, -0.6159]]]), array([0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 1., 0., 0., 0.],
dtype=float32), ‘00001250_006.png’)
this is a tuple(input_img tensor, output_vector, image_id)
Image type and shape => <class ‘torch.Tensor’> torch.Size([1, 224, 224])
Output type and shape =><class ‘numpy.ndarray’> (15,)
Image id/imgindex(name of the image file) type=><class ‘str’>
(1): BasicBlock(
(conv1): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
(bn1): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(relu): ReLU(inplace=True)
(conv2): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
(bn2): BatchNorm2d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
)
)
(avgpool): AdaptiveAvgPool2d(output_size=(1, 1))
(fc): Linear(in_features=512, out_features=15, bias=True)
)
Last layers of Resnet