Draft of fastai book

It does some random squishing by default too.

1 Like

Yes, in Colab use this function

    from google.colab import files
    uploaded = files.upload()

You can upload any filetypes also .obj for Pytorch3D http://www.bimhox.com/2020/03/15/pytorch3d-3d-deep-learning-in-architecture/

2 Likes

I also found these item not matching in the book. FYI

When this is available on Amazon, will there be a kindle version.
I’m happy to buy a physical book.
But with current state of the world, I think I have to wait a lot of time.
(Due to shipping issues around the world these days)

Yes I believe so.

1 Like

Awesome. Thanks.

Further down from in chapter 4 notebook of lesson 3 in the SGD section there is an area which may give confusion.

def train_epoch(model, lr, params):
    for xb,yb in dl:
        calc_grad(xb, yb, model)
        for p in params:
            p.data -= p.grad*lr
            p.grad.zero_() 

it seems we have a reference to a global variable dl in this method which may create confusion.

Perhaps put the method into a class initialised with dl etc so the relationship is explicit and run the methods of that class.

1 Like

Yes, the binary cross entropy loss is incorrect in the 06_multicat notebook.
I believe the correct loss is:

def binary_cross_entropy(inputs, targets):
inputs = inputs.sigmoid()
return -torch.where(targets==0, 1-inputs, inputs).log().mean()

The change is in the last line. It was:

    return -torch.where(targets==1, 1-inputs, inputs).log().mean()
1 Like