# Machine Learning

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

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

**Page:** 15

---

## [LIBSVM.jl is broken?](https://discourse.julialang.org/t/libsvm-jl-is-broken/100958)

<div class="topic-metadata">

**Author:** [@JunDamin](https://discourse.julialang.org/u/JunDamin)\
**Replies:** 4\
**Last updated:** [June 29, 2023, 6:49am UTC](https://discourse.julialang.org/t/libsvm-jl-is-broken/100958 "2023-06-29T06:49:05Z")

</div>

I am using LIBSVM.jl in julia 1.9.1. When I follow through algebra of graphics tutorial, julia crashed whenever I run fit! function with model. I tried many options like uninstalled and reinstall libsvm.jl, it still no…

---

## [Get gradients from network](https://discourse.julialang.org/t/get-gradients-from-network/100882)

<div class="topic-metadata">

**Author:** [@T\_J](https://discourse.julialang.org/u/T_J)\
**Replies:** 0\
**Last updated:** [June 27, 2023, 9:39am UTC](https://discourse.julialang.org/t/get-gradients-from-network/100882 "2023-06-27T09:39:26Z")

</div>

Hello, How can I check the gradients of the network in example Best Regards

---

## [Reproducing TF model with Flux- Slow?](https://discourse.julialang.org/t/reproducing-tf-model-with-flux-slow/100566)

<div class="topic-metadata">

**Author:** [@NAS](https://discourse.julialang.org/u/NAS)\
**Replies:** 2\
**Last updated:** [June 24, 2023, 3:42pm UTC](https://discourse.julialang.org/t/reproducing-tf-model-with-flux-slow/100566 "2023-06-24T15:42:39Z")

</div>

Hello everyone. I’m new to Flux and as an example to learn I’m just trying to reproduce an example TF model. So far it seems to be working but I have one major snag, the Flux training is orders of magnitude slower. For e…

---

## [Broadcast error in subtracting Matrix from Grads(...) object](https://discourse.julialang.org/t/broadcast-error-in-subtracting-matrix-from-grads-object/100757)

<div class="topic-metadata">

**Author:** [@Djamil\_Lakhdar-Hamin](https://discourse.julialang.org/u/Djamil_Lakhdar-Hamin)\
**Replies:** 0\
**Last updated:** [June 23, 2023, 7:59pm UTC](https://discourse.julialang.org/t/broadcast-error-in-subtracting-matrix-from-grads-object/100757 "2023-06-23T19:59:25Z")

</div>

Hi there , I am new to ML in Julia and loving it thus far. I am trying to evaluate a rather complex expression which is average of a gradient and some other stuff as well. I need the value of the final expression to ret…

---

## [Log automatic selection of sensitivity algorithm](https://discourse.julialang.org/t/log-automatic-selection-of-sensitivity-algorithm/100691)

<div class="topic-metadata">

**Author:** [@nina](https://discourse.julialang.org/u/nina)\
**Replies:** 1\
**Last updated:** [June 22, 2023, 9:48pm UTC](https://discourse.julialang.org/t/log-automatic-selection-of-sensitivity-algorithm/100691 "2023-06-22T21:48:19Z")

</div>

Dear all, I am training a universal differential equation with Zygote without specifying what sensitivity algorithm I am using. Hence, according to the SciMLSensitivity Docs a “smart polyalgorithm is used to automatical…

---

## [Mutation error in Zygote hessian](https://discourse.julialang.org/t/mutation-error-in-zygote-hessian/100705)

<div class="topic-metadata">

**Author:** [@Djamil\_Lakhdar-Hamin](https://discourse.julialang.org/u/Djamil_Lakhdar-Hamin)\
**Replies:** 2\
**Last updated:** [June 22, 2023, 7:04pm UTC](https://discourse.julialang.org/t/mutation-error-in-zygote-hessian/100705 "2023-06-22T19:04:02Z")

</div>

Hi there everyone , I am new to the Julia ML ecosystem and would like some help on a specific problem. I am operating with Julia v1.8, and Flux v0.13.16 . So I am minimizing a function , in fact this function is the gr…

---

## [\[SOLVED\] Models params not being updated during training](https://discourse.julialang.org/t/solved-models-params-not-being-updated-during-training/100634)

<div class="topic-metadata">

**Author:** [@Idalen](https://discourse.julialang.org/u/Idalen)\
**Replies:** 1\
**Last updated:** [June 21, 2023, 9:22pm UTC](https://discourse.julialang.org/t/solved-models-params-not-being-updated-during-training/100634 "2023-06-21T21:22:14Z")

</div>

I am trying to build a Temporal Convolution Network. First we define the Residual Block as main element of the network. Here is it: struct ResidualBlock{T} dilation::Int num\_channels::Int kernel\_size::Int …

---

## [How to load models from HuggingFace with Transformers.jl](https://discourse.julialang.org/t/how-to-load-models-from-huggingface-with-transformers-jl/100573)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 1\
**Last updated:** [June 20, 2023, 9:57am UTC](https://discourse.julialang.org/t/how-to-load-models-from-huggingface-with-transformers-jl/100573 "2023-06-20T09:57:16Z")

</div>

Hi All, I quite like the Transformers.jl. I do not aspire to train or finetune LLMs, but I am more interested in learning prompts. I am a bit lost with loading models from the HuggingFace. Here are few questions: Why…

---

## [Incorporating derivative term into loss for Flux.jl model](https://discourse.julialang.org/t/incorporating-derivative-term-into-loss-for-flux-jl-model/95231)

<div class="topic-metadata">

**Author:** [@YuriS](https://discourse.julialang.org/u/YuriS)\
**Replies:** 2\
**Last updated:** [June 20, 2023, 6:25am UTC](https://discourse.julialang.org/t/incorporating-derivative-term-into-loss-for-flux-jl-model/95231 "2023-06-20T06:25:59Z")

</div>

Hello! I am trying to incorporate a derivative term of the outputs with respect to one of the inputs in the loss of a neural network via Flux.jl, and I was hoping to get some help… I looked into a few posts online, but…

---

## [Error in Flux when calculating the gradient due to an in-place operation](https://discourse.julialang.org/t/error-in-flux-when-calculating-the-gradient-due-to-an-in-place-operation/100533)

<div class="topic-metadata">

**Author:** [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)\
**Replies:** 7\
**Last updated:** [June 19, 2023, 9:12am UTC](https://discourse.julialang.org/t/error-in-flux-when-calculating-the-gradient-due-to-an-in-place-operation/100533 "2023-06-19T09:12:40Z")

</div>

I’m diving into Flux.jl for my research. My objective is to define a loss function that would measure, so to speak, the convergence of the model towards a uniform data distribution. I generate K random fictitious observ…

---

## [Issue with Flux BatchNorm](https://discourse.julialang.org/t/issue-with-flux-batchnorm/100313)

<div class="topic-metadata">

**Author:** [@tchebycheff](https://discourse.julialang.org/u/tchebycheff)\
**Replies:** 2\
**Last updated:** [June 18, 2023, 12:22am UTC](https://discourse.julialang.org/t/issue-with-flux-batchnorm/100313 "2023-06-18T00:22:05Z")

</div>

A simple example with input as a 4 x 20 matrix (each feature vector has 4 elements). This is PyTorch BatchNorm1d, which has essentially the same default set-up as Flux BatchNorm i.e. affine = true, track\_stats = true, m…

---

## [What is the best machine learning framework in Julia that works with Metal.jl?](https://discourse.julialang.org/t/what-is-the-best-machine-learning-framework-in-julia-that-works-with-metal-jl/100351)

<div class="topic-metadata">

**Author:** [@janrpeters](https://discourse.julialang.org/u/janrpeters)\
**Replies:** 2\
**Last updated:** [June 16, 2023, 6:53am UTC](https://discourse.julialang.org/t/what-is-the-best-machine-learning-framework-in-julia-that-works-with-metal-jl/100351 "2023-06-16T06:53:57Z")

</div>

What is the best machine learning framework in Julia that works with Metal.jl?

---

## [Is there a way to impose a constraint on the output of a Flux neural network model?](https://discourse.julialang.org/t/is-there-a-way-to-impose-a-constraint-on-the-output-of-a-flux-neural-network-model/100250)

<div class="topic-metadata">

**Author:** [@schwob](https://discourse.julialang.org/u/schwob)\
**Replies:** 4\
**Last updated:** [June 15, 2023, 3:24pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-impose-a-constraint-on-the-output-of-a-flux-neural-network-model/100250 "2023-06-15T15:24:23Z")

</div>

Suppose that I have the observed data y\_i\\sim N(0,1/w(x\_i)), where x\_i=i for i=1,...,100. I define the true function w(x\_i)=(x\_i-50)^2 and hope to recover this function with a Flux neural network model. Let’s denote the…

---

## [MethodError: no method matching asprogress in UODE](https://discourse.julialang.org/t/methoderror-no-method-matching-asprogress-in-uode/100296)

<div class="topic-metadata">

**Author:** [@James\_Fernandez](https://discourse.julialang.org/u/James_Fernandez)\
**Replies:** 6\
**Last updated:** [June 14, 2023, 4:04pm UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-asprogress-in-uode/100296 "2023-06-14T16:04:10Z")

</div>

Hello, I am trying to train a UODE with an extended version of the lotka-voltera equations \[6 equations\] in sciML. However, I keep on getting the error: ┌ Warning: EnzymeVJP tried and failed in the automated AD choice…

---

## [Solving UDE segfaults or runs with poor performance](https://discourse.julialang.org/t/solving-ude-segfaults-or-runs-with-poor-performance/100074)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 7\
**Last updated:** [June 13, 2023, 11:19pm UTC](https://discourse.julialang.org/t/solving-ude-segfaults-or-runs-with-poor-performance/100074 "2023-06-13T23:19:10Z")

</div>

Hi, I’m trying to optimize an a circuit equations with an UDE, following this example from the sciml docs. U = Lux.Chain(Lux.Dense(3, 32, Lux.relu), Lux.Dense(32, 32, Lux.relu), Lux.Dense(32, 32, Lux.relu…

---

## [How to calculate the Hessian vector product in a Flux model?](https://discourse.julialang.org/t/how-to-calculate-the-hessian-vector-product-in-a-flux-model/100215)

<div class="topic-metadata">

**Author:** [@taizoooo](https://discourse.julialang.org/u/taizoooo)\
**Replies:** 1\
**Last updated:** [June 13, 2023, 8:42pm UTC](https://discourse.julialang.org/t/how-to-calculate-the-hessian-vector-product-in-a-flux-model/100215 "2023-06-13T20:42:26Z")

</div>

Hello. I implemented the Hessian vector product referring to the following link: Hessian Vector Products on GPU using ForwardDiff, Zygote, and Flux. The implementation works correctly on both CPU and GPU for a flux mod…

---

## [Running neural ODE on measurement](https://discourse.julialang.org/t/running-neural-ode-on-measurement/100179)

<div class="topic-metadata">

**Author:** [@Ordens\_Ritter](https://discourse.julialang.org/u/Ordens_Ritter)\
**Replies:** 7\
**Last updated:** [June 13, 2023, 6:33am UTC](https://discourse.julialang.org/t/running-neural-ode-on-measurement/100179 "2023-06-13T06:33:43Z")

</div>

I am trying get a neural ODE working, that doesn’t have a function/ode as input but a measurement. I want to apply the neural ODE to get the original function expressed by the measurement and not the derivative. I am t…

---

## [Modelling heating curves with a PINN](https://discourse.julialang.org/t/modelling-heating-curves-with-a-pinn/99521)

<div class="topic-metadata">

**Author:** [@Ordens\_Ritter](https://discourse.julialang.org/u/Ordens_Ritter)\
**Replies:** 6\
**Last updated:** [June 11, 2023, 1:32pm UTC](https://discourse.julialang.org/t/modelling-heating-curves-with-a-pinn/99521 "2023-06-11T13:32:25Z")

</div>

I am Trying to model some temperature curves with a physically informed NN (PINN). I the physical model I am trying to apply is an FOPDT. NN = Chain( Dense(1 =\> 32, tanh), Dense(32 =\> 32, tanh), Den…

---

## [Warning: Linking two modules of different target triples: 'bcloader' ... 'start'](https://discourse.julialang.org/t/warning-linking-two-modules-of-different-target-triples-bcloader-start/93864)

<div class="topic-metadata">

**Author:** [@albheim](https://discourse.julialang.org/u/albheim)\
**Replies:** 5\
**Last updated:** [June 10, 2023, 4:28am UTC](https://discourse.julialang.org/t/warning-linking-two-modules-of-different-target-triples-bcloader-start/93864 "2023-06-10T04:28:18Z")

</div>

Started getting the warnings warning: Linking two modules of different target triples: 'bcloader' is 'x86\_64-unknown-linux-gnu' whereas 'start' is 'x86\_64-linux-gnu' warning: Linking two modules of different target tri…

---

## [Translating from torch to Flux](https://discourse.julialang.org/t/translating-from-torch-to-flux/99847)

<div class="topic-metadata">

**Author:** [@isentropic](https://discourse.julialang.org/u/isentropic)\
**Replies:** 2\
**Last updated:** [June 7, 2023, 2:22am UTC](https://discourse.julialang.org/t/translating-from-torch-to-flux/99847 "2023-06-07T02:22:14Z")

</div>

(cross post from zulip) I’m a recent ML and flux learner currently trying to learn and translate GitHub - karpathy/makemore: An autoregressive character-level language model for making more things to Flux. I finished tr…

---

## [Zygote limitations: getindex of a DataFrame while training a PINN](https://discourse.julialang.org/t/zygote-limitations-getindex-of-a-dataframe-while-training-a-pinn/99967)

<div class="topic-metadata">

**Author:** [@Ordens\_Ritter](https://discourse.julialang.org/u/Ordens_Ritter)\
**Replies:** 1\
**Last updated:** [June 6, 2023, 10:16pm UTC](https://discourse.julialang.org/t/zygote-limitations-getindex-of-a-dataframe-while-training-a-pinn/99967 "2023-06-06T22:16:41Z")

</div>

I want to train a PINN. I decided, that I want to estimate the physical loss term at static, independent sample times. For each of the sample times, I have to look up result of the previous sample point, to estimate t…

---

## [How to perform an Off-Policy reinforcement learning using \`ReinforcementLearning.jl\`?](https://discourse.julialang.org/t/how-to-perform-an-off-policy-reinforcement-learning-using-reinforcementlearning-jl/99940)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 0\
**Last updated:** [June 6, 2023, 1:46pm UTC](https://discourse.julialang.org/t/how-to-perform-an-off-policy-reinforcement-learning-using-reinforcementlearning-jl/99940 "2023-06-06T13:46:45Z")

</div>

I am a beginner of both Julia and RL. Now I’m trying to training a Q-based tabular policy with off-policy strategy using ReinforcementLearning.jl. Let behavior\_policy be a RandomPolicy (for example) to collect experience…

---

## [Class imbalance in the predictors](https://discourse.julialang.org/t/class-imbalance-in-the-predictors/99927)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 3\
**Last updated:** [June 6, 2023, 12:12pm UTC](https://discourse.julialang.org/t/class-imbalance-in-the-predictors/99927 "2023-06-06T12:12:34Z")

</div>

Hello. I know we have to take care of class imbalance in the outcome variable. But what about class imbalance in the predictors? When is it important for our models?

---

## [Accelerating linear methods](https://discourse.julialang.org/t/accelerating-linear-methods/99685)

<div class="topic-metadata">

**Author:** [@Leticia-maria](https://discourse.julialang.org/u/Leticia-maria)\
**Replies:** 11\
**Last updated:** [June 3, 2023, 11:15pm UTC](https://discourse.julialang.org/t/accelerating-linear-methods/99685 "2023-06-03T23:15:57Z")

</div>

Dear Julia friends, I am benchmarking Julia for linear regression models and trying to optimize that for high-dimensional spaces. Any suggestions on the code below to reduce allocations and speed up the code? Thank you s…

---

## [Second Fick Law -- NeuralPDE](https://discourse.julialang.org/t/second-fick-law-neuralpde/99497)

<div class="topic-metadata">

**Author:** [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Replies:** 9\
**Last updated:** [June 3, 2023, 8:37pm UTC](https://discourse.julialang.org/t/second-fick-law-neuralpde/99497 "2023-06-03T20:37:34Z")

</div>

Hello everyone, I’m trying to solve Fick’s second law (1D), which is analogous to the thermal diffusion equation (or heat equation). Fick’s equation explains how a solute diffuses in a solvent. I was inspired by this c…

---

## [Use DataLoader in Flux DimensionMismatch](https://discourse.julialang.org/t/use-dataloader-in-flux-dimensionmismatch/99810)

<div class="topic-metadata">

**Author:** [@Ordens\_Ritter](https://discourse.julialang.org/u/Ordens_Ritter)\
**Replies:** 0\
**Last updated:** [June 3, 2023, 1:46pm UTC](https://discourse.julialang.org/t/use-dataloader-in-flux-dimensionmismatch/99810 "2023-06-03T13:46:38Z")

</div>

I am trying to train this tiny net in Flux: NN = Chain( Dense(2 =\> 16, tanh), Dense(16 =\> 16, tanh), Dense(16 =\> 1) ) |\> f64 I the data comes from a single DataFrame, that I mask, convert the temp to Kelvin and…

---

## [Speed up compilation with Zygote and PINN](https://discourse.julialang.org/t/speed-up-compilation-with-zygote-and-pinn/99652)

<div class="topic-metadata">

**Author:** [@Matthieu\_BARREAU](https://discourse.julialang.org/u/Matthieu_BARREAU)\
**Replies:** 4\
**Last updated:** [June 1, 2023, 1:01pm UTC](https://discourse.julialang.org/t/speed-up-compilation-with-zygote-and-pinn/99652 "2023-06-01T13:01:23Z")

</div>

Hi! I am relatively new to Julia and I am trying to move all my research projects to this new ecosystem instead of Python. However, I have trouble when my project deals with Physics informed neural network. Since I am …

---

## [Flux runs out of memory](https://discourse.julialang.org/t/flux-runs-out-of-memory/73046)

<div class="topic-metadata">

**Author:** [@sheevy](https://discourse.julialang.org/u/sheevy)\
**Replies:** 25\
**Last updated:** [June 1, 2023, 6:35am UTC](https://discourse.julialang.org/t/flux-runs-out-of-memory/73046 "2023-06-01T06:35:35Z")

</div>

I’m running training conv net on 2000x2000 pixel image with Flux/Zygote on RTX 3070 (mobile) with 8GB of RAM and I’m getting out of memory exception when gradients are calculated: ERROR: LoadError: Out of GPU memory try…

---

## [Training NN with Loss from Differential Equation](https://discourse.julialang.org/t/training-nn-with-loss-from-differential-equation/99669)

<div class="topic-metadata">

**Author:** [@Duarte\_Magano](https://discourse.julialang.org/u/Duarte_Magano)\
**Replies:** 0\
**Last updated:** [May 31, 2023, 12:09pm UTC](https://discourse.julialang.org/t/training-nn-with-loss-from-differential-equation/99669 "2023-05-31T12:09:56Z")

</div>

Hello! Say I have a differential equation of the form du/dt = NN(u), where NN(u) is the output of a neural network that takes as input the current value of u. The boundary condition is u(0) = 0. I want to train the ne…

---

## [Second derivative in Zygote returns nothing](https://discourse.julialang.org/t/second-derivative-in-zygote-returns-nothing/99624)

<div class="topic-metadata">

**Author:** [@jarroyoe](https://discourse.julialang.org/u/jarroyoe)\
**Replies:** 1\
**Last updated:** [May 31, 2023, 3:59am UTC](https://discourse.julialang.org/t/second-derivative-in-zygote-returns-nothing/99624 "2023-05-31T03:59:13Z")

</div>

I need to optimize a function that depends on the gradient of another function. When I run the following code: using Zygote data = rand(1,10) f(p,x) = \[x\*p\[1\];x\*p\[2\].+p\[3\]\] truef(x) = \[x.+1;2\*x\] function loss(p) …

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

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