Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

60 minute blitz not wokring - trainimgs and valimgs not defined #322

Open
KronosTheLate opened this issue Nov 22, 2021 · 11 comments
Open

60 minute blitz not wokring - trainimgs and valimgs not defined #322

KronosTheLate opened this issue Nov 22, 2021 · 11 comments
Labels
bug call the vet help wanted

Comments

@KronosTheLate
Copy link
Contributor

From the 60-minute blitz:

using Statistics
using Flux, Flux.Optimise
using Images: channelview
using Metalhead
using Metalhead: trainimgs, valimgs
using Images.ImageCore
using Flux: onehotbatch, onecold, flatten
using Base.Iterators: partition

However, I get the following error:
image

So the example is not functional.

@KronosTheLate KronosTheLate changed the title trainimgs and valimgs not defined 60 minute blitz not wokring - trainimgs and valimgs not defined Nov 22, 2021
@DhairyaLGandhi
Copy link
Member

I think this is broken with the current Metalhead release. Could you try with [email protected]

@KronosTheLate
Copy link
Contributor Author

I just tried with the correct enviroment activated and instantiated. So the example works. But it should still be updated, right? To lower the barrier of entry - I am not sure if the people finding their way to the introduction all are comfortable with cloning Git-repos and juggling new enviroments in Julia.

@DhairyaLGandhi
Copy link
Member

DhairyaLGandhi commented Nov 23, 2021

Absolutely. I think this should be something we get back into metalhead, since it's good for user convenience, and the api looks right as well.

@KronosTheLate
Copy link
Contributor Author

Cool. Would it be too much to make an issue over there, asking for it to be added again, with a reference to this conversation?

@DhairyaLGandhi
Copy link
Member

Can do that. Ideally we wouldn't want to add more deps, but have an simple implementation for data preprocessing etc like we used to.

@darsnack
Copy link
Member

These functions already exist in MLDatasets.jl. Metalhead.jl was intentionally stripped down to just the models to reduce feature duplication across packages. Instead, the tutorial should be updated to use MLDatasets.jl.

@ToucheSir ToucheSir added bug call the vet help wanted labels Nov 23, 2021
@casasgomezuribarri
Copy link

using MLDatasets: trainimgs and using MLDatasets: valimgs do not work either

image

Also, running the line Metalhead.download(Metalhead.CIFAR10) gives an error too:

image

(Running Metalhead.download(CIFAR10) or Metalhead.download(MLDatasets.CIFAR10) returns an error

ERROR: LoadError: MethodError: no method matching download(::Module)

How can I go through the tutorial?

@DhairyaLGandhi
Copy link
Member

Use Metalhead v0.5

@casasgomezuribarri
Copy link

Doing

> ]add Metalhead@0.5
> using Metalhead: trainimgs 

returns the same error (Pkg.status says I'm using Metalhead v0.5.3)

Doing

> ]add Metalhead@0.5.0

returns an incompatibility error with Flux

ERROR: Unsatisfiable requirements detected for package Flux [587475ba]:
 Flux [587475ba] log:
 ├─possible versions are: 0.4.1-0.12.8 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.4.1-0.12.8
 ├─restricted by compatibility requirements with Metalhead [dbeba491] to versions: 0.10.0-0.10.4
 │ └─Metalhead [dbeba491] log:
 │   ├─possible versions are: 0.3.0-0.6.1 or uninstalled
 │   └─restricted to versions 0.5.0 by an explicit requirement, leaving only versions 0.5.0
 └─restricted by compatibility requirements with CuArrays [3a865a2d] to versions: [0.4.1-0.8.3, 0.11.0-0.12.8] or uninstalled — no versions left
   └─CuArrays [3a865a2d] log:
     ├─possible versions are: 0.2.1-2.2.2 or uninstalled
     └─restricted by julia compatibility requirements to versions: uninstalled

]rm Flux does not solve the problem

image

@ToucheSir
Copy link
Member

Simply changing the package name will not work. Please see the updated tutorial at https://fluxml.ai/tutorials/2020/09/15/deep-learning-flux.html.

@darsnack
Copy link
Member

using MLDatasets: trainimgs and using MLDatasets: valimgs do not work either

This should be using Metalhead.CIFAR10: traintensor, testtensor (or traindata/testdata to get the images + labels. The updated tutorial that @ToucheSir linked reflects this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug call the vet help wanted
Projects
None yet
Development

No branches or pull requests

5 participants