# ML demo code

**URL:** <https://discourse.julialang.org/t/ml-demo-code/16547>\
**Category:** Machine Learning\
**Created:** [October 20, 2018, 2:34am UTC](https://discourse.julialang.org/t/ml-demo-code/16547 "2018-10-20T02:34:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![microlifecc](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Post date:** [October 20, 2018, 2:34am UTC](https://discourse.julialang.org/t/ml-demo-code/16547/1 "2018-10-20T02:34:43Z")

</div>

I am new to Machine Learning in Julia and am going through the tutorial [here](https://www.youtube.com/watch?v=21_wokgnNog). The code for the tutorial is [here](https://github.com/JuliaComputing/JuliaBoxTutorials/blob/master/more-advanced-materials/ML-demos/Metalhead.ipynb).

While trying to run the following line I am getting an error:

`Metalhead.imagenet_classes[rand(1:1000,1,1)]`

Error:

> UndefVarError: imagenet\_classes not defined

Any suggestions please?

Also are there any other good tutorials for machine learning and deep learning in Julia?

Thanks!!!

---

<div class="post-metadata">

**Author:** ![mcreel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcreel/32/30088_2.png) [@mcreel](https://discourse.julialang.org/u/mcreel)\
**Post date:** [October 20, 2018, 9:42am UTC](https://discourse.julialang.org/t/ml-demo-code/16547/2 "2018-10-20T09:42:26Z")

</div>

You need to add the Metalhead.jl package, and then add the line `using Metalhead`

---

<div class="post-metadata">

**Author:** ![microlifecc](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Post date:** [October 20, 2018, 11:34pm UTC](https://discourse.julialang.org/t/ml-demo-code/16547/3 "2018-10-20T23:34:22Z")

</div>

I have already done that. I am still getting the same error!  
Btw I am on Julia 0.6. Is that causing the problem?

---

<div class="post-metadata">

**Author:** ![SimonW](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SimonW](https://discourse.julialang.org/u/SimonW)\
**Post date:** [October 21, 2018, 12:10pm UTC](https://discourse.julialang.org/t/ml-demo-code/16547/4 "2018-10-21T12:10:46Z")

</div>

It looks like the tutorial is broken or is working inside JuliaBox only.

I get the same error with Julia v1.0.1. However, I think that we have to use `Metalhead.ImageNet.imagenet_labels` instead of `Metalhead.imagenet_classes`.

> Also are there any other good tutorials for machine learning and deep learning in Julia?

Unfortunately, most Julia tutorials still suffer from changes that are caused by Julia v1.0+.

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [October 21, 2018, 1:06pm UTC](https://discourse.julialang.org/t/ml-demo-code/16547/5 "2018-10-21T13:06:56Z")

</div>

> [@SimonW](#):
>
> Unfortunately, most Julia tutorials still suffer from changes that are caused by Julia v1.0+.

Yes, perhaps we should have a _ **Doctober** _ or _ **Upgradadoc** _ to root out all those vestigial relics of v.0.6-isms.

---

<div class="post-metadata">

**Author:** ![SimonW](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SimonW](https://discourse.julialang.org/u/SimonW)\
**Post date:** [October 21, 2018, 1:24pm UTC](https://discourse.julialang.org/t/ml-demo-code/16547/6 "2018-10-21T13:24:15Z")

</div>

Updating documentation is one thing. First, packages have to work with Julia v1.0+. There are many packages that look entirely deprecated, even inside Julia organizations. I started to list data science, machine learning and AI packages that still work and are not completely deprecated:  
[https://www.simonwenkel.com/2018/10/05/Julia-for-datascience-machine-learning-and-artificial-intelligence.html](https://www.simonwenkel.com/2018/10/05/Julia-for-datascience-machine-learning-and-artificial-intelligence.html)

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [October 21, 2018, 6:29pm UTC](https://discourse.julialang.org/t/ml-demo-code/16547/7 "2018-10-21T18:29:57Z")

</div>

I don’t have permission to access that page.

---

<div class="post-metadata">

**Author:** ![rickhg12hs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rickhg12hs/32/5926_2.png) [@rickhg12hs](https://discourse.julialang.org/u/rickhg12hs)\
**Post date:** [October 21, 2018, 7:00pm UTC](https://discourse.julialang.org/t/ml-demo-code/16547/8 "2018-10-21T19:00:19Z")

</div>

Let’s not “root out” v0.6 docs/packages/etc. Some of us are stuck with v0.6 for a while.

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [October 21, 2018, 7:07pm UTC](https://discourse.julialang.org/t/ml-demo-code/16547/9 "2018-10-21T19:07:58Z")

</div>

No, i think we should remove all obsolete and non-functional example code from 1.0 tutorials and documentation. You should be OK with earlier revisions should you choose to remain on an earlier system.

---

<div class="post-metadata">

**Author:** ![rickhg12hs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rickhg12hs/32/5926_2.png) [@rickhg12hs](https://discourse.julialang.org/u/rickhg12hs)\
**Post date:** [October 21, 2018, 7:09pm UTC](https://discourse.julialang.org/t/ml-demo-code/16547/10 "2018-10-21T19:09:21Z")

</div>

I think versioned documentation is appropriate. We already have it. Just the v1.0+ docs need to be updated.

We agree.
