# Machine Learning

**URL:** https://discourse.julialang.org/c/domain/ml/24.md?page=54

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 55

---

## [Batching issues](https://discourse.julialang.org/t/batching-issues/16444)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 1\
**Last updated:** [October 17, 2018, 6:40pm UTC](https://discourse.julialang.org/t/batching-issues/16444 "2018-10-17T18:40:49Z")

</div>

Hi all, I’m trying to get my head around how Flux deals with batching. I can see how the mlp.jl example works in the model zoo - making one big batch using hcat, then using repeated((X,Y),200) to effectively go through …

---

## [Reinforcement Learning Package](https://discourse.julialang.org/t/reinforcement-learning-package/5113)

<div class="topic-metadata">

**Author:** [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Replies:** 2\
**Last updated:** [October 15, 2018, 8:36am UTC](https://discourse.julialang.org/t/reinforcement-learning-package/5113 "2018-10-15T08:36:57Z")

</div>

I started to write a julia package for reinforcement learning: https://jbrea.github.io/TabularReinforcementLearning.jl/latest/ Currently it contains a few algorithms for tabular environments and, on a separate branch, …

---

## [How to use crossentropy in a multi-class classification Flux.jl neural network?](https://discourse.julialang.org/t/how-to-use-crossentropy-in-a-multi-class-classification-flux-jl-neural-network/16140)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 3\
**Last updated:** [October 11, 2018, 10:18am UTC](https://discourse.julialang.org/t/how-to-use-crossentropy-in-a-multi-class-classification-flux-jl-neural-network/16140 "2018-10-11T10:18:37Z")

</div>

I am having trouble defining the crossentropy loss using Flux.jl. using Flux,StatsBase model = Flux.Chain( Dense(13\*16, 128, relu), Dense(128, 64, relu), Dense(64, 32, relu), Dense(32, 4, relu), softmax); l…

---

## [How to suppress printing of Flux.@epochs?](https://discourse.julialang.org/t/how-to-suppress-printing-of-flux-epochs/16063)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 3\
**Last updated:** [October 9, 2018, 11:36am UTC](https://discourse.julialang.org/t/how-to-suppress-printing-of-flux-epochs/16063 "2018-10-09T11:36:57Z")

</div>

Flux.@epochs prints out lots of info. How do I suppress its input totally? Current Suppressor.jl doesn’t work on v1.0.x so can’t use that. MWE using Flux model = Flux.Chain( Dense(14\*16+4, 128, relu), Dense(128…

---

## [How to convert Flux.jl's tracked values to just values](https://discourse.julialang.org/t/how-to-convert-flux-jls-tracked-values-to-just-values/16051)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [October 9, 2018, 4:13am UTC](https://discourse.julialang.org/t/how-to-convert-flux-jls-tracked-values-to-just-values/16051 "2018-10-09T04:13:57Z")

</div>

I have a Flux.jl tracked calculated value and I would like to convert it to Float64 for plotting. How do I do that? using Flux model = Flux.Chain( Dense(14\*16+4, 64, relu), Dense(64, 16, relu), Dense(16, 1, …

---

## [Question about how to train a neural network using Flux.jl](https://discourse.julialang.org/t/question-about-how-to-train-a-neural-network-using-flux-jl/16011)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [October 8, 2018, 10:01am UTC](https://discourse.julialang.org/t/question-about-how-to-train-a-neural-network-using-flux-jl/16011 "2018-10-08T10:01:09Z")

</div>

I am trying to build a neural network that has about 200 Boolean features as inputs and I would like to train it against a regression output (so the y is continuous). I tried to setup the network like so using Flux mode…

---

## [Knet vs MXNet for programmer new to ML](https://discourse.julialang.org/t/knet-vs-mxnet-for-programmer-new-to-ml/10073)

<div class="topic-metadata">

**Author:** [@tdh](https://discourse.julialang.org/u/tdh)\
**Replies:** 25\
**Last updated:** [October 6, 2018, 1:48pm UTC](https://discourse.julialang.org/t/knet-vs-mxnet-for-programmer-new-to-ml/10073 "2018-10-06T13:48:11Z")

</div>

I’m an old programmer, but new to deep learning. I’ve done a lot of reading and simple tutorials to get a handle on the basics. I was getting ready to start a deep dive on the MXNet and Gluon documentation and tutorials …

---

## [Object detecion with 10 lines of code](https://discourse.julialang.org/t/object-detecion-with-10-lines-of-code/11748)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 3\
**Last updated:** [October 3, 2018, 7:10am UTC](https://discourse.julialang.org/t/object-detecion-with-10-lines-of-code/11748 "2018-10-03T07:10:48Z")

</div>

This is a good article. Does anyone have a feel on how easy it would be to port to Julia? Looking at the github it makes use of many libraries which are already available in Julia

---

## [Knet 1.1.1 is out: performance improvements, new monitoring tools, new gpu memory manager](https://discourse.julialang.org/t/knet-1-1-1-is-out-performance-improvements-new-monitoring-tools-new-gpu-memory-manager/15745)

<div class="topic-metadata">

**Author:** [@denizyuret](https://discourse.julialang.org/u/denizyuret)\
**Replies:** 0\
**Last updated:** [October 1, 2018, 5:20pm UTC](https://discourse.julialang.org/t/knet-1-1-1-is-out-performance-improvements-new-monitoring-tools-new-gpu-memory-manager/15745 "2018-10-01T17:20:27Z")

</div>

Knet 1.1.0 introduced the new interface allowing the use of structs in models and callable objects for model / layer definitions. Knet 1.1.1 focuses on performance. There is a number of performance improvements the most…

---

## [Data spread over multiple files](https://discourse.julialang.org/t/data-spread-over-multiple-files/15464)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 3\
**Last updated:** [September 26, 2018, 4:55am UTC](https://discourse.julialang.org/t/data-spread-over-multiple-files/15464 "2018-09-26T04:55:45Z")

</div>

Hi, I would like to ask, if someone has dealt in principle manner with problem, where the data for machine learning is spread over several files. I have once defined an iterator, which takes loadfunction and list of fi…

---

## [Unexpected behavior of Flux.jl](https://discourse.julialang.org/t/unexpected-behavior-of-flux-jl/15460)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 0\
**Last updated:** [September 25, 2018, 9:21am UTC](https://discourse.julialang.org/t/unexpected-behavior-of-flux-jl/15460 "2018-09-25T09:21:39Z")

</div>

julia\> f(x) = 3x^2 + 2x +1 f (generic function with 1 method) julia\> Tracker.gradient(f,-2) ERROR: DomainError with log: -2.0 will only return a complex Is this documented somewhere and I’m missing it?

---

## [Julia/Knet deep learning tutorial available with free GPUs from Google Colab](https://discourse.julialang.org/t/julia-knet-deep-learning-tutorial-available-with-free-gpus-from-google-colab/15352)

<div class="topic-metadata">

**Author:** [@denizyuret](https://discourse.julialang.org/u/denizyuret)\
**Replies:** 6\
**Last updated:** [September 23, 2018, 3:29pm UTC](https://discourse.julialang.org/t/julia-knet-deep-learning-tutorial-available-with-free-gpus-from-google-colab/15352 "2018-09-23T15:29:53Z")

</div>

To try it out, please follow the instructions at https://github.com/denizyuret/Knet.jl/tree/dy/1.1/tutorial and let me know if anything does not work. Thanks @jekbradbury for figuring this out.

---

## [Flux - support for mini-batches](https://discourse.julialang.org/t/flux-support-for-mini-batches/14718)

<div class="topic-metadata">

**Author:** [@sheevy](https://discourse.julialang.org/u/sheevy)\
**Replies:** 2\
**Last updated:** [September 20, 2018, 7:13am UTC](https://discourse.julialang.org/t/flux-support-for-mini-batches/14718 "2018-09-20T07:13:56Z")

</div>

Hi, Does Flux.train! have support for mini-batches out of the box? If it does I couldn’t see it. Does it mean in need to restructure my data and rewrite the loss function to act on the mini-batch at once? Thanks

---

## [Julia's machine learning based on the PyCall mechanism](https://discourse.julialang.org/t/julias-machine-learning-based-on-the-pycall-mechanism/13840)

<div class="topic-metadata">

**Author:** [@sysk\_msk](https://discourse.julialang.org/u/sysk_msk)\
**Replies:** 2\
**Last updated:** [September 18, 2018, 12:50am UTC](https://discourse.julialang.org/t/julias-machine-learning-based-on-the-pycall-mechanism/13840 "2018-09-18T00:50:10Z")

</div>

As we all know, there are many Python machine learning resources freely available online.Thus I have researched how to easily use Python libraries with Julia. Here are some examples to explain the correct Calling Pose f…

---

## [Lasso/lars](https://discourse.julialang.org/t/lasso-lars/12937)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 12\
**Last updated:** [September 17, 2018, 2:56am UTC](https://discourse.julialang.org/t/lasso-lars/12937 "2018-09-17T02:56:32Z")

</div>

Is there a package with a LASSO/LARS algorithm? (I earlier used Lasso.jl, but it downgrades a bunch packages, so I am looking for something else.)

---

## [Announcement: Knet-1.1.0 and AutoGrad-1.1.0 have been released with callable object support](https://discourse.julialang.org/t/announcement-knet-1-1-0-and-autograd-1-1-0-have-been-released-with-callable-object-support/14913)

<div class="topic-metadata">

**Author:** [@denizyuret](https://discourse.julialang.org/u/denizyuret)\
**Replies:** 9\
**Last updated:** [September 14, 2018, 7:50pm UTC](https://discourse.julialang.org/t/announcement-knet-1-1-0-and-autograd-1-1-0-have-been-released-with-callable-object-support/14913 "2018-09-14T19:50:49Z")

</div>

I added support for the Flux style of defining models/layers as callable objects. struct Linear; w; b; end (m::Linear)(x) = m.w \* x .+ m.b This way a model/layer acts as a (predict) function as well as a collection of…

---

## [Is it possible to make something like TrueSkill with ForneyLab.jl?](https://discourse.julialang.org/t/is-it-possible-to-make-something-like-trueskill-with-forneylab-jl/14553)

<div class="topic-metadata">

**Author:** [@Lemniscate](https://discourse.julialang.org/u/Lemniscate)\
**Replies:** 2\
**Last updated:** [September 9, 2018, 7:36pm UTC](https://discourse.julialang.org/t/is-it-possible-to-make-something-like-trueskill-with-forneylab-jl/14553 "2018-09-09T19:36:37Z")

</div>

I’ve been trying to use ForneyLab.jl to run inference (using the sum-product algorithm and expectation propagation) for TrueSkill. I’ve run into a few issues: How can I add an indicator function (i.e. set y=+1 if d\>0 …

---

## [CFP: NIPS Workshop FEAP-AI4Fin 2018 (due 10/25)](https://discourse.julialang.org/t/cfp-nips-workshop-feap-ai4fin-2018-due-10-25/14556)

<div class="topic-metadata">

**Author:** [@jiahao](https://discourse.julialang.org/u/jiahao)\
**Replies:** 0\
**Last updated:** [September 4, 2018, 10:35pm UTC](https://discourse.julialang.org/t/cfp-nips-workshop-feap-ai4fin-2018-due-10-25/14556 "2018-09-04T22:35:34Z")

</div>

I’m happy to announce that the call for participation is now open for the NIPS 2018 Workshop on Challenges and Opportunities for AI in Financial Services: the Impact of Fairness, Explainability, Accuracy, and Privacy. …

---

## [Why the reshape in Flux mnist convolution example](https://discourse.julialang.org/t/why-the-reshape-in-flux-mnist-convolution-example/13973)

<div class="topic-metadata">

**Author:** [@hskramer](https://discourse.julialang.org/u/hskramer)\
**Replies:** 1\
**Last updated:** [August 25, 2018, 12:57am UTC](https://discourse.julialang.org/t/why-the-reshape-in-flux-mnist-convolution-example/13973 "2018-08-25T00:57:02Z")

</div>

I have learned to use most of the ML packages and I can compute the outcome of convolutions given kernel, stride pad…, but I don’t understand why or how to do a reshape when using Flux with convolutions and probably oth…

---

## [Flux v0.6.0: "MethodError: no method matching Flux.LSTMCell"](https://discourse.julialang.org/t/flux-v0-6-0-methoderror-no-method-matching-flux-lstmcell/13476)

<div class="topic-metadata">

**Author:** [@Joshua\_Bowles](https://discourse.julialang.org/u/Joshua_Bowles)\
**Replies:** 1\
**Last updated:** [August 18, 2018, 3:13am UTC](https://discourse.julialang.org/t/flux-v0-6-0-methoderror-no-method-matching-flux-lstmcell/13476 "2018-08-18T03:13:08Z")

</div>

Flux: Version 0.6.0 Julia: Version 0.7.0 Working through flux model zoo, lang-detection/model.jl:28, and trying to update to julia7. You can also reproduce the erorr by just Flux.LSTM(15,15) or Flux.LSTMCell(15, 15) f…

---

## [Flux for deep learning in particle physics](https://discourse.julialang.org/t/flux-for-deep-learning-in-particle-physics/13258)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 6\
**Last updated:** [August 16, 2018, 4:25pm UTC](https://discourse.julialang.org/t/flux-for-deep-learning-in-particle-physics/13258 "2018-08-16T16:25:15Z")

</div>

There is a CodaLab code competition for applying deep learning to particle physics https://competitions.codalab.org/competitions/19818#learn\_the\_details As I have a background in the field (see me? See a CERN PhD whic…

---

## [Autocategorization of bank expenses](https://discourse.julialang.org/t/autocategorization-of-bank-expenses/12732)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 3\
**Last updated:** [August 1, 2018, 8:08am UTC](https://discourse.julialang.org/t/autocategorization-of-bank-expenses/12732 "2018-08-01T08:08:10Z")

</div>

Continuing the discussion from Personal Finance package?: I want to automatically categorize bank expenses into about 25 different categories. I already have about 3000 expense-category pairs. Each expense is comprised …

---

## [How to Load images in either Knet or MXNet](https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677)

<div class="topic-metadata">

**Author:** [@hskramer](https://discourse.julialang.org/u/hskramer)\
**Replies:** 6\
**Last updated:** [July 27, 2018, 3:28am UTC](https://discourse.julialang.org/t/how-to-load-images-in-either-knet-or-mxnet/12677 "2018-07-27T03:28:48Z")

</div>

My images are from google street views 74K. I read and gone through every tutorial still can’t load an image. They are 50x50 rgb jpg images any help would be greatly appreciated.

---

## [Data-parallel training with conv nets in Julia](https://discourse.julialang.org/t/data-parallel-training-with-conv-nets-in-julia/12520)

<div class="topic-metadata">

**Author:** [@jstrube](https://discourse.julialang.org/u/jstrube)\
**Replies:** 4\
**Last updated:** [July 20, 2018, 6:28am UTC](https://discourse.julialang.org/t/data-parallel-training-with-conv-nets-in-julia/12520 "2018-07-20T06:28:24Z")

</div>

I have a problem that lends itself well to data-parallel training (see, e.g., CHEP 2018 Conference, Sofia, Bulgaria (9-13 July 2018): Scaling studies for deep learning in LArTPC event classification · Indico). I’ve been …

---

## [TensorFlow.jl installation problem](https://discourse.julialang.org/t/tensorflow-jl-installation-problem/7392)

<div class="topic-metadata">

**Author:** [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Replies:** 6\
**Last updated:** [July 15, 2018, 3:13am UTC](https://discourse.julialang.org/t/tensorflow-jl-installation-problem/7392 "2018-07-15T03:13:16Z")

</div>

When I install TensorFlow.jl under Julia 0.6.1 for 64 bit Windows I get this error: Fetching package metadata … Solving package specifications: . UnsatisfiableError: The following specifications were found to be in c…

---

## [Tensor regression models in Julia](https://discourse.julialang.org/t/tensor-regression-models-in-julia/11601)

<div class="topic-metadata">

**Author:** [@outlace](https://discourse.julialang.org/u/outlace)\
**Replies:** 5\
**Last updated:** [June 12, 2018, 6:21pm UTC](https://discourse.julialang.org/t/tensor-regression-models-in-julia/11601 "2018-06-12T18:21:27Z")

</div>

I’m trying to create a tensor regression model in Julia. I first tried in PyTorch but it was becoming a hassle so thought I’d give Julia a try, and its looking like Julia can’t do it at all (at least in any efficient way…

---

## [Higher order derivatives in Flux](https://discourse.julialang.org/t/higher-order-derivatives-in-flux/11051)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 3\
**Last updated:** [May 22, 2018, 3:08pm UTC](https://discourse.julialang.org/t/higher-order-derivatives-in-flux/11051 "2018-05-22T15:08:56Z")

</div>

As I understand it, Flux.jl does not support the calculation of higher-order derivatives as of yet (please correct me if I’m wrong). Are there any plans to support this in the future? I opened an issue a while back Flux.…

---

## [Mxnet strange BoundsError](https://discourse.julialang.org/t/mxnet-strange-boundserror/10807)

<div class="topic-metadata">

**Author:** [@han-so1omon](https://discourse.julialang.org/u/han-so1omon)\
**Replies:** 0\
**Last updated:** [May 9, 2018, 11:31pm UTC](https://discourse.julialang.org/t/mxnet-strange-boundserror/10807 "2018-05-09T23:31:06Z")

</div>

Training a network that outputs mxnet.NDArrays shape (27,1). I created a 3d array of labels of shape (27,1,210). Creation of data provider and subsequent training looks like the following: navDataIter = mx.ArrayDataPro…

---

## [TensorFlow.jl - Export/Import Meta Graph?](https://discourse.julialang.org/t/tensorflow-jl-export-import-meta-graph/9108)

<div class="topic-metadata">

**Author:** [@einem83](https://discourse.julialang.org/u/einem83)\
**Replies:** 2\
**Last updated:** [May 7, 2018, 9:14am UTC](https://discourse.julialang.org/t/tensorflow-jl-export-import-meta-graph/9108 "2018-05-07T09:14:47Z")

</div>

Hi experts i am struggling with exporting and importing a meta\_graph in TensorFlow.jl: tensorflow 1.4.0 TensorFlow.jl 0.8.0 julia 0.6.2 Here an example,. where i am struggling: using TensorFlow session = Session(Gr…

---

## [Hard-SVM in Julia](https://discourse.julialang.org/t/hard-svm-in-julia/10326)

<div class="topic-metadata">

**Author:** [@Paul\_McVay](https://discourse.julialang.org/u/Paul_McVay)\
**Replies:** 2\
**Last updated:** [April 16, 2018, 7:47pm UTC](https://discourse.julialang.org/t/hard-svm-in-julia/10326 "2018-04-16T19:47:15Z")

</div>

Is there any library that implements hard-SVM directly instead of soft-SVM? I looked at several libraries and they all seem to implement C-SVM or nu-SVM, something with the slack variables.

[Previous page](https://discourse.julialang.org/c/domain/ml/24.md?page=53)

[Next page](https://discourse.julialang.org/c/domain/ml/24.md?page=55)
