# Latest

**URL:** https://discourse.julialang.org/latest.md?page=967

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

**Page:** 968

---

## [How to train the lstm model more than one epoch](https://discourse.julialang.org/t/how-to-train-the-lstm-model-more-than-one-epoch/84973)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 10\
**Last updated:** [July 30, 2022, 9:29am UTC](https://discourse.julialang.org/t/how-to-train-the-lstm-model-more-than-one-epoch/84973 "2022-07-30T09:29:31Z")

</div>

Here is an example in one epoch. How can I realize training the model in 10 epochs. using Flux using CUDA X\_train = rand(60000, 4) Y\_train = rand(60000, 1) seq\_len = 600 batch\_size = 10 no\_features = 4 N = size(X\_tra…

---

## [Appending to a dictionary in Julia](https://discourse.julialang.org/t/appending-to-a-dictionary-in-julia/85023)

<div class="topic-metadata">

**Author:** [@Debartha\_Paul](https://discourse.julialang.org/u/Debartha_Paul)\
**Replies:** 3\
**Last updated:** [July 30, 2022, 8:24am UTC](https://discourse.julialang.org/t/appending-to-a-dictionary-in-julia/85023 "2022-07-30T08:24:59Z")

</div>

I recently completed the course Introduction to Julia (for programmers). However, in the lecture titled Data Structures, there was a part where it was shown how to add an entry to a dictionary. Now suppose we have a dict…

---

## [New package version not appearing on Juliahub](https://discourse.julialang.org/t/new-package-version-not-appearing-on-juliahub/84989)

<div class="topic-metadata">

**Author:** [@satyabrata\_pal](https://discourse.julialang.org/u/satyabrata_pal)\
**Replies:** 6\
**Last updated:** [July 30, 2022, 7:03am UTC](https://discourse.julialang.org/t/new-package-version-not-appearing-on-juliahub/84989 "2022-07-30T07:03:19Z")

</div>

I had recently registered a new version of my package “Nbdev.jl” - source -GitHub - sapal6/Nbdev.jl: Create Julia packages from Notebooks When I search my package on juliahub, i can see the package’s name and new versio…

---

## [How to access the element of this type of vector](https://discourse.julialang.org/t/how-to-access-the-element-of-this-type-of-vector/85010)

<div class="topic-metadata">

**Author:** [@Starpower\_Power](https://discourse.julialang.org/u/Starpower_Power)\
**Replies:** 2\
**Last updated:** [July 30, 2022, 6:50am UTC](https://discourse.julialang.org/t/how-to-access-the-element-of-this-type-of-vector/85010 "2022-07-30T06:50:51Z")

</div>

I want to access all the 2nd element of this vector. exp 1.5588154785672663 , 1.5588154785672663,1.5588154785672663. … how without for loop?

---

## [Any conjugate gradient method allowing a custom inner product?](https://discourse.julialang.org/t/any-conjugate-gradient-method-allowing-a-custom-inner-product/84982)

<div class="topic-metadata">

**Author:** [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Replies:** 5\
**Last updated:** [July 30, 2022, 5:57am UTC](https://discourse.julialang.org/t/any-conjugate-gradient-method-allowing-a-custom-inner-product/84982 "2022-07-30T05:57:01Z")

</div>

Is there any conjugate gradient (CG) implementation in Julia allowing one to specify the inner product (with a fixed symmetric and positive definite matrix M, say)? In my use case, I know my system matrix A is symmetric…

---

## [Any way to accelerate the creation of shared library?](https://discourse.julialang.org/t/any-way-to-accelerate-the-creation-of-shared-library/85013)

<div class="topic-metadata">

**Author:** [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Replies:** 2\
**Last updated:** [July 30, 2022, 1:13am UTC](https://discourse.julialang.org/t/any-way-to-accelerate-the-creation-of-shared-library/85013 "2022-07-30T01:13:08Z")

</div>

I recently work on shared libraries created by “PackageCompiler.create\_library”. I noticed that every complete creation lasts 6 min to 10 min or so. I wonder whether there is a way to accelerate a new creation based on a…

---

## [Control of Time-Step size in OrdinaryDiffEq](https://discourse.julialang.org/t/control-of-time-step-size-in-ordinarydiffeq/84949)

<div class="topic-metadata">

**Author:** [@Whyborn](https://discourse.julialang.org/u/Whyborn)\
**Replies:** 4\
**Last updated:** [July 29, 2022, 11:39pm UTC](https://discourse.julialang.org/t/control-of-time-step-size-in-ordinarydiffeq/84949 "2022-07-29T23:39:52Z")

</div>

Hi, I am trying to use OrdinaryDiffEq for the time integration of a hyperbolic PDE system in a finite-volume context. I want to control the size of the time-step through a CFL condition, rather than by some error norm. …

---

## [Nonlinear curve fitting in Julia](https://discourse.julialang.org/t/nonlinear-curve-fitting-in-julia/84999)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 4\
**Last updated:** [July 29, 2022, 9:20pm UTC](https://discourse.julialang.org/t/nonlinear-curve-fitting-in-julia/84999 "2022-07-29T21:20:33Z")

</div>

Hi all, My question is to do a nonlinear curve fitting task (bounded) for estimating 10 parameters from several give data points, presented as follows: using Optim # my data points I = \[100.254, 94.261, 88.224, 82.193,…

---

## [Slow permutations?](https://discourse.julialang.org/t/slow-permutations/39427)

<div class="topic-metadata">

**Author:** [@natemcintosh](https://discourse.julialang.org/u/natemcintosh)\
**Replies:** 6\
**Last updated:** [July 29, 2022, 7:56pm UTC](https://discourse.julialang.org/t/slow-permutations/39427 "2022-07-29T19:56:57Z")

</div>

I have a an array of strings, of length ~2,000. I would like to produce all permutations of lengths 1 to n (n is always going to be less than or equal to 2). The problem: this is taking much longer than I think it shoul…

---

## [More problems trying to add packages from private repos](https://discourse.julialang.org/t/more-problems-trying-to-add-packages-from-private-repos/69059)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 20\
**Last updated:** [July 29, 2022, 7:27pm UTC](https://discourse.julialang.org/t/more-problems-trying-to-add-packages-from-private-repos/69059 "2022-07-29T19:27:29Z")

</div>

There have been many threads about the difficulties of using private repositories with Pkg. Here’s one, which contains links to various other threads: At some point in the past I managed to get things working somehow,…

---

## [Array of functions behaves differently when it is of length 1 vs longer](https://discourse.julialang.org/t/array-of-functions-behaves-differently-when-it-is-of-length-1-vs-longer/84996)

<div class="topic-metadata">

**Author:** [@alexpkeil1](https://discourse.julialang.org/u/alexpkeil1)\
**Replies:** 3\
**Last updated:** [July 29, 2022, 7:40pm UTC](https://discourse.julialang.org/t/array-of-functions-behaves-differently-when-it-is-of-length-1-vs-longer/84996 "2022-07-29T19:40:37Z")

</div>

I want to do something where I can call different functions on the same value, and that number of functions varies depending on how I use it. I’ve been using an array of functions to accomplish this, but I am getting an …

---

## [How to use an older version of a package with Pluto.jl](https://discourse.julialang.org/t/how-to-use-an-older-version-of-a-package-with-pluto-jl/84917)

<div class="topic-metadata">

**Author:** [@Dragolonth](https://discourse.julialang.org/u/Dragolonth)\
**Replies:** 2\
**Last updated:** [July 29, 2022, 7:07pm UTC](https://discourse.julialang.org/t/how-to-use-an-older-version-of-a-package-with-pluto-jl/84917 "2022-07-29T19:07:55Z")

</div>

Hi all. Is there a way to specify to Pluto the specific version of a package I want to install for the notebook? I would like to roll back to an older version of the package I am using as the latest version does not work…

---

## [JuMP 2-d array Decision Variable computationally expensive](https://discourse.julialang.org/t/jump-2-d-array-decision-variable-computationally-expensive/84987)

<div class="topic-metadata">

**Author:** [@sophiepavia](https://discourse.julialang.org/u/sophiepavia)\
**Replies:** 1\
**Last updated:** [July 29, 2022, 6:37pm UTC](https://discourse.julialang.org/t/jump-2-d-array-decision-variable-computationally-expensive/84987 "2022-07-29T18:37:00Z")

</div>

I am creating a decision variable that is a 2-d array of size 25122 x 25122. (length of arcs and od are both 25122) Is there a more efficient way to initialize a multi-dimensional array as a decision variable? I have ch…

---

## [Siamese/Twin network in Flux (working with two image inputs)](https://discourse.julialang.org/t/siamese-twin-network-in-flux-working-with-two-image-inputs/84991)

<div class="topic-metadata">

**Author:** [@LetsGrillBananas](https://discourse.julialang.org/u/LetsGrillBananas)\
**Replies:** 2\
**Last updated:** [July 29, 2022, 6:19pm UTC](https://discourse.julialang.org/t/siamese-twin-network-in-flux-working-with-two-image-inputs/84991 "2022-07-29T18:19:36Z")

</div>

I’m trying Flux for the first time, so I’m porting a project I did in PyTorch earlier this year over to Flux. Essentially, the project is to classify plant leaves as healthy or diseased. I already have a baseline transfe…

---

## [ANN: Grader.jl: Autograder for Julia coding problems](https://discourse.julialang.org/t/ann-grader-jl-autograder-for-julia-coding-problems/83318)

<div class="topic-metadata">

**Author:** [@ctessum](https://discourse.julialang.org/u/ctessum)\
**Replies:** 3\
**Last updated:** [July 29, 2022, 4:25pm UTC](https://discourse.julialang.org/t/ann-grader-jl-autograder-for-julia-coding-problems/83318 "2022-07-29T16:25:31Z")

</div>

Hello all, I’ve created an autograder for Julia assignments. It can run code written by a student and grade it against an answer key or other criteria. Currently it outputs grade results in a format compatible with Prai…

---

## [Optim interface.jl type instability and efficient exception handling](https://discourse.julialang.org/t/optim-interface-jl-type-instability-and-efficient-exception-handling/84972)

<div class="topic-metadata">

**Author:** [@psterzinger](https://discourse.julialang.org/u/psterzinger)\
**Replies:** 0\
**Last updated:** [July 29, 2022, 11:32am UTC](https://discourse.julialang.org/t/optim-interface-jl-type-instability-and-efficient-exception-handling/84972 "2022-07-29T11:32:29Z")

</div>

Hi, I am currently trying to optimize a simulation that involves repeated parameter estimation, which I do with Optim.jl’s optimize with supplied gradients and hessians. interjace.jl type instability Looking at the fl…

---

## [Julia call c++, could not load symbol](https://discourse.julialang.org/t/julia-call-c-could-not-load-symbol/84980)

<div class="topic-metadata">

**Author:** [@kongdd](https://discourse.julialang.org/u/kongdd)\
**Replies:** 2\
**Last updated:** [July 29, 2022, 3:16pm UTC](https://discourse.julialang.org/t/julia-call-c-could-not-load-symbol/84980 "2022-07-29T15:16:41Z")

</div>

In the debug.cpp: #include \<stdio.h\> // g++ -shared -fPIC -o debug.so debug.cpp void show(int \*a) { for (int i = 0; i \< 10; i++) { printf("a\[%d\] = %d\\n", i, a\[i\]); } } void hello() { printf("hello …

---

## [Bounds Error?](https://discourse.julialang.org/t/bounds-error/84953)

<div class="topic-metadata">

**Author:** [@ejlongman](https://discourse.julialang.org/u/ejlongman)\
**Replies:** 4\
**Last updated:** [July 29, 2022, 2:41pm UTC](https://discourse.julialang.org/t/bounds-error/84953 "2022-07-29T14:41:38Z")

</div>

I am trying to run the following code: u\_vect = rand(5,2) for i in eachindex(u\_vect) println(i) a = u\_vect\[i,2\] end And get the error: “BoundsError: attempt to access 5×2 Matrix{Float64} at index \[6, 2\].” W…

---

## [Tuple to array](https://discourse.julialang.org/t/tuple-to-array/84944)

<div class="topic-metadata">

**Author:** [@Starpower\_Power](https://discourse.julialang.org/u/Starpower_Power)\
**Replies:** 3\
**Last updated:** [July 29, 2022, 2:29pm UTC](https://discourse.julialang.org/t/tuple-to-array/84944 "2022-07-29T14:29:11Z")

</div>

output is one element tuple vector. I can’t access the elements of that output. so, how to convert output to a 3x1 matrix. Thank You

---

## [When plotting Optimization.jl callbacks with Plots.jl, use just one figure in VS Code plots paned](https://discourse.julialang.org/t/when-plotting-optimization-jl-callbacks-with-plots-jl-use-just-one-figure-in-vs-code-plots-paned/84948)

<div class="topic-metadata">

**Author:** [@thompsonmj](https://discourse.julialang.org/u/thompsonmj)\
**Replies:** 3\
**Last updated:** [July 29, 2022, 2:28pm UTC](https://discourse.julialang.org/t/when-plotting-optimization-jl-callbacks-with-plots-jl-use-just-one-figure-in-vs-code-plots-paned/84948 "2022-07-29T14:28:16Z")

</div>

In the callback function below cb = function(θ,l,pred) … how can I have only the current prediction appear on a plot with each iteration to illustrate the progress of fitting? I have tried putting fig = plot() inside th…

---

## [Growing cell population using callback](https://discourse.julialang.org/t/growing-cell-population-using-callback/84970)

<div class="topic-metadata">

**Author:** [@hbooth](https://discourse.julialang.org/u/hbooth)\
**Replies:** 10\
**Last updated:** [July 29, 2022, 2:11pm UTC](https://discourse.julialang.org/t/growing-cell-population-using-callback/84970 "2022-07-29T14:11:33Z")

</div>

Hi everyone, I am building a model of a growing cell population. I want to make use of callback to evaluate the ‘division’ event, similar to the example in this tutorial - Event Handling and Callback Functions · Differe…

---

## [Plotting MCMCChains with Makie](https://discourse.julialang.org/t/plotting-mcmcchains-with-makie/84860)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 7\
**Last updated:** [July 29, 2022, 1:13pm UTC](https://discourse.julialang.org/t/plotting-mcmcchains-with-makie/84860 "2022-07-29T13:13:06Z")

</div>

It is currently trivially simple to plot the posterior likelihood functions from a MCMC chain with StatsPlots. However, it was quite easy to make a function that allows the same automatic plotting with Makie: Setupjulia…

---

## [Indexing arrays with symbols](https://discourse.julialang.org/t/indexing-arrays-with-symbols/84975)

<div class="topic-metadata">

**Author:** [@Atiyah](https://discourse.julialang.org/u/Atiyah)\
**Replies:** 2\
**Last updated:** [July 29, 2022, 1:12pm UTC](https://discourse.julialang.org/t/indexing-arrays-with-symbols/84975 "2022-07-29T13:12:25Z")

</div>

I came over the following thread and was wondering if there is still an intuitive way to index an array with symbols. Say if \> arr = \[1,2,3\] could be still indexed with \> arr\[:a\], arr\[:b\], arr\[:c\] Background: I want…

---

## [Two CuDeviceArrays inside one kernel](https://discourse.julialang.org/t/two-cudevicearrays-inside-one-kernel/84977)

<div class="topic-metadata">

**Author:** [@Shirakumo](https://discourse.julialang.org/u/Shirakumo)\
**Replies:** 0\
**Last updated:** [July 29, 2022, 1:03pm UTC](https://discourse.julialang.org/t/two-cudevicearrays-inside-one-kernel/84977 "2022-07-29T13:03:53Z")

</div>

Hello everyone, I was wondering if I can achieve something like this: function test(output, output2, input) # Set up shared memory cache for this current block. cache1 = @cuDynamicSharedMem(Int64, (10,10,3)) …

---

## [Compound dataframe filtering with negated boolean expression](https://discourse.julialang.org/t/compound-dataframe-filtering-with-negated-boolean-expression/24877)

<div class="topic-metadata">

**Author:** [@notpeerreviewed](https://discourse.julialang.org/u/notpeerreviewed)\
**Replies:** 5\
**Last updated:** [July 29, 2022, 12:50pm UTC](https://discourse.julialang.org/t/compound-dataframe-filtering-with-negated-boolean-expression/24877 "2022-07-29T12:50:47Z")

</div>

I’m trying to reproduce a compound filter but it involves negation of a two part specification. I’d normally do something like this in R, using dplyr filter(!(Fuel == "Gas" & Field == "Maari")) In simple terms, I want…

---

## [What is the proper way to handle a discontinuity in Differential Equations?](https://discourse.julialang.org/t/what-is-the-proper-way-to-handle-a-discontinuity-in-differential-equations/84963)

<div class="topic-metadata">

**Author:** [@Ge0rges](https://discourse.julialang.org/u/Ge0rges)\
**Replies:** 2\
**Last updated:** [July 29, 2022, 12:24pm UTC](https://discourse.julialang.org/t/what-is-the-proper-way-to-handle-a-discontinuity-in-differential-equations/84963 "2022-07-29T12:24:38Z")

</div>

Hello all, I have a system of two differential equations that I am able to solve using Rosenbrock23(). I now would like to model this system with one modification, where at time t I manually change the value of one of …

---

## [How to round whole matrix like numpy.round()](https://discourse.julialang.org/t/how-to-round-whole-matrix-like-numpy-round/84897)

<div class="topic-metadata">

**Author:** [@Starpower\_Power](https://discourse.julialang.org/u/Starpower_Power)\
**Replies:** 8\
**Last updated:** [July 29, 2022, 12:13pm UTC](https://discourse.julialang.org/t/how-to-round-whole-matrix-like-numpy-round/84897 "2022-07-29T12:13:42Z")

</div>

how to round whole matrix like numpy.round() how to round SymPy Matrix in julia SymPy pakage

---

## [Some questions for LSTM](https://discourse.julialang.org/t/some-questions-for-lstm/84907)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 6\
**Last updated:** [July 29, 2022, 11:44am UTC](https://discourse.julialang.org/t/some-questions-for-lstm/84907 "2022-07-29T11:44:49Z")

</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…

---

## [Global struct defined in some local scopes / what \*is\* top level?](https://discourse.julialang.org/t/global-struct-defined-in-some-local-scopes-what-is-top-level/84943)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 5\
**Last updated:** [July 29, 2022, 11:18am UTC](https://discourse.julialang.org/t/global-struct-defined-in-some-local-scopes-what-is-top-level/84943 "2022-07-29T11:18:03Z")

</div>

Struct definitions nested in macros or methods throw an error explaining they need to be at top level. Top level is generally explained as the module’s global scope, but it’s evidently not (example below). Furthermore, t…

---

## [Metaprogramming: Nested function variable interpolation](https://discourse.julialang.org/t/metaprogramming-nested-function-variable-interpolation/84940)

<div class="topic-metadata">

**Author:** [@RXGottlieb](https://discourse.julialang.org/u/RXGottlieb)\
**Replies:** 1\
**Last updated:** [July 29, 2022, 10:15am UTC](https://discourse.julialang.org/t/metaprogramming-nested-function-variable-interpolation/84940 "2022-07-29T10:15:52Z")

</div>

Hello, I’m working on a piece of code that generates a math expression with embedded variables, and I want to generate a function that will take those variables as inputs and evaluate the math expression using the given…

[Previous page](https://discourse.julialang.org/latest.md?page=966)

[Next page](https://discourse.julialang.org/latest.md?page=968)
