# Machine Learning

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

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

**Page:** 17

---

## [Segment Anything Model for Julia?](https://discourse.julialang.org/t/segment-anything-model-for-julia/97257)

<div class="topic-metadata">

**Author:** [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Replies:** 7\
**Last updated:** [May 3, 2023, 11:06am UTC](https://discourse.julialang.org/t/segment-anything-model-for-julia/97257 "2023-05-03T11:06:30Z")

</div>

Watching Meta’s Segment Anything Model (SAM) exploding online and wondering anyone is working on a port of the Python version to Julia or if a similar model could be trained using the Julia ecosystem as the training da…

---

## [Repo for Scientific Machine Learning - UDE paper does not seem to give consistent results on rerunning](https://discourse.julialang.org/t/repo-for-scientific-machine-learning-ude-paper-does-not-seem-to-give-consistent-results-on-rerunning/98157)

<div class="topic-metadata">

**Author:** [@Daniel\_Doyle](https://discourse.julialang.org/u/Daniel_Doyle)\
**Replies:** 3\
**Last updated:** [May 2, 2023, 7:24pm UTC](https://discourse.julialang.org/t/repo-for-scientific-machine-learning-ude-paper-does-not-seem-to-give-consistent-results-on-rerunning/98157 "2023-05-02T19:24:22Z")

</div>

Hello, I was going through the code behind the paper for Scientific machine learning here: universal\_differential\_equations/scenario\_1.jl at master · ChrisRackauckas/universal\_differential\_equations · GitHub and I am n…

---

## [Pre-allocating arrays for parallel multiple shooting Neural ODE training in Flux](https://discourse.julialang.org/t/pre-allocating-arrays-for-parallel-multiple-shooting-neural-ode-training-in-flux/97867)

<div class="topic-metadata">

**Author:** [@linkz](https://discourse.julialang.org/u/linkz)\
**Replies:** 1\
**Last updated:** [April 24, 2023, 5:30pm UTC](https://discourse.julialang.org/t/pre-allocating-arrays-for-parallel-multiple-shooting-neural-ode-training-in-flux/97867 "2023-04-24T17:30:39Z")

</div>

Hi, I would like to pre-allocate an array of matrices which I would then in-place mutate in my multiple shooting training in Flux, optimized via Optimization (see skeleton code below). However, I don’t know what type sho…

---

## [Split a large image into many small images to get training data for a CNN](https://discourse.julialang.org/t/split-a-large-image-into-many-small-images-to-get-training-data-for-a-cnn/97853)

<div class="topic-metadata">

**Author:** [@Kemper](https://discourse.julialang.org/u/Kemper)\
**Replies:** 2\
**Last updated:** [April 25, 2023, 9:12am UTC](https://discourse.julialang.org/t/split-a-large-image-into-many-small-images-to-get-training-data-for-a-cnn/97853 "2023-04-25T09:12:15Z")

</div>

Hey, I Googled, but I think I miss the right terms to find what I am looking for: I want to train a CNN to dedect landforms. I have a .shp file with the landforms for training and want to: a: rasterize it b: split u…

---

## [FLUX.JL -- MethodError: no method matching loss()](https://discourse.julialang.org/t/flux-jl-methoderror-no-method-matching-loss/63478)

<div class="topic-metadata">

**Author:** [@BroccoliFever](https://discourse.julialang.org/u/BroccoliFever)\
**Replies:** 4\
**Last updated:** [April 24, 2023, 6:32pm UTC](https://discourse.julialang.org/t/flux-jl-methoderror-no-method-matching-loss/63478 "2023-04-24T18:32:20Z")

</div>

I have trained CNNs using PyTorch, and I am trying to run a train loop on a simple CNN in Flux for binary (cat/dog) classification, but I cannot for the life of me figure out how to get the loss functions to work in Flux…

---

## [What is the status of pretrained standard models (for machine learning) in the Julia ecosystem?](https://discourse.julialang.org/t/what-is-the-status-of-pretrained-standard-models-for-machine-learning-in-the-julia-ecosystem/97702)

<div class="topic-metadata">

**Author:** [@Euhan](https://discourse.julialang.org/u/Euhan)\
**Replies:** 5\
**Last updated:** [April 24, 2023, 6:23pm UTC](https://discourse.julialang.org/t/what-is-the-status-of-pretrained-standard-models-for-machine-learning-in-the-julia-ecosystem/97702 "2023-04-24T18:23:20Z")

</div>

I have previously tried using Metalhead to take advantage of standard nets, but I haven’t been able to use anything with pretrained weights. Or rather, at the time none of the models I looked at, had weights. What is th…

---

## [Dead links in Flux.jl's CONTRIBUTING.md](https://discourse.julialang.org/t/dead-links-in-flux-jls-contributing-md/97819)

<div class="topic-metadata">

**Author:** [@trung](https://discourse.julialang.org/u/trung)\
**Replies:** 5\
**Last updated:** [April 23, 2023, 9:33pm UTC](https://discourse.julialang.org/t/dead-links-in-flux-jls-contributing-md/97819 "2023-04-23T21:33:00Z")

</div>

I’ve been reading through Flux.jl’s CONTRIBUTING.md and there are two dead links under the Learn Flux section: Flux’s official Getting Started tutorial Deep Learning with Flux - A 60 Minute Blitz: a quick intro to Flu…

---

## [Flux: How to minimise the garbage collection time?](https://discourse.julialang.org/t/flux-how-to-minimise-the-garbage-collection-time/97572)

<div class="topic-metadata">

**Author:** [@onurcanbektas](https://discourse.julialang.org/u/onurcanbektas)\
**Replies:** 22\
**Last updated:** [April 20, 2023, 7:26am UTC](https://discourse.julialang.org/t/flux-how-to-minimise-the-garbage-collection-time/97572 "2023-04-20T07:26:11Z")

</div>

I have a code where I use several different separate neural networks inside a for loop. Here is the times that it tooks to go over the loop: 0.149468 seconds (10.69 k allocations: 1.331 MiB, 99.45% gc time) 0.001026 s…

---

## [Help in running flux on NVIDIA GeForce GT 710 GPU](https://discourse.julialang.org/t/help-in-running-flux-on-nvidia-geforce-gt-710-gpu/97679)

<div class="topic-metadata">

**Author:** [@Ritu\_Lahkar](https://discourse.julialang.org/u/Ritu_Lahkar)\
**Replies:** 3\
**Last updated:** [April 20, 2023, 3:41am UTC](https://discourse.julialang.org/t/help-in-running-flux-on-nvidia-geforce-gt-710-gpu/97679 "2023-04-20T03:41:32Z")

</div>

I have a NVIDIA GeForce GT 710 GPU. I tried to run Flux on it using both julia 1.8 and 1.9. Both way I am getting: CUDNNError: CUDNN\_STATUS\_ARCH\_MISMATCH (code 6) Please help, how to solve it.

---

## [Does Zygote differentiate symbolically?](https://discourse.julialang.org/t/does-zygote-differentiate-symbolically/96528)

<div class="topic-metadata">

**Author:** [@Euhan](https://discourse.julialang.org/u/Euhan)\
**Replies:** 27\
**Last updated:** [April 18, 2023, 8:52am UTC](https://discourse.julialang.org/t/does-zygote-differentiate-symbolically/96528 "2023-04-18T08:52:07Z")

</div>

Sorry for posting this question in maybe-not-exactly-right category! This was my guess at group with biggest overlap with my question. My question is as simple as it says in the title. Does Zygote differentiate symbolic…

---

## [How to make Zygote's gradient function work with a custom rrule](https://discourse.julialang.org/t/how-to-make-zygotes-gradient-function-work-with-a-custom-rrule/97439)

<div class="topic-metadata">

**Author:** [@gladisor](https://discourse.julialang.org/u/gladisor)\
**Replies:** 0\
**Last updated:** [April 13, 2023, 6:16pm UTC](https://discourse.julialang.org/t/how-to-make-zygotes-gradient-function-work-with-a-custom-rrule/97439 "2023-04-13T18:16:35Z")

</div>

Here is a link to my issue which describes the problem I am facing:

---

## [Difference equation with neural network](https://discourse.julialang.org/t/difference-equation-with-neural-network/97403)

<div class="topic-metadata">

**Author:** [@quantiota](https://discourse.julialang.org/u/quantiota)\
**Replies:** 0\
**Last updated:** [April 12, 2023, 7:07pm UTC](https://discourse.julialang.org/t/difference-equation-with-neural-network/97403 "2023-04-12T19:07:30Z")

</div>

Someone can give me a research direction to find the time series w\[i\] so that the loss function sum(F.^2) is minimized for a known time series q. # define a function to calculate the values of F for a given time serie…

---

## [How is the performance of GraphNeuralNetworks.jl compared to PytorchGeometric?](https://discourse.julialang.org/t/how-is-the-performance-of-graphneuralnetworks-jl-compared-to-pytorchgeometric/97396)

<div class="topic-metadata">

**Author:** [@DoktorMike](https://discourse.julialang.org/u/DoktorMike)\
**Replies:** 4\
**Last updated:** [April 13, 2023, 11:30am UTC](https://discourse.julialang.org/t/how-is-the-performance-of-graphneuralnetworks-jl-compared-to-pytorchgeometric/97396 "2023-04-13T11:30:45Z")

</div>

I’ve been playing around with the excellent GraphNeuralNetworks.jl and am thinking about applying it to the biochemistry domain. Specifically within drug discovery. I was wondering if anyone has tried to benchmark speed …

---

## [Is it possible to keep some weights fixed during training](https://discourse.julialang.org/t/is-it-possible-to-keep-some-weights-fixed-during-training/91752)

<div class="topic-metadata">

**Author:** [@quantiota](https://discourse.julialang.org/u/quantiota)\
**Replies:** 4\
**Last updated:** [April 11, 2023, 5:53pm UTC](https://discourse.julialang.org/t/is-it-possible-to-keep-some-weights-fixed-during-training/91752 "2023-04-11T17:53:56Z")

</div>

the weights of the first layer are real parameters and i need to fix the values to zero for the rising arrows.

---

## [Problem with Metalhead.jl](https://discourse.julialang.org/t/problem-with-metalhead-jl/97259)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [April 8, 2023, 9:00pm UTC](https://discourse.julialang.org/t/problem-with-metalhead-jl/97259 "2023-04-08T21:00:59Z")

</div>

I try to run this code: GPU vs CPU benchmarks with Flux.jl But executing: using Metalhead, Images using Metalhead: trainimgs fails with: julia\> using Metalhead: trainimgs ERROR: UndefVarError: \`trainimgs\` not defined…

---

## [Ignore derivatives in ReverseDiff](https://discourse.julialang.org/t/ignore-derivatives-in-reversediff/97252)

<div class="topic-metadata">

**Author:** [@skrinkle](https://discourse.julialang.org/u/skrinkle)\
**Replies:** 0\
**Last updated:** [April 8, 2023, 5:30pm UTC](https://discourse.julialang.org/t/ignore-derivatives-in-reversediff/97252 "2023-04-08T17:30:26Z")

</div>

I want to exclude some functions in my model code from gradient calculations, using @ignore\_derivatives from ChainRulesCore. It works with Zygote, but not with ReverseDiff. Here’s a MWE. using Zygote, ReverseDiff import…

---

## [Converting Tensorflow RNN to Flux](https://discourse.julialang.org/t/converting-tensorflow-rnn-to-flux/97236)

<div class="topic-metadata">

**Author:** [@Steve\_Lohrenz](https://discourse.julialang.org/u/Steve_Lohrenz)\
**Replies:** 0\
**Last updated:** [April 7, 2023, 8:09pm UTC](https://discourse.julialang.org/t/converting-tensorflow-rnn-to-flux/97236 "2023-04-07T20:09:13Z")

</div>

I am trying to create an RNN to predict the Google stock price based on the opening price for each day. I am following a tutorial where they do it in Tensorflow, and I am trying to do the same in Flux. My training data…

---

## [NeuralPDE for starting a geophysics repository](https://discourse.julialang.org/t/neuralpde-for-starting-a-geophysics-repository/97047)

<div class="topic-metadata">

**Author:** [@pkmishra](https://discourse.julialang.org/u/pkmishra)\
**Replies:** 4\
**Last updated:** [April 4, 2023, 10:59pm UTC](https://discourse.julialang.org/t/neuralpde-for-starting-a-geophysics-repository/97047 "2023-04-04T22:59:28Z")

</div>

Hi @ChrisRackauckas, I am writing a research proposal for creating an integrated optimization framework for multi-source geophysical data. The goal is to start something sustainable for long-term. I would like everything…

---

## [Gradient-Free Neural Network Optimization](https://discourse.julialang.org/t/gradient-free-neural-network-optimization/97088)

<div class="topic-metadata">

**Author:** [@liamfdoherty](https://discourse.julialang.org/u/liamfdoherty)\
**Replies:** 3\
**Last updated:** [April 4, 2023, 10:58pm UTC](https://discourse.julialang.org/t/gradient-free-neural-network-optimization/97088 "2023-04-04T22:58:33Z")

</div>

I have a neural network which is real valued (i.e., maps into \\mathbb{R}, with inputs in \\mathbb{R}^{n}), but it has complex weights. Consequently, taking gradients of the loss function is complex differentiation, and th…

---

## [Error with gradient function in quantum reinforcement learning algorithm](https://discourse.julialang.org/t/error-with-gradient-function-in-quantum-reinforcement-learning-algorithm/96787)

<div class="topic-metadata">

**Author:** [@SatvikDuddukuru](https://discourse.julialang.org/u/SatvikDuddukuru)\
**Replies:** 0\
**Last updated:** [March 29, 2023, 4:26pm UTC](https://discourse.julialang.org/t/error-with-gradient-function-in-quantum-reinforcement-learning-algorithm/96787 "2023-03-29T16:26:22Z")

</div>

Hello. I am trying to implement the REINFORCE algorithm with parametrized quantum circuits from this Python tutorial (Parametrized Quantum Circuits for Reinforcement Learning | TensorFlow Quantum). To do this, I’ve imp…

---

## [Alternative to FluxOptTools?](https://discourse.julialang.org/t/alternative-to-fluxopttools/96747)

<div class="topic-metadata">

**Author:** [@gnicolosi](https://discourse.julialang.org/u/gnicolosi)\
**Replies:** 2\
**Last updated:** [March 29, 2023, 5:13am UTC](https://discourse.julialang.org/t/alternative-to-fluxopttools/96747 "2023-03-29T05:13:44Z")

</div>

Dear all, I have an optimization problem in which some of the functions are approximated by NNs, thus I am using Flux to represent them. The package FluxOptTools has allowed me to use Optim to optimize my “loss” functi…

---

## [Zygote Warning within FluxOptTools - 'cannot track gradients'](https://discourse.julialang.org/t/zygote-warning-within-fluxopttools-cannot-track-gradients/96630)

<div class="topic-metadata">

**Author:** [@gnicolosi](https://discourse.julialang.org/u/gnicolosi)\
**Replies:** 2\
**Last updated:** [March 27, 2023, 11:12pm UTC](https://discourse.julialang.org/t/zygote-warning-within-fluxopttools-cannot-track-gradients/96630 "2023-03-27T23:12:15Z")

</div>

I am using NNs created using Flux to parameterize a function which I want to approximate in an optimal control problem. I formulate the associated optimization problem and call Optim, which works thanks to FLuXOptTools. …

---

## [Multiple-input operators with OperatorLearning.jl](https://discourse.julialang.org/t/multiple-input-operators-with-operatorlearning-jl/96678)

<div class="topic-metadata">

**Author:** [@kaido975](https://discourse.julialang.org/u/kaido975)\
**Replies:** 0\
**Last updated:** [March 27, 2023, 8:38pm UTC](https://discourse.julialang.org/t/multiple-input-operators-with-operatorlearning-jl/96678 "2023-03-27T20:38:06Z")

</div>

Is it possible to define a multiple-input operators (\[2202.06137\] MIONet: Learning multiple-input operators via tensor product) to construct a network of the form (branch1, branch2, branch3…, trunk) using OperatorLearnin…

---

## [Sentence Embeddings using Transformers.jl](https://discourse.julialang.org/t/sentence-embeddings-using-transformers-jl/96611)

<div class="topic-metadata">

**Author:** [@NAS](https://discourse.julialang.org/u/NAS)\
**Replies:** 0\
**Last updated:** [March 25, 2023, 10:06pm UTC](https://discourse.julialang.org/t/sentence-embeddings-using-transformers-jl/96611 "2023-03-25T22:06:42Z")

</div>

I’m trying to do sentence embeddings using a huggingface model similar to python example here: sentence-transformers/all-MiniLM-L6-v2 · Hugging Face. So far I have this using Transformers.HuggingFace using Transformers…

---

## [Zygote vs. Forward Diff with Optim](https://discourse.julialang.org/t/zygote-vs-forward-diff-with-optim/96565)

<div class="topic-metadata">

**Author:** [@gnicolosi](https://discourse.julialang.org/u/gnicolosi)\
**Replies:** 4\
**Last updated:** [March 24, 2023, 11:39pm UTC](https://discourse.julialang.org/t/zygote-vs-forward-diff-with-optim/96565 "2023-03-24T23:39:13Z")

</div>

Hi all, I am solving an optimization problem using an Augmented Lagrangian (AL) of a constrained parameterized problem. I have about 400 parameters and the AL spits out a scalar which is to be minimized. I have already …

---

## [Translating tensorflow to Flux and SimpleChains and not getting the same results](https://discourse.julialang.org/t/translating-tensorflow-to-flux-and-simplechains-and-not-getting-the-same-results/96134)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 6\
**Last updated:** [March 24, 2023, 3:08pm UTC](https://discourse.julialang.org/t/translating-tensorflow-to-flux-and-simplechains-and-not-getting-the-same-results/96134 "2023-03-24T15:08:56Z")

</div>

For the past few days, I started working on an ML project. I looked at Flux.jl and SimpleChains.jl for doing pure Julia Deep Learning and TensorFlow, but I could not make them agree! The data: let say the model tries t…

---

## [Minibatching neural ODEs with different initial conditions](https://discourse.julialang.org/t/minibatching-neural-odes-with-different-initial-conditions/96361)

<div class="topic-metadata">

**Author:** [@kaido975](https://discourse.julialang.org/u/kaido975)\
**Replies:** 7\
**Last updated:** [March 21, 2023, 8:18pm UTC](https://discourse.julialang.org/t/minibatching-neural-odes-with-different-initial-conditions/96361 "2023-03-21T20:18:39Z")

</div>

I am trying to train a neural ODE on different time trajectories, starting with different initial conditions. I am able to observe a reduction in loss with ADAM (with good outputs), but BFGS does not work at all. Why is …

---

## [Error with a new syntax of Flux](https://discourse.julialang.org/t/error-with-a-new-syntax-of-flux/96331)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 2\
**Last updated:** [March 21, 2023, 12:28am UTC](https://discourse.julialang.org/t/error-with-a-new-syntax-of-flux/96331 "2023-03-21T00:28:57Z")

</div>

Hi, I’m trying to make my neural network compatible with a new syntax of Flux. Note that the network I used, PLSE, receives two arguments as PLSE(x, u). Code using Test using ParametrisedConvexApproximators using Lin…

---

## [Can't train simple net what am I doing wrong?](https://discourse.julialang.org/t/cant-train-simple-net-what-am-i-doing-wrong/96094)

<div class="topic-metadata">

**Author:** [@Fabrice\_Rosay](https://discourse.julialang.org/u/Fabrice_Rosay)\
**Replies:** 1\
**Last updated:** [March 18, 2023, 10:19pm UTC](https://discourse.julialang.org/t/cant-train-simple-net-what-am-i-doing-wrong/96094 "2023-03-18T22:19:25Z")

</div>

Here is a minimal working example: function ResNetBlock(n::Int) return Chain( Conv((3, 3), n =\> n, relu; pad=1, stride=1), BatchNorm(n, relu), Conv((3, 3), n =\> n; pad=1, stride=1), B…

---

## [Simple Model for CIFAR-10 using Flux not converging](https://discourse.julialang.org/t/simple-model-for-cifar-10-using-flux-not-converging/96168)

<div class="topic-metadata">

**Author:** [@iskyd](https://discourse.julialang.org/u/iskyd)\
**Replies:** 1\
**Last updated:** [March 18, 2023, 10:10pm UTC](https://discourse.julialang.org/t/simple-model-for-cifar-10-using-flux-not-converging/96168 "2023-03-18T22:10:14Z")

</div>

I’m trying to train a simple model on the CIFAR-10 dataset. I’m using the model proposed by the flux documentation on cifar-10 found here: Deep Learning with Julia & Flux: A 60 Minute Blitz · Flux This is my code. Whe…

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

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