PyTorch DataLoader shuffle

Issue I did an experiment and I did not get the result I was expecting. For the first part, I am using trainloader = torch.utils.data.DataLoader(trainset, batch_size=128, shuffle=False, num_workers=0) I save trainloader.dataset.targets to the variable a, and trainloader.dataset.data to the variable

Continue reading

I try to implement vggnet, but it does not be trained well

Issue I am new at CNN. I try to train vggnet. class Net(nn.Module) : def __init__(self) : super(Net, self).__init__() self.conv = nn.Sequential ( #1 ##### nn.Conv2d(3,64,3, padding=1), nn.ReLU(inplace=True), nn.Conv2d(64,64,3, padding=1),nn.ReLU(inplace=True), nn.MaxPool2d(2,2), #2 ##### nn.Conv2d(64,128,3, padding=1), nn.ReLU(inplace=True), nn.Conv2d(128,128,3, padding=1),nn.ReLU(inplace=True), nn.MaxPool2d(2,2), #####

Continue reading

PyTorch NN not training

Issue I have a bespoke NN model which works and wanted to move it to the PyTorch framework. However, the network is not training likely due to some misconfiguration. Please advise if you see something that is odd/wrong or could

Continue reading

Error during traning my model with pytorch, stack expects each tensor to be equal size

Issue I am using MMSegmentainon library to train my model for instance image segmentation, during the traingin, I craete the model(Vision Transformer) and when I try to train the model using this: I get this error: RuntimeError:CaughtRuntimeErrorinDataLoaderworkerprocess0.OriginalTraceback(mostrecentcalllast): File"/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py",line287,in _worker_loop data=fetcher.fetch(index)

Continue reading