# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=474

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

**Page:** 475

---

## [This custom Zygote.jl adjoint is not giving me the speed up I expected and how to migrate to GPU?](https://discourse.julialang.org/t/this-custom-zygote-jl-adjoint-is-not-giving-me-the-speed-up-i-expected-and-how-to-migrate-to-gpu/31150)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 0\
**Last updated:** [November 16, 2019, 8:01am UTC](https://discourse.julialang.org/t/this-custom-zygote-jl-adjoint-is-not-giving-me-the-speed-up-i-expected-and-how-to-migrate-to-gpu/31150 "2019-11-16T08:01:50Z")

</div>

I tried to use Zygote.jl to define a custom adjoint for Flux.logitbinarycrossentropy but I don’t get the expected speed up when computing the gradient. The context is that the XGBoost tree boosting algorithm requires tak…

---

## [How to get the gradient of NN wr to its input?](https://discourse.julialang.org/t/how-to-get-the-gradient-of-nn-wr-to-its-input/31034)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 6\
**Last updated:** [November 15, 2019, 5:16pm UTC](https://discourse.julialang.org/t/how-to-get-the-gradient-of-nn-wr-to-its-input/31034 "2019-11-15T17:16:49Z")

</div>

Why do I get this error with this MWE ? nn= Dense(5,1) static\_input = \[1,2,3,4\] variable\_input = 5 opt = Nesterov() ps = Flux.Params(variable\_input) g = Flux.gradient(ps) do sum(nn(vcat(static\_input, variable\_input)…

---

## [Has anyone implemented slopecharts/slopegraphs/bump charts in Julia yet?](https://discourse.julialang.org/t/has-anyone-implemented-slopecharts-slopegraphs-bump-charts-in-julia-yet/31107)

<div class="topic-metadata">

**Author:** [@anon97116444](https://discourse.julialang.org/u/anon97116444)\
**Replies:** 7\
**Last updated:** [November 15, 2019, 5:10pm UTC](https://discourse.julialang.org/t/has-anyone-implemented-slopecharts-slopegraphs-bump-charts-in-julia-yet/31107 "2019-11-15T17:10:15Z")

</div>

Hi all not started with Julia YET but will do so next week. I would like to know if there is a mechanism for implementing SLOPEGRAPHS ( sometimes called bump charts) in Julia? This is an article on the form of the char…

---

## [How to set the seed properly in CURAND](https://discourse.julialang.org/t/how-to-set-the-seed-properly-in-curand/24180)

<div class="topic-metadata">

**Author:** [@findmyway](https://discourse.julialang.org/u/findmyway)\
**Replies:** 4\
**Last updated:** [November 15, 2019, 4:04pm UTC](https://discourse.julialang.org/t/how-to-set-the-seed-properly-in-curand/24180 "2019-11-15T16:04:49Z")

</div>

I just found it’s a little tricky for me to set the seed in CuArrays.CURAND julia\> using CuArrays, CuArrays.CURAND julia\> s = CuArrays.CURAND.create\_generator() CuArrays.CURAND.RNG(Ptr{Nothing} @0x00000000054faec0, 100…

---

## [Problem of binarycrossentropy with GPU?](https://discourse.julialang.org/t/problem-of-binarycrossentropy-with-gpu/31026)

<div class="topic-metadata">

**Author:** [@taot](https://discourse.julialang.org/u/taot)\
**Replies:** 2\
**Last updated:** [November 15, 2019, 9:49am UTC](https://discourse.julialang.org/t/problem-of-binarycrossentropy-with-gpu/31026 "2019-11-15T09:49:41Z")

</div>

Hi, I am trying to create a model in Flux, with binarycrossentropy in loss function, but encountered a problem invoking binarycrossentropy on GPU. I reproduced the error with this simple case: # just copy from document…

---

## [How to specifying coefficient in NNlib.leakyrelu?](https://discourse.julialang.org/t/how-to-specifying-coefficient-in-nnlib-leakyrelu/31009)

<div class="topic-metadata">

**Author:** [@taot](https://discourse.julialang.org/u/taot)\
**Replies:** 2\
**Last updated:** [November 15, 2019, 9:28am UTC](https://discourse.julialang.org/t/how-to-specifying-coefficient-in-nnlib-leakyrelu/31009 "2019-11-15T09:28:06Z")

</div>

Hi, I am trying to specify the coefficient in leayrelu activation function, something like this: conv1 = Conv( (4,4), 3=\>16, x -\> leakyrelu(x, 0.02), stride=2, pad=(1,1) ) conv2 = Conv( (4,4), 16=\>32, x -\> leakyrelu(x,…

---

## [(Kolmogorov-) Lilliefors (K-L) distribution](https://discourse.julialang.org/t/kolmogorov-lilliefors-k-l-distribution/31086)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [November 14, 2019, 8:33pm UTC](https://discourse.julialang.org/t/kolmogorov-lilliefors-k-l-distribution/31086 "2019-11-14T20:33:32Z")

</div>

Hello, does any Julia packages provides the (Kolmogorov-)Lilliefors distribution ? This should be used in hypothesis testing when we want to perform a goodness of fit test against a generic probability family, once we h…

---

## [Newbie in stochastic differential equations](https://discourse.julialang.org/t/newbie-in-stochastic-differential-equations/31080)

<div class="topic-metadata">

**Author:** [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Replies:** 1\
**Last updated:** [November 14, 2019, 1:12pm UTC](https://discourse.julialang.org/t/newbie-in-stochastic-differential-equations/31080 "2019-11-14T13:12:07Z")

</div>

Hello everyone, I am new to stochastic differential equations, and I don’t understand the formalism of g and dW. I need to solve the differential equation system with the noise which enters in multiple equations and the…

---

## [JuliaDB.flatten equivalent in DataFrames](https://discourse.julialang.org/t/juliadb-flatten-equivalent-in-dataframes/31048)

<div class="topic-metadata">

**Author:** [@Dario\_Sarra](https://discourse.julialang.org/u/Dario_Sarra)\
**Replies:** 7\
**Last updated:** [November 14, 2019, 1:01pm UTC](https://discourse.julialang.org/t/juliadb-flatten-equivalent-in-dataframes/31048 "2019-11-14T13:01:28Z")

</div>

Hello, is there a way to produce in DataFrames the same result of JuliaDB.flatten using DataFrames using JuliaDB d1 = DataFrame(cat = \["a","b"\], vec = \[\[1,2\],\[3,4\]\]) t1 = table(d1) t2 = flatten(t1,:vec)…

---

## [Can't get quantiles of the Kolmogorov-Smirnov (KSDist) distribution](https://discourse.julialang.org/t/cant-get-quantiles-of-the-kolmogorov-smirnov-ksdist-distribution/31065)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 2\
**Last updated:** [November 14, 2019, 4:31am UTC](https://discourse.julialang.org/t/cant-get-quantiles-of-the-kolmogorov-smirnov-ksdist-distribution/31065 "2019-11-14T04:31:59Z")

</div>

I am trying to replicate this table (from the MITx course in “Fundamental of statistics”): I can get the cdf, but not the quantiles. For example, for n=7: julia\> using Distributions julia\> KSd = KSDist(7) KSDist(n=7…

---

## [Encoding group elements and operations](https://discourse.julialang.org/t/encoding-group-elements-and-operations/30193)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 26\
**Last updated:** [November 14, 2019, 12:28am UTC](https://discourse.julialang.org/t/encoding-group-elements-and-operations/30193 "2019-11-14T00:28:30Z")

</div>

Any ideas on efficient/convenient ways to encode group elements and operations ? In particular, I am interested in reducing strings of elements in a finite group by the group operation. But, I want to use them in other w…

---

## [StatsModels not adapted yet?](https://discourse.julialang.org/t/statsmodels-not-adapted-yet/30342)

<div class="topic-metadata">

**Author:** [@Gunter\_Faes](https://discourse.julialang.org/u/Gunter_Faes)\
**Replies:** 13\
**Last updated:** [November 13, 2019, 5:36pm UTC](https://discourse.julialang.org/t/statsmodels-not-adapted-yet/30342 "2019-11-13T17:36:17Z")

</div>

So far I have estimated data (Rotwein / red wine) in the form of a DataFrame in this form a linear model (using GLM): LinReg = lm(@formula(quality ~ alcohol), Rotwein) quality and alcohol are values within the DataFram…

---

## [Implement case\_when in Queryverse](https://discourse.julialang.org/t/implement-case-when-in-queryverse/30986)

<div class="topic-metadata">

**Author:** [@pradeip1](https://discourse.julialang.org/u/pradeip1)\
**Replies:** 8\
**Last updated:** [November 13, 2019, 1:30pm UTC](https://discourse.julialang.org/t/implement-case-when-in-queryverse/30986 "2019-11-13T13:30:53Z")

</div>

Can we implement case\_when in Julia? I am trying to achieve this R code using Queryverse in Julia Example in R: mutate(TIME = case\_when(TIME == 0 ~ 95.9, TIME == 0.08 ~ 96.08, TIME == 0.25 ~ 96.25, TIME == 0.50 ~ 9…

---

## [Installing packages](https://discourse.julialang.org/t/installing-packages/30978)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 2\
**Last updated:** [November 13, 2019, 10:03am UTC](https://discourse.julialang.org/t/installing-packages/30978 "2019-11-13T10:03:08Z")

</div>

Dear all, I just to install Julia in a new computer. When I run Pkg.add("JuMP") a error message appears: julia\> Pkg.add("JuMP") Updating registry at \`C:\\Users\\Usuário\\.juliapro\\JuliaPro\_v1.0.4.1\\registries\\JuliaPr…

---

## [Seeking advice on learning ML](https://discourse.julialang.org/t/seeking-advice-on-learning-ml/31016)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 8\
**Last updated:** [November 13, 2019, 3:34am UTC](https://discourse.julialang.org/t/seeking-advice-on-learning-ml/31016 "2019-11-13T03:34:35Z")

</div>

I’ve done plenty of dabbling in ML and written some models that work (albeit, not very well) but I’m finding it difficult to 1) navigate the many ML-related topics and decide which ones to spend more time learning and wh…

---

## [Multi-threaded producer - consumer with threads for leading data](https://discourse.julialang.org/t/multi-threaded-producer-consumer-with-threads-for-leading-data/30732)

<div class="topic-metadata">

**Author:** [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Replies:** 16\
**Last updated:** [November 13, 2019, 1:37am UTC](https://discourse.julialang.org/t/multi-threaded-producer-consumer-with-threads-for-leading-data/30732 "2019-11-13T01:37:33Z")

</div>

Dear All, in my training loop of a ML model, I have to iterate over large set of samples which does not fit to the memory. Have anyone tried a producer-consumer model with threads, such that data can be prepared while g…

---

## [JuMP with Ipopt - Error "The equality constraints contain an invalid number"](https://discourse.julialang.org/t/jump-with-ipopt-error-the-equality-constraints-contain-an-invalid-number/31004)

<div class="topic-metadata">

**Author:** [@StarecZosima](https://discourse.julialang.org/u/StarecZosima)\
**Replies:** 5\
**Last updated:** [November 12, 2019, 11:20pm UTC](https://discourse.julialang.org/t/jump-with-ipopt-error-the-equality-constraints-contain-an-invalid-number/31004 "2019-11-12T23:20:43Z")

</div>

Hi there, I am trying to solve the following system of nonlinear equations using JuMP, Ipopt c = Model(with\_optimizer(Ipopt.Optimizer,max\_cpu\_time=500.0)) @variable(c,x) @variable(c,y) @NLcon…

---

## [Plotting graphs, using GraphPlot](https://discourse.julialang.org/t/plotting-graphs-using-graphplot/30973)

<div class="topic-metadata">

**Author:** [@marinarrd](https://discourse.julialang.org/u/marinarrd)\
**Replies:** 3\
**Last updated:** [November 12, 2019, 6:21pm UTC](https://discourse.julialang.org/t/plotting-graphs-using-graphplot/30973 "2019-11-12T18:21:41Z")

</div>

Hello, I would like to draw a graph with node and edge labels. I am stuck as when I call gplot no edges appear in my graph. I attatched an image of my graph as well as what I would like using LightGraphs using GraphPlo…

---

## [JuliaDiff and MPI](https://discourse.julialang.org/t/juliadiff-and-mpi/30983)

<div class="topic-metadata">

**Author:** [@Kotaro\_Anno](https://discourse.julialang.org/u/Kotaro_Anno)\
**Replies:** 3\
**Last updated:** [November 12, 2019, 4:24pm UTC](https://discourse.julialang.org/t/juliadiff-and-mpi/30983 "2019-11-12T16:24:25Z")

</div>

I’m interested in implementing both of JuliaDiff (automatic differentiation) and MPI. MPI needs domain decomposition, but I’m not sure JuliaDiff can deal with domain decomposition. And I can’t find good documents about…

---

## [(binary) solution not satisfying constraint](https://discourse.julialang.org/t/binary-solution-not-satisfying-constraint/30998)

<div class="topic-metadata">

**Author:** [@mposs](https://discourse.julialang.org/u/mposs)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 3:45pm UTC](https://discourse.julialang.org/t/binary-solution-not-satisfying-constraint/30998 "2019-11-12T15:45:58Z")

</div>

Hello I’m solving a small problem with Gurobi, which is given by println(cover)= Min slack\[1\] + slack\[2\] + slack\[7\] + slack\[9\] Subject to y\[135\] + y\[136\] + y\[152\] + y\[158\] + y\[159\] + y\[200\] + y\[474\] + y\[550\] + y\[551\] …

---

## [How to build @constraints?](https://discourse.julialang.org/t/how-to-build-constraints/30950)

<div class="topic-metadata">

**Author:** [@RaquelSantos](https://discourse.julialang.org/u/RaquelSantos)\
**Replies:** 6\
**Last updated:** [November 12, 2019, 2:59pm UTC](https://discourse.julialang.org/t/how-to-build-constraints/30950 "2019-11-12T14:59:14Z")

</div>

This is my model, I am working on building a mathematical model and would like to be able to represent the constraint like this: I\[1\] I\[2\] I\[3\] I\[4\] I\[5\] I\[6\] \<=1500 using JuMP, GLPK m = Model(with\_optimizer(GLPK.Optimi…

---

## [Mutate a new variable with row numbers](https://discourse.julialang.org/t/mutate-a-new-variable-with-row-numbers/30985)

<div class="topic-metadata">

**Author:** [@pradeip1](https://discourse.julialang.org/u/pradeip1)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 10:41am UTC](https://discourse.julialang.org/t/mutate-a-new-variable-with-row-numbers/30985 "2019-11-12T10:41:48Z")

</div>

how to add a row number using Queryverse in Julia? for example in R I simply use ID = row\_number()

---

## [Is there an efficient way to compute the Hessian of a NN?](https://discourse.julialang.org/t/is-there-an-efficient-way-to-compute-the-hessian-of-a-nn/26971)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 11\
**Last updated:** [November 12, 2019, 8:25am UTC](https://discourse.julialang.org/t/is-there-an-efficient-way-to-compute-the-hessian-of-a-nn/26971 "2019-11-12T08:25:43Z")

</div>

Flux.jacobian(::Chain, ::AbstractArray) gives the full jacobian of a neural network. Flux.hessian however throws the error “output is not scalar”. Let m = Chain(Dense(5,3,elu), Dense(3,3)) . What I can do is compute the…

---

## [Predict or parametric bootstrap for a generalized mixed model](https://discourse.julialang.org/t/predict-or-parametric-bootstrap-for-a-generalized-mixed-model/30855)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 2\
**Last updated:** [November 12, 2019, 7:43am UTC](https://discourse.julialang.org/t/predict-or-parametric-bootstrap-for-a-generalized-mixed-model/30855 "2019-11-12T07:43:43Z")

</div>

I want to fit a generalized mixed model to a dataset where the dependent variable is velocity (continuous positive numbers), the random variable is the subject ID, and the predictor is distance to some point (also a cont…

---

## [Does Knet support nested gradient for conv?](https://discourse.julialang.org/t/does-knet-support-nested-gradient-for-conv/30805)

<div class="topic-metadata">

**Author:** [@zht](https://discourse.julialang.org/u/zht)\
**Replies:** 1\
**Last updated:** [November 12, 2019, 6:30am UTC](https://discourse.julialang.org/t/does-knet-support-nested-gradient-for-conv/30805 "2019-11-12T06:30:15Z")

</div>

I need to take the grad of grad of an NN (this is needed for WGAN with grad penalty regularizations). I just found out that Flux (0.9 release) does not support it: Nested AD not defined for conv Stacktrace: ... I am c…

---

## [Do Channels work with multithreaded tasks in 1.3?](https://discourse.julialang.org/t/do-channels-work-with-multithreaded-tasks-in-1-3/30931)

<div class="topic-metadata">

**Author:** [@GordStephen](https://discourse.julialang.org/u/GordStephen)\
**Replies:** 1\
**Last updated:** [November 12, 2019, 3:45am UTC](https://discourse.julialang.org/t/do-channels-work-with-multithreaded-tasks-in-1-3/30931 "2019-11-12T03:45:44Z")

</div>

This is perhaps an overly simple question, but I haven’t been able to find a straightfoward answer for it. Now that Julia 1.3 supports spawning parallel tasks across multiple threads, can we do work stealing via those pa…

---

## [Problem of the calculation of matrix](https://discourse.julialang.org/t/problem-of-the-calculation-of-matrix/30956)

<div class="topic-metadata">

**Author:** [@FujiwaraTakumiEH](https://discourse.julialang.org/u/FujiwaraTakumiEH)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 1:17am UTC](https://discourse.julialang.org/t/problem-of-the-calculation-of-matrix/30956 "2019-11-12T01:17:30Z")

</div>

Background : I use Julia to construct Symmetric normalized Laplacian matrix L^{sym} (Matrix D is a diagonal matrix):L^{sym}=D^{-1/2}×L×D^{-1/2}. Matrix L^{sym} is a sparse matrix. My computer configuration: julia\> ve…

---

## [SAMIN() in Julia (Simulated Annealing)?](https://discourse.julialang.org/t/samin-in-julia-simulated-annealing/30972)

<div class="topic-metadata">

**Author:** [@bashonubuntu](https://discourse.julialang.org/u/bashonubuntu)\
**Replies:** 0\
**Last updated:** [November 11, 2019, 9:57pm UTC](https://discourse.julialang.org/t/samin-in-julia-simulated-annealing/30972 "2019-11-11T21:57:47Z")

</div>

Hello, I was looking at the SAMIN() code in Optim (Optim.jl) and wanted to ask if someone could help provide some intuition for the nt, ns and neps terms. While checking some julia discourses online, there seems to be …

---

## [NLsolve always gives the initial guess as the final answer](https://discourse.julialang.org/t/nlsolve-always-gives-the-initial-guess-as-the-final-answer/30807)

<div class="topic-metadata">

**Author:** [@huchiayu0517](https://discourse.julialang.org/u/huchiayu0517)\
**Replies:** 4\
**Last updated:** [November 11, 2019, 8:54am UTC](https://discourse.julialang.org/t/nlsolve-always-gives-the-initial-guess-as-the-final-answer/30807 "2019-11-11T08:54:39Z")

</div>

Hi there! I’m trying to solve a nonlinear system of equations using the NLsolve package. However, I kept getting the same answer as my initial guess as if the solver did not do any iteration at all. I did not use Jacobia…

---

## [What's the most idiomatic way in Julia to "invert" a unit range?](https://discourse.julialang.org/t/whats-the-most-idiomatic-way-in-julia-to-invert-a-unit-range/30929)

<div class="topic-metadata">

**Author:** [@jburgy](https://discourse.julialang.org/u/jburgy)\
**Replies:** 4\
**Last updated:** [November 11, 2019, 5:59am UTC](https://discourse.julialang.org/t/whats-the-most-idiomatic-way-in-julia-to-invert-a-unit-range/30929 "2019-11-11T05:59:29Z")

</div>

I am parallelizing an implicit sparse matrix vector multiplication. This requires translating between block and matrix indices. The blocks are defined by UnitRange. getindex(v::UnitRange{T}, i::Integer) maps a block i…

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=473)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=475)
