Skip to content

Training model on cuda #180

@udion

Description

@udion

I wrote my own dataset to load MNIST data, The images are getting loaded, but these 2D images (i.e only 1 channel), this causes problem in torch.nn.Conv2d which expects a 4D Tensor, I tried loadin the images as 3D Tensor (32X32X1), but it still doesn't work and gives size mis-match error, please help.

This is the class for dataset:
image

This is the model:
image

This is the code throwing error(I understand the code for training isnt complete, i was just testing if it runs or not, and it doesnt):
image
image

Even if I load my data as 1X32X32, I still get the mismatch error as follows:
If dataset is changed to:
image

the error now is:
image
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions