https://wjunsea.tistory.com/99

  1. define the __init __ and forward functions for BasicBlock to look like following

image.png

  1. instantiate two instances of BasicBlock inside __init __ function of class ResNet . The channels are specified for your convenience.

  2. Train the network for 20 epochs and paste the training graph here:

  3. Remove the residual connection, like the picture below.(you will need to modify the forward function of BasicBlock) retrain the model and see if performance has changed.

image.png

Residual Connection을 더하는것은 모든 상황에서 성능을 올리지 않습니다. 애초에 resnet 논문도 깊은 네트워크에서 학습의 안정성을 높인다고 했지, 저희와 같이 shallow 한 network에서도 성능향상을 가져온다는 취지가 아니었습니다.

Adding transforms

  1. VOCDataset의 __getitem __ 함수에 transformation을 적당한 걸로 두 개 더 추가해주세요. 아래 사이트에서 사용가능한 transform목록을 확인할 수 있습니다.

https://docs.pytorch.org/vision/0.8/transforms.html

trans = transforms.Compose([
    transforms.Resize((self.size, self.size)),
    **ADD YOUR TRANSFORMS HERE
    transforms.ToTensor(),
    transforms.Normalize(mean=[0.485, 0.457, 0.407], std=[0.5, 0.5, 0.5]),
])
  1. 어떤가요? 저보다 잘 나오신다면 어떻게 했는지 알려주세요!

image.png