Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When trying to change cifar-10 to cifar-100(In cifar-10-senet-18-mish) it raises RuntimeError: CUDA error: device-side assert triggered. #16

Closed
SkeletonOne opened this issue Nov 5, 2019 · 6 comments
Labels
bug Something isn't working torch Issues pertaining to torch implementation of Mish

Comments

@SkeletonOne
Copy link

When trying to change cifar-10 to cifar-100(In cifar-10-senet-18-mish), I try to change the code in the second cell like this:
def get_training_dataloader(train_transform, batch_size=128, num_workers=0, shuffle=True):
""" return training dataloader
Args:
train_transform: transfroms for train dataset
path: path to cifar100 training python dataset
batch_size: dataloader batchsize
num_workers: dataloader num_works
shuffle: whether to shuffle
Returns: train_data_loader:torch dataloader object
"""

transform_train = train_transform
cifar100_training = torchvision.datasets.CIFAR100(root='.', train=True, download=True, transform=transform_train)
cifar100_training_loader = DataLoader(
    cifar100_training, shuffle=shuffle, num_workers=num_workers, batch_size=batch_size)

return cifar100_training_loader

define test dataloader

def get_testing_dataloader(test_transform, batch_size=128, num_workers=0, shuffle=True):
""" return training dataloader
Args:
test_transform: transforms for test dataset
path: path to cifar100 test python dataset
batch_size: dataloader batchsize
num_workers: dataloader num_works
shuffle: whether to shuffle
Returns: cifar100_test_loader:torch dataloader object
"""

transform_test = test_transform
cifar100_test = torchvision.datasets.CIFAR100(root='.', train=False, download=True, transform=transform_test)
cifar100_test_loader = DataLoader(
    cifar100_test, shuffle=shuffle, num_workers=num_workers, batch_size=batch_size)

return cifar100_test_loader

However, it raises RuntimeError: CUDA error: device-side assert triggered.
Could you help me of how to do cifar-100?

Besides, I'd like to know how to use stats.ipynb...Thanks a lot!!!

@digantamisra98

@digantamisra98 digantamisra98 added bug Something isn't working torch Issues pertaining to torch implementation of Mish labels Nov 5, 2019
@digantamisra98
Copy link
Owner

Hi. Can you please tell me the environment in which you're running this code/ GPU on which the code is running. Or you can simply provide me the nvidia-smi output. I will try to replicate the error you had tomorrow. Regarding Stats.ipynb, you'll have to load in the results of your experiment in npz format to generate the graph. For the results shown, it was generated for the CalTech-256 dataset benchmark.

@SkeletonOne
Copy link
Author

@digantamisra98 Hi, thanks for your detailed reply. I was trying to run the notebook cifar-10-senet-18-mish, with a Ubuntu16.04+torch1.13+CUDA10.1+NVIDIA driver430.50, and on a 1080Ti GPU.

I am able to run the code on cifar-10 with its initial form, however when I'm trying to change the code on cifar-100, it raises the above error. I'm not quite sure how to implement on cifar-100, so I just try to change cifar-10 in the code to cifar-100, as it's shown above.

I tried to search for the error, somebody says that it's a category label number problem. However it is hard for me to solve it.

@digantamisra98
Copy link
Owner

@SkeletonOne have you changed the num_classes = 10 to 100 ?

@SkeletonOne
Copy link
Author

@digantamisra98 I just changed the class_num from 10 to 100 and it runs successfully. Thanks!

@SkeletonOne
Copy link
Author

@digantamisra98 A little more confusion... Could you give me a guidance of how to generate the .npz file for Caltech-256 dataset? I'd appreciate it a lot!

@digantamisra98
Copy link
Owner

You have to benchmark CalTech-256 dataset which is easily available on Kaggle and save the log files in npz format to use that notebook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working torch Issues pertaining to torch implementation of Mish
Projects
None yet
Development

No branches or pull requests

2 participants