Deep Convolutional Neural Networks (AlexNet)

https://d2l.ai/chapter_convolutional-modern/alexnet.html

Grouped Convolutions:
Can you please include the concept of grouped convolutions that was introduced in the AlexNet paper. This would make the article more complete.

Hi thank you very much in advance for your help.

I have installed d2l and mxnet in a google collaboratory notebook as follows:
!pip install d2l --upgrade
!pip install -U --pre mxnet-cu101

I am trying to run the Alexnet code. I am getting an error when run the following code:

d2l.train_ch5(net, train_iter, test_iter, num_epochs, lr)

The error message is:

TypeError Traceback (most recent call last)
in ()
1 lr, num_epochs = 0.01, 10
----> 2 d2l.train_ch5(net, train_iter, test_iter, num_epochs, lr)

1 frames
/usr/local/lib/python3.6/dist-packages/d2l/d2l.py in accuracy(y_hat, y)
191 def accuracy(y_hat, y):
192 if y_hat.shape[1] > 1:
–> 193 return float((y_hat.argmax(axis=1) == y.astype(‘float32’)).sum())
194 else:
195 return float((y_hat.astype(‘int32’) == y.astype(‘int32’)).sum())

TypeError: float() argument must be a string or a number, not ‘NDArray’

Can you help please?

Thank you!

I am also facing the same issue. I dont know how to fix it.

Check my reply about this problem in an earlier chapter. The new version of d2l has already fixed it.