# Machine Learning

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

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

**Page:** 12

---

## [Splitting and joining Flux model chains](https://discourse.julialang.org/t/splitting-and-joining-flux-model-chains/34636)

<div class="topic-metadata">

**Author:** [@fastwave](https://discourse.julialang.org/u/fastwave)\
**Replies:** 4\
**Last updated:** [December 1, 2023, 3:49pm UTC](https://discourse.julialang.org/t/splitting-and-joining-flux-model-chains/34636 "2023-12-01T15:49:54Z")

</div>

I would like to create a Flux model that splits the input into two, processes it in two different ways and then joins it together using a model. Chain does not seem to allow parallel data paths. The diagram is here:Netwo…

---

## [LSTM training for a sequence of multiple features using a batch size 30](https://discourse.julialang.org/t/lstm-training-for-a-sequence-of-multiple-features-using-a-batch-size-30/63238)

<div class="topic-metadata">

**Author:** [@reemmasoud123](https://discourse.julialang.org/u/reemmasoud123)\
**Replies:** 10\
**Last updated:** [November 22, 2023, 11:18am UTC](https://discourse.julialang.org/t/lstm-training-for-a-sequence-of-multiple-features-using-a-batch-size-30/63238 "2023-11-22T11:18:34Z")

</div>

I am trying to do batch training using LSTM for a time series data with multiple features. Assuming I have 5000 samples and 5 features for each sample. The input uses 14 days into the past and the output is a single val…

---

## [Saving a Flux ML model in a keras compatible format](https://discourse.julialang.org/t/saving-a-flux-ml-model-in-a-keras-compatible-format/106452)

<div class="topic-metadata">

**Author:** [@gradureau](https://discourse.julialang.org/u/gradureau)\
**Replies:** 1\
**Last updated:** [November 20, 2023, 6:06pm UTC](https://discourse.julialang.org/t/saving-a-flux-ml-model-in-a-keras-compatible-format/106452 "2023-11-20T18:06:16Z")

</div>

Hey everyone, I am now using Flux to train my model and the goal is to exploit these models in fortran. So far I have seen that there is a fortran library that is called neural-fortran that enables to use a neural netwo…

---

## [Unable to evaluate inputs comprising columns of either String or Int type: convert error](https://discourse.julialang.org/t/unable-to-evaluate-inputs-comprising-columns-of-either-string-or-int-type-convert-error/106035)

<div class="topic-metadata">

**Author:** [@wilhansen](https://discourse.julialang.org/u/wilhansen)\
**Replies:** 8\
**Last updated:** [November 16, 2023, 2:30pm UTC](https://discourse.julialang.org/t/unable-to-evaluate-inputs-comprising-columns-of-either-string-or-int-type-convert-error/106035 "2023-11-16T14:30:29Z")

</div>

Hi, I’m trying out MLJ to do decision tree regression where the inputs are categorical that are either string or ints. Below is the schema of the input (origin and destination are h3 hashes). ┌─────────────┬────────────…

---

## [Using a Neural Network to predict the parameters of a optimization Problem](https://discourse.julialang.org/t/using-a-neural-network-to-predict-the-parameters-of-a-optimization-problem/106209)

<div class="topic-metadata">

**Author:** [@Mkloster](https://discourse.julialang.org/u/Mkloster)\
**Replies:** 6\
**Last updated:** [November 15, 2023, 4:54pm UTC](https://discourse.julialang.org/t/using-a-neural-network-to-predict-the-parameters-of-a-optimization-problem/106209 "2023-11-15T16:54:14Z")

</div>

Hello, i’m trying to use a neural network to predict the best parameters for a optimization problem. For this first my modell should predict some parameters based of some information i have about my optimization problem…

---

## [Zygote, Flux, and Interpolations](https://discourse.julialang.org/t/zygote-flux-and-interpolations/61824)

<div class="topic-metadata">

**Author:** [@kiranshila](https://discourse.julialang.org/u/kiranshila)\
**Replies:** 6\
**Last updated:** [November 14, 2023, 9:54pm UTC](https://discourse.julialang.org/t/zygote-flux-and-interpolations/61824 "2023-11-14T21:54:53Z")

</div>

Hey everyone! I’m working on radio telescope imaging and am trying to do image reconstruction with an iterative, maximum entropy method. Many papers suggest using conjugate gradient, and have intricate derivations of gr…

---

## [Solving multiple ODE concurrently](https://discourse.julialang.org/t/solving-multiple-ode-concurrently/106084)

<div class="topic-metadata">

**Author:** [@sand2](https://discourse.julialang.org/u/sand2)\
**Replies:** 3\
**Last updated:** [November 13, 2023, 5:46pm UTC](https://discourse.julialang.org/t/solving-multiple-ode-concurrently/106084 "2023-11-13T17:46:58Z")

</div>

Hi, I would like to solve several ODE’s with contribution from a neural network concurrently. I have the following (not working) example. using StableRNGs using ComponentArrays using Zygote, Lux, OrdinaryDiffEq, SciML…

---

## [Autodiff compatible least squares package](https://discourse.julialang.org/t/autodiff-compatible-least-squares-package/106115)

<div class="topic-metadata">

**Author:** [@RahulManavalan](https://discourse.julialang.org/u/RahulManavalan)\
**Replies:** 1\
**Last updated:** [November 12, 2023, 3:55pm UTC](https://discourse.julialang.org/t/autodiff-compatible-least-squares-package/106115 "2023-11-12T15:55:54Z")

</div>

Greetings. I am searching for a Julia package, that can emulate pinv(A) from LinearAlgebra.jl but has an all Julia implementation to leverage the AD ecosystem to evaluate the gradients with respect to the parameters use…

---

## [Gradient of neural network parameters used inside of SMC simulation](https://discourse.julialang.org/t/gradient-of-neural-network-parameters-used-inside-of-smc-simulation/105967)

<div class="topic-metadata">

**Author:** [@YSanchezAraujo](https://discourse.julialang.org/u/YSanchezAraujo)\
**Replies:** 4\
**Last updated:** [November 9, 2023, 6:58pm UTC](https://discourse.julialang.org/t/gradient-of-neural-network-parameters-used-inside-of-smc-simulation/105967 "2023-11-09T18:58:28Z")

</div>

I’m working on implementing variational sequential monte carlo as per this paper A simplified version of the set of functions I’m using are: using Optimisers, Flux, ForwardDiff, Distributions, ...; # samples pa…

---

## [Novel method for feature importance using ReverseMode + ForwardMode autodiff?](https://discourse.julialang.org/t/novel-method-for-feature-importance-using-reversemode-forwardmode-autodiff/105837)

<div class="topic-metadata">

**Author:** [@nielsls](https://discourse.julialang.org/u/nielsls)\
**Replies:** 4\
**Last updated:** [November 7, 2023, 8:04am UTC](https://discourse.julialang.org/t/novel-method-for-feature-importance-using-reversemode-forwardmode-autodiff/105837 "2023-11-07T08:04:33Z")

</div>

Using a combination of reverse- and forward-mode autodiff I have come across a highly efficient method for attributing the change in a differentiable scalar-valued function f: R^N-\>R^1 (e.g. a neural network) to the inpu…

---

## [Transform several columns of an MLJ model using one transformer](https://discourse.julialang.org/t/transform-several-columns-of-an-mlj-model-using-one-transformer/105338)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 13\
**Last updated:** [November 2, 2023, 1:02am UTC](https://discourse.julialang.org/t/transform-several-columns-of-an-mlj-model-using-one-transformer/105338 "2023-11-02T01:02:39Z")

</div>

Is there an easy way to transform several columns of a table using the same MLJ transformer? So if I have a transformer like UnivariateBoxCoxTransformer, I’d like to apply it only to columns 2, 3, and 4. Alternatively, …

---

## [Fitting a multiple input Flux.jl model with learning networks in MLJ.jl](https://discourse.julialang.org/t/fitting-a-multiple-input-flux-jl-model-with-learning-networks-in-mlj-jl/105597)

<div class="topic-metadata">

**Author:** [@boutor2](https://discourse.julialang.org/u/boutor2)\
**Replies:** 4\
**Last updated:** [November 1, 2023, 3:54am UTC](https://discourse.julialang.org/t/fitting-a-multiple-input-flux-jl-model-with-learning-networks-in-mlj-jl/105597 "2023-11-01T03:54:25Z")

</div>

Hey there, I have tried to use MLJ.jl to fit a Flux model that takes in multiple inputs. While Flux.jl documentation demonstrates how to build such a model, I unfortunately cannot make it work within MLJ. Here is a MWE,…

---

## [How do I retain model parameters while freezing layers with Lux.jl](https://discourse.julialang.org/t/how-do-i-retain-model-parameters-while-freezing-layers-with-lux-jl/105558)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 3\
**Last updated:** [October 31, 2023, 1:52pm UTC](https://discourse.julialang.org/t/how-do-i-retain-model-parameters-while-freezing-layers-with-lux-jl/105558 "2023-10-31T13:52:28Z")

</div>

I am very interested in the example given in the doc Freezing Model Parameters | LuxDL Docs. However, in that example, the parameters are obtained from ps, st = Lux.setup(rng, model\_frozen) I find there is no convenien…

---

## [Custom environment with continuous state and action spaces](https://discourse.julialang.org/t/custom-environment-with-continuous-state-and-action-spaces/105595)

<div class="topic-metadata">

**Author:** [@hicham\_henna](https://discourse.julialang.org/u/hicham_henna)\
**Replies:** 0\
**Last updated:** [October 30, 2023, 7:58pm UTC](https://discourse.julialang.org/t/custom-environment-with-continuous-state-and-action-spaces/105595 "2023-10-30T19:58:58Z")

</div>

how to implement a custom environment with continuous state and action spaces in the reinforcement learning framework under Julia? for example, to control the attitude of satellite we need the definition of: (i) markovia…

---

## [Divergence loss term Partial Derivative Flux Zygote](https://discourse.julialang.org/t/divergence-loss-term-partial-derivative-flux-zygote/105513)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 0\
**Last updated:** [October 28, 2023, 4:09pm UTC](https://discourse.julialang.org/t/divergence-loss-term-partial-derivative-flux-zygote/105513 "2023-10-28T16:09:54Z")

</div>

Hello, I would like to train a neural network s\_\\theta : \\mathbb{R}^{n\_x} \\times \\mathbb{R}^{n\_y} \\to \\mathbb{R}^{n\_x} parameterized by the parameters \\theta defined on a space of joint variables (x,y) \\in \\mathbb{R}^{n…

---

## [Model parameters not updating when using Flux.update with differential equation](https://discourse.julialang.org/t/model-parameters-not-updating-when-using-flux-update-with-differential-equation/105392)

<div class="topic-metadata">

**Author:** [@arvindmohan](https://discourse.julialang.org/u/arvindmohan)\
**Replies:** 2\
**Last updated:** [October 26, 2023, 4:12pm UTC](https://discourse.julialang.org/t/model-parameters-not-updating-when-using-flux-update-with-differential-equation/105392 "2023-10-26T16:12:16Z")

</div>

Here is a MWE, where I am learning a missing term in an equation by representing it with a neural network model. I can compute the gradients with Flux, but the model does not update after each epoch. using DifferentialE…

---

## [\`MLJ.Stack\` performance issues](https://discourse.julialang.org/t/mlj-stack-performance-issues/105085)

<div class="topic-metadata">

**Author:** [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Replies:** 4\
**Last updated:** [October 23, 2023, 9:48pm UTC](https://discourse.julialang.org/t/mlj-stack-performance-issues/105085 "2023-10-23T21:48:45Z")

</div>

I’m trying to use a stacked model to predict an outcome, but I’m having an unusual performance issue. I’m not sure whether the problems are related to my own code having a mistake somewhere, or if it’s just to be expecte…

---

## [Modify existing Lux models](https://discourse.julialang.org/t/modify-existing-lux-models/105199)

<div class="topic-metadata">

**Author:** [@Andreu](https://discourse.julialang.org/u/Andreu)\
**Replies:** 4\
**Last updated:** [October 23, 2023, 3:30pm UTC](https://discourse.julialang.org/t/modify-existing-lux-models/105199 "2023-10-23T15:30:34Z")

</div>

Is there a systematic approach to obtain a modified version of an existing Lux model? The documentation of the Lux layer interface is clear: “once constructed a model architecture cannot change.” However, we may want to…

---

## [Import pretrained Keras model in Julia for inference](https://discourse.julialang.org/t/import-pretrained-keras-model-in-julia-for-inference/104924)

<div class="topic-metadata">

**Author:** [@dubosipsl](https://discourse.julialang.org/u/dubosipsl)\
**Replies:** 6\
**Last updated:** [October 21, 2023, 9:43pm UTC](https://discourse.julialang.org/t/import-pretrained-keras-model-in-julia-for-inference/104924 "2023-10-21T21:43:02Z")

</div>

Hello all, I have trained a model in Python/Keras. What is the recommended way with the present Julia ML ecosystem to save it to disk and load it in Julia to do inference (no training) ? A similar question was asked in…

---

## [LUX LSTM network with multiple inputs](https://discourse.julialang.org/t/lux-lstm-network-with-multiple-inputs/105072)

<div class="topic-metadata">

**Author:** [@Mak](https://discourse.julialang.org/u/Mak)\
**Replies:** 4\
**Last updated:** [October 21, 2023, 9:58am UTC](https://discourse.julialang.org/t/lux-lstm-network-with-multiple-inputs/105072 "2023-10-21T09:58:56Z")

</div>

Can anyone help me in using LSTM to predict temperature? I have four input features and I want to predict the temperature in the future using Random, Statistics, CSV, DataFrames, MLDatasets, ComponentArrays, DataInterpo…

---

## [DataLoader Scope Troubles](https://discourse.julialang.org/t/dataloader-scope-troubles/105207)

<div class="topic-metadata">

**Author:** [@quietlight](https://discourse.julialang.org/u/quietlight)\
**Replies:** 5\
**Last updated:** [October 20, 2023, 7:48pm UTC](https://discourse.julialang.org/t/dataloader-scope-troubles/105207 "2023-10-20T19:48:02Z")

</div>

Hello My Flux training workflow has been a little ad hoc, but it works really well and I have trained on huge amounts of data, for me anyway (over 7 million spectrogram images). Now I need to share my pipeline with oth…

---

## [Loading PyTorch Faster RCNN with ONNX fails](https://discourse.julialang.org/t/loading-pytorch-faster-rcnn-with-onnx-fails/105201)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 2\
**Last updated:** [October 19, 2023, 9:08pm UTC](https://discourse.julialang.org/t/loading-pytorch-faster-rcnn-with-onnx-fails/105201 "2023-10-19T21:08:27Z")

</div>

Hi, I’m trying to load a trained Faster R-CNN model that has been exported with ONNX: It has been saved like this: torch.onnx.export(model, x\[None, :, :, :\], "detector.onnx", …

---

## [Improving performance for training Universal Differential Equation](https://discourse.julialang.org/t/improving-performance-for-training-universal-differential-equation/105038)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 3\
**Last updated:** [October 17, 2023, 7:18am UTC](https://discourse.julialang.org/t/improving-performance-for-training-universal-differential-equation/105038 "2023-10-17T07:18:22Z")

</div>

Hi, I’m trying to understand the performance bottlenecks in training universal differential equations. Following this guide, benchmarking the training shows that optimizing the parameters of the Lux network requires a l…

---

## [NeuralPDE features and GPU compatibility](https://discourse.julialang.org/t/neuralpde-features-and-gpu-compatibility/104870)

<div class="topic-metadata">

**Author:** [@PetrosStefanou](https://discourse.julialang.org/u/PetrosStefanou)\
**Replies:** 9\
**Last updated:** [October 16, 2023, 4:55pm UTC](https://discourse.julialang.org/t/neuralpde-features-and-gpu-compatibility/104870 "2023-10-16T16:55:40Z")

</div>

Hello everyone. I am new to Julia, but somewhat experienced in physics-informed neural networks. I have some questions about several features of NeuralPDE, their compatibility with GPUs and some choices made in the exam…

---

## [On the future of Flux.destructure and SciML integration](https://discourse.julialang.org/t/on-the-future-of-flux-destructure-and-sciml-integration/104760)

<div class="topic-metadata">

**Author:** [@Bizzi](https://discourse.julialang.org/u/Bizzi)\
**Replies:** 4\
**Last updated:** [October 9, 2023, 8:24pm UTC](https://discourse.julialang.org/t/on-the-future-of-flux-destructure-and-sciml-integration/104760 "2023-10-09T20:24:50Z")

</div>

Due to some technical limitations regarding Lux and coupling layers (1, 2, 3) and the existence of InvertibleNetworks.jl, I have chosen to use Flux for my designs. Still, my long-term objective would be to use Optimizati…

---

## [Why does my Flux model return in all NaN?](https://discourse.julialang.org/t/why-does-my-flux-model-return-in-all-nan/104742)

<div class="topic-metadata">

**Author:** [@tiZ](https://discourse.julialang.org/u/tiZ)\
**Replies:** 2\
**Last updated:** [October 9, 2023, 6:59am UTC](https://discourse.julialang.org/t/why-does-my-flux-model-return-in-all-nan/104742 "2023-10-09T06:59:38Z")

</div>

Hi friends here, I would like to ask a question about the Flux training, and I am try to understand why my model will return NaN value after a failed training step. for example I have such a model, input shape of it is…

---

## [How do I make my custom (potentially stupid) model in Julia?](https://discourse.julialang.org/t/how-do-i-make-my-custom-potentially-stupid-model-in-julia/104464)

<div class="topic-metadata">

**Author:** [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Replies:** 1\
**Last updated:** [October 1, 2023, 2:29pm UTC](https://discourse.julialang.org/t/how-do-i-make-my-custom-potentially-stupid-model-in-julia/104464 "2023-10-01T14:29:43Z")

</div>

Julia is said to be an expressive ML language where you do the obvious thing, putting in math expression and it works. But… how does it work exactly? To try it out, I want to implement my own (potentially stupid) idea fo…

---

## [Problems with implementing a basic DeepAR algorithm in Julia](https://discourse.julialang.org/t/problems-with-implementing-a-basic-deepar-algorithm-in-julia/104405)

<div class="topic-metadata">

**Author:** [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)\
**Replies:** 2\
**Last updated:** [September 29, 2023, 9:34pm UTC](https://discourse.julialang.org/t/problems-with-implementing-a-basic-deepar-algorithm-in-julia/104405 "2023-09-29T21:34:59Z")

</div>

I am trying to implement a basic DeepAR that serves as a baseline to compare with other time series forecasting algorithms. However, when testing the following code, it seems that the code does not learn well an example …

---

## [Control of an ODE using neural network](https://discourse.julialang.org/t/control-of-an-ode-using-neural-network/101206)

<div class="topic-metadata">

**Author:** [@SanAlphaTau](https://discourse.julialang.org/u/SanAlphaTau)\
**Replies:** 3\
**Last updated:** [September 29, 2023, 12:33pm UTC](https://discourse.julialang.org/t/control-of-an-ode-using-neural-network/101206 "2023-09-29T12:33:33Z")

</div>

I recall previous diffeqflux.jl docs having an example of how to train a neural network as a control of a ODE. Essentially subbing the control term for a neural network call. https://docs.juliahub.com/DiffEqFlux/BdO4p/1…

---

## [Hessian of function involving integration of ODE](https://discourse.julialang.org/t/hessian-of-function-involving-integration-of-ode/104339)

<div class="topic-metadata">

**Author:** [@Stefano\_Giampiccolo](https://discourse.julialang.org/u/Stefano_Giampiccolo)\
**Replies:** 2\
**Last updated:** [September 29, 2023, 7:12am UTC](https://discourse.julialang.org/t/hessian-of-function-involving-integration-of-ode/104339 "2023-09-29T07:12:04Z")

</div>

Hi all, I apologize if it’s a possibly stupid question, but I am trying to calculate the Hessian of a function that internally performs the integration of a differential equation. What I am currently doing is this: usi…

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

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