Share Your Work - Assignment 3

The new notebook is giving some error:

in forward(self, xb)
10 out = xb.view(xb.size(0), -1)
11 # Get intermediate outputs using hidden layer
—> 12 out = self.linear1(xb)
13 # Apply activation function
14 out = F.relu(out)

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
548 result = self._slow_forward(*input, **kwargs)
549 else:
–> 550 result = self.forward(*input, **kwargs)
551 for hook in self._forward_hooks.values():
552 hook_result = hook(self, input, result)

/opt/conda/lib/python3.7/site-packages/torch/nn/modules/linear.py in forward(self, input)
85
86 def forward(self, input):
—> 87 return F.linear(input, self.weight, self.bias)
88
89 def extra_repr(self):

/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py in linear(input, weight, bias)
1610 ret = torch.addmm(bias, input, weight.t())
1611 else:
-> 1612 output = input.matmul(weight.t())
1613 if bias is not None:
1614 output += bias

RuntimeError: size mismatch, m1: [24576 x 32], m2: [3072 x 500] at /opt/conda/conda-bld/pytorch_1587428398394/work/aten/src/THC/generic/THCTensorMathBlas.cu:283

Whats your model architecture?
There’s some problem with input sizes.

Generally when you get a mismatch error all you have to care about is b = c

m1 is [a x b] which is [batch size x in features]

m2 is [c x d] which is [in features x out features]

Thanks. I restarted and the problem seems to have gone away. Thanks for your reply.

Here is my attempt for assignment 3: Assignment 3 Notebook. I have tried different architectures(3,4,5 layer) but the test accuracy is around 50%. Its like the model don’t want learn anymore. :slight_smile:

1 Like

Hello guys, just want to ask a silly question how do i get the
DATASET_URL from kaggle ? Because what I normal did is open a notebook in kaggle .
Can anyone help ahha

Here is the link to my assignment 3.
I tried adding more hidden layers and tried different learning rates. I could not get beyond 52%. The more epochs I gave, the more it stayed constant. So I don’t think increasing epoch will help here.

Please check and provide feedback if any.

1 Like

Here is a link: https://medium.com/analytics-vidhya/how-to-fetch-kaggle-datasets-into-google-colab-ea682569851a. I am assuming you want to use Kaggle data in Colab.

2 Likes

Alright, thanks ya. I guess is the same thing using jovian.ml notebook

I still unable to get the dataset_url from kaggel

Hi, Aakashns,

Using Kaggle, I could not download the dataset at all, I don’t know how to go around this step
dataset = CIFAR10(root=‘data/’, download=True, transform=ToTensor())
test_dataset = CIFAR10(root=‘data/’, train=False, transform=ToTensor())

They failed again and again.

tao

Here’s the link to my work!
https://jovian.ml/akashravichandran/03-cifar10-feedforward

Finally, by linking google account to Kaggle and add the cloudstorage and ml functions, the code works now.
Thanks,
tao

Hi,

Find my notebook
Coudn’t get past 56% accuracy.
Will try tuning more.

Any suggestions?

1 Like

A post was merged into an existing topic: Share your work : June 1 - June 7

Hi guys, check out my assignment:
cifar-neuralnet-final.

I have tried with to create two models with different architectures, the first one gives an accuracy of appx 40% and second model with 3 convulational layers added gives me an accuracy of 70%

Now I am working on my blog. Stay tuned :v:t2:

2 Likes

Here is my assignment 3, achieving over 50% accuracy in the end, with only 4 hidden layers

1 Like

Hello everyone, I am working on the titanic data from kaggle competition, can any one suggest me how can I increase the accuracy further, I am currently at 0.84

Yes Vijay, you are absolutely correct. I should’ve been more alert since my validation accuracy and testing accuracy were the same. :sweat_smile:

2 Likes

Check your notebooks (versions) . The code is not getting reflected in the cells.