# \#first-steps

**URL:** https://discourse.julialang.org/tag/first-steps/41.md?page=4

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

**Page:** 5

---

## [Another error with defining Flux.jl gradients](https://discourse.julialang.org/t/another-error-with-defining-flux-jl-gradients/17803)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 5\
**Last updated:** [December 5, 2018, 4:09pm UTC](https://discourse.julialang.org/t/another-error-with-defining-flux-jl-gradients/17803 "2018-12-05T16:09:50Z")

</div>

Here is the MWE x = rand(12, 1000) y = rand(1000) W = param(\[1 for i=1:12\]) a = param(\[0.5\]) b = param(\[0.5\]) model(x) = begin x1 = \[maximum(x\[:,j\] .\* W) for j in 1:size(x, 2)\] (a .+ (x1 .- StatsBase.mean(x1)).…

---

## [Difficulty to understand the JuMP problem setting](https://discourse.julialang.org/t/difficulty-to-understand-the-jump-problem-setting/18112)

<div class="topic-metadata">

**Author:** [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Replies:** 13\
**Last updated:** [December 2, 2018, 5:50pm UTC](https://discourse.julialang.org/t/difficulty-to-understand-the-jump-problem-setting/18112 "2018-12-02T17:50:51Z")

</div>

Here is my MWE of the problem: using JuMP using Clp Random.seed!(2017) xlocs, ylocs = rand(5), rand(5) function demo\_problem(x,y) counter = 0 for (xx,yy) in zip(x,y) val = xx - yy if (…

---

## [How to create tracked \`cumsum\` using Flux.jl?](https://discourse.julialang.org/t/how-to-create-tracked-cumsum-using-flux-jl/17772)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 12\
**Last updated:** [December 1, 2018, 7:35am UTC](https://discourse.julialang.org/t/how-to-create-tracked-cumsum-using-flux-jl/17772 "2018-12-01T07:35:27Z")

</div>

I wanted to create a cumsum of tracked values. How do I do that? I tried the below which failed W = param(rand(12,1)) cumsum(Tracker.data(W), dims = 1) # works cumsum(W, dims = 1) # this fails I got it to work using m…

---

## [Struggling with a Point type for several dimensions](https://discourse.julialang.org/t/struggling-with-a-point-type-for-several-dimensions/18066)

<div class="topic-metadata">

**Author:** [@ajp](https://discourse.julialang.org/u/ajp)\
**Replies:** 30\
**Last updated:** [November 30, 2018, 10:11am UTC](https://discourse.julialang.org/t/struggling-with-a-point-type-for-several-dimensions/18066 "2018-11-30T10:11:26Z")

</div>

Hi, Very new to Julia (and Discourse), download 1.0.2 yesterday. I have a large code base in python that I want to port. Python code is slow, hence the move. I have another large code base in c++ (c++14) that is also …

---

## [Package suggestions for project](https://discourse.julialang.org/t/package-suggestions-for-project/18169)

<div class="topic-metadata">

**Author:** [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Replies:** 1\
**Last updated:** [November 30, 2018, 9:30am UTC](https://discourse.julialang.org/t/package-suggestions-for-project/18169 "2018-11-30T09:30:14Z")

</div>

Hi Guys, I am a bit new to Julia. Till now I have mostly explored JuliaImages. Now I’m trying to implement something related to Belief Propagation as a project for my Neural Networks course in grad school. I was wonder…

---

## [Plot graphs](https://discourse.julialang.org/t/plot-graphs/17805)

<div class="topic-metadata">

**Author:** [@kirtsar](https://discourse.julialang.org/u/kirtsar)\
**Replies:** 1\
**Last updated:** [November 22, 2018, 2:28pm UTC](https://discourse.julialang.org/t/plot-graphs/17805 "2018-11-22T14:28:06Z")

</div>

Is it possible to plot graphs with VScode? I was trying TikzGraphs and GraphPlot, but none of it works (it actually gives a lot of text in the REPL, but no pictures).

---

## [Yet another broadcast question](https://discourse.julialang.org/t/yet-another-broadcast-question/17526)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 10\
**Last updated:** [November 15, 2018, 9:36am UTC](https://discourse.julialang.org/t/yet-another-broadcast-question/17526 "2018-11-15T09:36:15Z")

</div>

Hi, I want to perform a given computation f1D on all the “rows” of 3D arrays x,y: #2 3D arrays x=ones(Float32,10,10,5) y=ones(Float32,10,10,5) #a function (not parallel) function f1D!(x1d,y1d) for k=2:length(x1d) …

---

## [Module basics](https://discourse.julialang.org/t/module-basics/16770)

<div class="topic-metadata">

**Author:** [@Vic](https://discourse.julialang.org/u/Vic)\
**Replies:** 13\
**Last updated:** [October 25, 2018, 10:52pm UTC](https://discourse.julialang.org/t/module-basics/16770 "2018-10-25T22:52:27Z")

</div>

I’m reading the docs, and I get that module is for definitions. I want to make sure I understood: Can you also have expressions on RHS of assignment? like x=2+3 and y=x-2 ? No loops or other statements ? Because this M…

---

## [Please explain syntax](https://discourse.julialang.org/t/please-explain-syntax/16148)

<div class="topic-metadata">

**Author:** [@govorunov](https://discourse.julialang.org/u/govorunov)\
**Replies:** 27\
**Last updated:** [October 11, 2018, 11:12pm UTC](https://discourse.julialang.org/t/please-explain-syntax/16148 "2018-10-11T23:12:13Z")

</div>

Hi. I recently started reading through Julia base library code and stumbled on the following syntax (char.jl): Char (::Type{T})(x::Number) where {T\<:AbstractChar} = T(UInt32(x)) (::Type{AbstractChar})(x::Number) = Char…

---

## [How to use crossentropy in a multi-class classification Flux.jl neural network?](https://discourse.julialang.org/t/how-to-use-crossentropy-in-a-multi-class-classification-flux-jl-neural-network/16140)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 3\
**Last updated:** [October 11, 2018, 10:18am UTC](https://discourse.julialang.org/t/how-to-use-crossentropy-in-a-multi-class-classification-flux-jl-neural-network/16140 "2018-10-11T10:18:37Z")

</div>

I am having trouble defining the crossentropy loss using Flux.jl. using Flux,StatsBase model = Flux.Chain( Dense(13\*16, 128, relu), Dense(128, 64, relu), Dense(64, 32, relu), Dense(32, 4, relu), softmax); l…

---

## [Need help making my first Julia package](https://discourse.julialang.org/t/need-help-making-my-first-julia-package/16138)

<div class="topic-metadata">

**Author:** [@danielc](https://discourse.julialang.org/u/danielc)\
**Replies:** 5\
**Last updated:** [October 10, 2018, 11:25pm UTC](https://discourse.julialang.org/t/need-help-making-my-first-julia-package/16138 "2018-10-10T23:25:15Z")

</div>

Hello, I am writing a Julia package that I want to make publicly available on GitHub. I am been following the instructions on this website: https://docs.julialang.org/en/v1/stdlib/Pkg/ I am mostly done. I used pkg\> ad…

---

## [How to suppress printing of Flux.@epochs?](https://discourse.julialang.org/t/how-to-suppress-printing-of-flux-epochs/16063)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 3\
**Last updated:** [October 9, 2018, 11:36am UTC](https://discourse.julialang.org/t/how-to-suppress-printing-of-flux-epochs/16063 "2018-10-09T11:36:57Z")

</div>

Flux.@epochs prints out lots of info. How do I suppress its input totally? Current Suppressor.jl doesn’t work on v1.0.x so can’t use that. MWE using Flux model = Flux.Chain( Dense(14\*16+4, 128, relu), Dense(128…

---

## [How to convert Flux.jl's tracked values to just values](https://discourse.julialang.org/t/how-to-convert-flux-jls-tracked-values-to-just-values/16051)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [October 9, 2018, 4:13am UTC](https://discourse.julialang.org/t/how-to-convert-flux-jls-tracked-values-to-just-values/16051 "2018-10-09T04:13:57Z")

</div>

I have a Flux.jl tracked calculated value and I would like to convert it to Float64 for plotting. How do I do that? using Flux model = Flux.Chain( Dense(14\*16+4, 64, relu), Dense(64, 16, relu), Dense(16, 1, …

---

## [Question about how to train a neural network using Flux.jl](https://discourse.julialang.org/t/question-about-how-to-train-a-neural-network-using-flux-jl/16011)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [October 8, 2018, 10:01am UTC](https://discourse.julialang.org/t/question-about-how-to-train-a-neural-network-using-flux-jl/16011 "2018-10-08T10:01:09Z")

</div>

I am trying to build a neural network that has about 200 Boolean features as inputs and I would like to train it against a regression output (so the y is continuous). I tried to setup the network like so using Flux mode…

---

## [Package use, CUDA stream support, etc](https://discourse.julialang.org/t/package-use-cuda-stream-support-etc/14868)

<div class="topic-metadata">

**Author:** [@drinkwell](https://discourse.julialang.org/u/drinkwell)\
**Replies:** 5\
**Last updated:** [September 13, 2018, 2:59pm UTC](https://discourse.julialang.org/t/package-use-cuda-stream-support-etc/14868 "2018-09-13T14:59:02Z")

</div>

Hi, I’m just starting to think about writing some Julia GPU code and am trying to bottom out a few things so would appreciate some pointers. First off, what are the currently preferred packages to use? I’ve Nvidia hard…

---

## [Logistic regression with GLM : not working with Categorical Arrays?](https://discourse.julialang.org/t/logistic-regression-with-glm-not-working-with-categorical-arrays/14411)

<div class="topic-metadata">

**Author:** [@kirtsar](https://discourse.julialang.org/u/kirtsar)\
**Replies:** 1\
**Last updated:** [September 2, 2018, 3:08am UTC](https://discourse.julialang.org/t/logistic-regression-with-glm-not-working-with-categorical-arrays/14411 "2018-09-02T03:08:49Z")

</div>

Hello there! I’m trying to do logistic regression using GLM Package. My Y-variable is of type categorical array, the predictor is the usual Float64-array. When I’m trying to make a model with @formula(Y ~ X), I’ve got a…

---

## [is the code correct to set parameters in Gurobi](https://discourse.julialang.org/t/is-the-code-correct-to-set-parameters-in-gurobi/14226)

<div class="topic-metadata">

**Author:** [@Summer](https://discourse.julialang.org/u/Summer)\
**Replies:** 2\
**Last updated:** [August 30, 2018, 4:49am UTC](https://discourse.julialang.org/t/is-the-code-correct-to-set-parameters-in-gurobi/14226 "2018-08-30T04:49:43Z")

</div>

Hello, I am using Gurobi as the solver in Julia to solve the problem but now encountered the out-of-memory error. I understand that Gurobi has parameters such as NodefileStart and Thread to deal with this problem (h…

---

## [IJulia build issues](https://discourse.julialang.org/t/ijulia-build-issues/9231)

<div class="topic-metadata">

**Author:** [@sirtom67](https://discourse.julialang.org/u/sirtom67)\
**Replies:** 2\
**Last updated:** [February 22, 2018, 12:19pm UTC](https://discourse.julialang.org/t/ijulia-build-issues/9231 "2018-02-22T12:19:04Z")

</div>

New user. Running on ubuntu 16.04, source build of julia commit 231676a93442616663470e94d49cbb56085be536 Author: Ellipse0934 \<adityapuranik97@gmail.com\> Date: Sat Feb 10 17:13:38 2018 +0530 I am trying to follow the …

---

## [Julia Scientific Computing 4Week Course](https://discourse.julialang.org/t/julia-scientific-computing-4week-course/8387)

<div class="topic-metadata">

**Author:** [@Joshua\_Bowles](https://discourse.julialang.org/u/Joshua_Bowles)\
**Replies:** 3\
**Last updated:** [January 16, 2018, 6:15am UTC](https://discourse.julialang.org/t/julia-scientific-computing-4week-course/8387 "2018-01-16T06:15:12Z")

</div>

The course link starts today and looks like it’s gonna be a great resource. I have not taken it so I can’t speak to the quality or effectiveness. But I’m excited for it and thought I’d share. https://www.coursera.org/le…

---

## [Performance with MongoDB ](https://discourse.julialang.org/t/performance-with-mongodb/7577)

<div class="topic-metadata">

**Author:** [@Massimo\_Redaelli](https://discourse.julialang.org/u/Massimo_Redaelli)\
**Replies:** 6\
**Last updated:** [December 15, 2017, 11:49pm UTC](https://discourse.julialang.org/t/performance-with-mongodb/7577 "2017-12-15T23:49:08Z")

</div>

I recently changed job and I am now working in a company doing data science stuff with heavy emphasis on geospatial timeseries. I work with two statisticians that have so far implemented everything in R, and occasionall…

---

## [Getting Julia running on ATom](https://discourse.julialang.org/t/getting-julia-running-on-atom/3932)

<div class="topic-metadata">

**Author:** [@ravi\_nagori](https://discourse.julialang.org/u/ravi_nagori)\
**Replies:** 14\
**Last updated:** [November 12, 2017, 4:29pm UTC](https://discourse.julialang.org/t/getting-julia-running-on-atom/3932 "2017-11-12T16:29:24Z")

</div>

I have linud mint and installed julia via the sudo apt-get install command.It installs julia version 0.4.5 . I am trying to run JUNO on atom. every time I run a basic command (say “2+2”) I encounter this error: “MethodE…

---

## [What packages/libraries should a beginner start to read?](https://discourse.julialang.org/t/what-packages-libraries-should-a-beginner-start-to-read/5766)

<div class="topic-metadata">

**Author:** [@crlaugh](https://discourse.julialang.org/u/crlaugh)\
**Replies:** 2\
**Last updated:** [September 8, 2017, 8:50am UTC](https://discourse.julialang.org/t/what-packages-libraries-should-a-beginner-start-to-read/5766 "2017-09-08T08:50:34Z")

</div>

I am starting to learn about and play with Julia for scientific programming, and it seems like it has a number of interesting and powerful features. While the documentation on julialang.org is great and the few books ou…

---

## [Index array using boolean result of a comparison](https://discourse.julialang.org/t/index-array-using-boolean-result-of-a-comparison/5712)

<div class="topic-metadata">

**Author:** [@ericsfraga](https://discourse.julialang.org/u/ericsfraga)\
**Replies:** 6\
**Last updated:** [September 4, 2017, 2:11pm UTC](https://discourse.julialang.org/t/index-array-using-boolean-result-of-a-comparison/5712 "2017-09-04T14:11:25Z")

</div>

Hello, I am trying to reset the values of a vector (1d array) for any values that are outside a bound. In 0.5, I did the following, for instance: x\[x.\<a\] = a\[x.\<a\] This works if I type it in on the console but fails w…

---

## [Using IOBuffer](https://discourse.julialang.org/t/using-iobuffer/5216)

<div class="topic-metadata">

**Author:** [@clinton](https://discourse.julialang.org/u/clinton)\
**Replies:** 4\
**Last updated:** [August 4, 2017, 4:22am UTC](https://discourse.julialang.org/t/using-iobuffer/5216 "2017-08-04T04:22:38Z")

</div>

Regarding IOBuffer, the current documentation (https://docs.julialang.org/en/stable/stdlib/io-network/) says: Create an IOBuffer, which may optionally operate on a pre-existing array. If the readable/writable argument…

---

## [JuliaOpt parallel algorithms](https://discourse.julialang.org/t/juliaopt-parallel-algorithms/5093)

<div class="topic-metadata">

**Author:** [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Replies:** 7\
**Last updated:** [August 1, 2017, 8:43am UTC](https://discourse.julialang.org/t/juliaopt-parallel-algorithms/5093 "2017-08-01T08:43:38Z")

</div>

Hi, I am currently using NLopt.jl to estimate parameters of differential equation systems. I am interested to speed up the calculations hence I am searching for solutions to solve optimization problem in parallel (using…

---

## [Modifier Function Naming Style](https://discourse.julialang.org/t/modifier-function-naming-style/5047)

<div class="topic-metadata">

**Author:** [@clinton](https://discourse.julialang.org/u/clinton)\
**Replies:** 2\
**Last updated:** [July 25, 2017, 2:17am UTC](https://discourse.julialang.org/t/modifier-function-naming-style/5047 "2017-07-25T02:17:11Z")

</div>

Say I have the following trivial function: function foo(A, x, b=Vector{Float64}(length(x))) b .= A \* x return b end My question is, should the function be named foo, foo!, or should I break this into two functions?…

---

## [Recommended packages to contribute to for newcomers?](https://discourse.julialang.org/t/recommended-packages-to-contribute-to-for-newcomers/3416)

<div class="topic-metadata">

**Author:** [@ajkeith](https://discourse.julialang.org/u/ajkeith)\
**Replies:** 2\
**Last updated:** [April 28, 2017, 1:03pm UTC](https://discourse.julialang.org/t/recommended-packages-to-contribute-to-for-newcomers/3416 "2017-04-28T13:03:34Z")

</div>

Hello! I’ve been using Julia for homework and I’m interested in getting more involved in package development. In the near term I’d like to contribute to some stats packages to get a feel for how packages work, with a lon…

---

## [Warning: Method definition. Simple explanation please](https://discourse.julialang.org/t/warning-method-definition-simple-explanation-please/2997)

<div class="topic-metadata">

**Author:** [@samsamsam](https://discourse.julialang.org/u/samsamsam)\
**Replies:** 5\
**Last updated:** [April 1, 2017, 10:29am UTC](https://discourse.julialang.org/t/warning-method-definition-simple-explanation-please/2997 "2017-04-01T10:29:57Z")

</div>

Hi, I’m totally new to Julia, and I was hoping for a simple explanation of the error in the title of this post. Other posts I’ve read say something about conditionally defining functions. But I’m encountering this error…

---

## [Stay in -i REPL after ERROR?](https://discourse.julialang.org/t/stay-in-i-repl-after-error/2873)

<div class="topic-metadata">

**Author:** [@Benoit9](https://discourse.julialang.org/u/Benoit9)\
**Replies:** 6\
**Last updated:** [March 30, 2017, 6:48pm UTC](https://discourse.julialang.org/t/stay-in-i-repl-after-error/2873 "2017-03-30T18:48:15Z")

</div>

I am debugging my first Julia script with the -i flag. After an Error, the interactive REPL exits. Is there a way to remain in the repl to examine the variables, definitions, etc. that caused the error? Thank you!

---

## [Publishing my first package: "Object is not a commit object"](https://discourse.julialang.org/t/publishing-my-first-package-object-is-not-a-commit-object/1698)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 4\
**Last updated:** [January 26, 2017, 12:51pm UTC](https://discourse.julialang.org/t/publishing-my-first-package-object-is-not-a-commit-object/1698 "2017-01-26T12:51:05Z")

</div>

Hello, I have finally managed to set-up the documentation and CI testing for a package I want to publish to metadata. I was about to do the final steps of the package and I am getting an error I do not know how to hand…

[Previous page](https://discourse.julialang.org/tag/first-steps/41.md?match_all_tags=true&page=3&tags%5B%5D=first-steps)

[Next page](https://discourse.julialang.org/tag/first-steps/41.md?match_all_tags=true&page=5&tags%5B%5D=first-steps)
