MNIST 텐서

    [Pytorch] 튜플 안에 텐서와 정수형, Tensor and int in tuple

    Pytorch Fashion MNIST 공부하면서 궁금한 점. 해결. figure = plt.figure(figsize=(9,9)) # plt.figure()는 맨 처음 나오는 경우가 많은데, figure()은 figure인스턴스를 생성하는데 그 역할은 이미지 전체의 영역을 확보하는 것이다. cols, rows = 3,3 for i in range(1, cols * rows + 1): #1부터 (3*3+1 -1)=9까지 반복 sample_idx = torch.randint(len(training_data), size=(1,)).item() #torch.randint = 주어진 범위 내의 정수를 균등하게 생성, 자료형은 torch.float32 img, label = training_data[sample_..