FluxML / fluxml.github.io

Flux Website
https://fluxml.ai
MIT License
20 stars 45 forks source link

Some syntax errors in tutorials #112

Closed ghost closed 2 years ago

ghost commented 2 years ago

I'm working through some of the tutorials and finding some syntax issues, for example in the multilayer perception on lines 62-63

function getdata(args)
    ...
    # Batching
    train_data = DataLoader(xtrain, ytrain, batchsize=args.batchsize, shuffle=true)
    test_data = DataLoader(xtest, ytest, batchsize=args.batchsize)
    ...
end

will throw a method error since DataLoader expects the first argument to be zip(xtrain,ytrain)

I think there are some other minor syntax issues as well.

ToucheSir commented 2 years ago

A similar fix was made in https://github.com/FluxML/model-zoo/pull/325, but I suppose nobody checked this tutorial then. Do you mind filing a PR?

Longer term, we should look into having the two repos sync so that every fix doesn't require changes in both.

logankilpatrick commented 2 years ago

@ToucheSir I think we are going to have @lilianabs working on this (making the model zoo sync)

ToucheSir commented 2 years ago

Fixed in https://github.com/FluxML/fluxml.github.io/pull/113, thanks @bringuiers!