GAN tutorial in Pytorch #2

Again, I try to understand the code https://colab.research.google.com/drive/1E5ZQLKux4RXqYK2-kmcxfAolEgSzxFh4

What is cross entropy loss?

What is transform?

  • transforms.ToTensor()
    • 데이터 타입을 Tensor 형태로 변경
  • transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
    • 이미지의 경우 픽셀 값 하나는 0 ~ 255 값을 갖는다. 하지만 ToTensor()로 타입 변경시 0 ~ 1 사이의 값으로 바뀜.
    • transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))를 이용하여 -1 ~ 1사이의 값으로 normalized 시킴

What is difference between sigma and tanh?

The range of the tanh function is [-1,1] and that of the sigmoid function is [0,1]

REF

https://mjdeeplearning.tistory.com/81

https://wikidocs.net/35476

댓글 남기기

워드프레스닷컴으로 이처럼 사이트 디자인
시작하기