torchvision

Gradually decay the weight of loss function

為{幸葍}努か 提交于 2019-12-22 10:53:52
问题 I am not sure is the right place to ask this question, feel free to tell me if I need to remove the post. I am quite new in pyTorch and currently working with CycleGAN (pyTorch implementation) as a part of my project and I understand most of the implementation of cycleGAN. I read the paper with the name ‘CycleGAN with better Cycles’ and I am trying to apply the modification which mentioned in the paper. One of modification is Cycle consistency weight decay which I don’t know how to apply.

How to get the filename of a sample from a DataLoader?

你离开我真会死。 提交于 2019-12-12 15:06:05
问题 I need to write a file with the result of the data test of a Convolutional Neural Network that I trained. The data include speech data collection. The file format needs to be "file name, prediction", but I am having a hard time to extract the file name. I load the data like this: import torchvision from torchvision import transforms from torch.utils.data import DataLoader TEST_DATA_PATH = ... trans = transforms.Compose([ transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,)) ])