Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
115 views

In pytorch I can create a custom module as follows (this code example is taken from here): from torch import nn class MyModel(nn.Module): def __init__(self): super().__init__() ...
bird's user avatar
  • 3,374
2 votes
1 answer
94 views

I need to implement a U-Net in Julia using Flux.jl. The ultimate goal is to train a neural network for a scientific problem. As a first step, I decided to experiment with the KITTI benchmark dataset. ...
Baird's user avatar
  • 23
0 votes
2 answers
109 views

I have a pre-trained neural network which I want to use it without having to load Flux.jl because it takes some seconds to load flux.jl. Should I write the model again without having to load Flux.jl? ...
Mojtaba Razavi's user avatar
0 votes
1 answer
122 views

To preface, I am a complete Julia newbie... I am trying to implement PPO for the first time and I've been having issues updating the actor (and by extension critic) network parameters using the ...
Max Kim's user avatar
0 votes
1 answer
88 views

I have the following issue when running the following code, hparams = HyperParams() gen = generator() enc = encoder() dec = decoder() gen_opt = Flux.setup(Flux.Adam(hparams.lr_gen), gen) enc_opt = ...
Jose Manuel de Frutos's user avatar
0 votes
1 answer
140 views

I am experimenting with a machine learning method. My goal is to define a loss function that can evaluate the convergence of the model towards a uniform data distribution. I generate K random ...
Jose Manuel de Frutos's user avatar
1 vote
0 answers
135 views

I am using M1 mac (if that helps) and when I tried loading the setup function flux.jl and got the following error. UndefVarError setup not defined The flux version I am using is 0.13.4. I created a ...
imantha's user avatar
  • 3,880
1 vote
1 answer
164 views

(also posted in Julia discourse https://discourse.julialang.org/t/what-is-a-model-in-julia-flux-0-13-and-higher/100653) I want to use Julia Flux for machine learning with custom models (not neural ...
Yrogirg's user avatar
  • 2,413
1 vote
1 answer
104 views

Does Flux.jl have an equivalent to rsample in PyTorch that automatically implements these stochastic/policy gradients. That way the reparameterized sample becomes differentiable.
Jose Manuel de Frutos's user avatar
2 votes
0 answers
66 views

Suppose that I have the observed data $y_i\sim N(0,1/w(x_i)), $ where $x_i=i$ for $i=1,...,100$. I define the true function $w(x_i)=(x_i-50)^2$ and hope to recover this function with a Flux neural ...
Ron Snow's user avatar
  • 291
1 vote
1 answer
120 views

I am running a 3D image segmentation deep learning training pipeline on a GCloud VM and am noticing a stepwise decrease of the GPU utility after about 25 epochs and an out of memory error after 32 ...
ita's user avatar
  • 115
0 votes
0 answers
113 views

I'm training a simple model on Julia using Flux and I'm trying to compare the training times between training on GPU and on CPU (also between Julia and Python using the same model in Python with ...
Luis.Alberto's user avatar
0 votes
2 answers
341 views

In a class I'm taking, the professor gave us two datasets, one of 301 late-type galaxies and the other one of 301 early-type galaxies, and we build a model in Keras so it can differentiate them: ...
Luis.Alberto's user avatar
0 votes
0 answers
97 views

I am following the example mlp_mnist.jl from Flux model zoo and I am a little confused with the accuracy computation and train functions. The accuracy computation function loops over the dataloader ...
imantha's user avatar
  • 3,880
4 votes
1 answer
740 views

I am a newbie to Julia and Flux with some experience in Tensorflow Keras and python. I tried to use the Flux.withgradient command to write a user-defined training function with more flexibility. Here ...
PokeLu's user avatar
  • 847
1 vote
1 answer
608 views

Here's a minimal working example. using Flux myvector = [] for i in 1:3 push!(myvector, 0.1 * i) #Produces a vector [0.1, 0.2, 0.3] end Q = Chain(Dense(3, 64, relu), Dense(64, 32, relu), Dense(...
Allure's user avatar
  • 399
3 votes
0 answers
256 views

I am running through basic examples for Flux, and I am getting MethodErrors when running code verbatim through the REPL. I am using a fresh REPL and am on VERSION 1.8.2 for linux. julia> using ...
Matthew Cr's user avatar
1 vote
0 answers
390 views

I am trying to run a model using the GPU, no problem with the CPU. I think somehow using measured boundary conditions is causing the issue but I am not sure. I am following this example: https://...
user1321988's user avatar
2 votes
1 answer
199 views

I can't find a reference documentation for the gradient function of Julia Flux, there are only several tutorial examples. I understand how gradient is used to compute gradients of functions, e.g. the ...
Yrogirg's user avatar
  • 2,413
3 votes
3 answers
704 views

I'm trying to train a UNet in Julia with the help of Flux. Flux.train!(loss, Flux.params(model), train_data_loader, opt) batch_loss = loss(train_data, train_targets) where the loss is ...
F612's user avatar
  • 566
1 vote
0 answers
252 views

I'm using Julia for UNet training with GPU. (Runs without issues on CPU). The error is at NNlib's function conv_im2col() function conv_im2col!( y::AbstractArray{T,5}, x::AbstractArray{...
F612's user avatar
  • 566
9 votes
1 answer
2k views

In the following example (code copied from the Flux project.toml) what is the purpose of the [extras] and [targets] sections? [compat] Adapt = "3.0" ArrayInterface = "3.1, 4, 5, 6" ...
vikram-s-narayan's user avatar
0 votes
1 answer
296 views

While trying to install Flux I run into an error where it fails to precompile the NNlibCUDA library. Running ] test NNlibCUDA results in LoadError: UndefVarError: upsample_linear_wcn! not defined: (@...
manant02's user avatar
2 votes
1 answer
421 views

I am testing the example here: https://fluxml.ai/Flux.jl/stable/models/overview/ using Flux actual(x) = 4x + 2 x_train, x_test= hcat(0:5...), hcat(6:10...) y_train, y_test = actual.(x_train), actual.(...
ForSuhr's user avatar
  • 33
2 votes
1 answer
219 views

I am building and training a neural network model with Flux, and I am wondering if there is a way to take linear combinations of Zygote.Grads types. Here is a minimalistic example. This is how it is ...
5Pack's user avatar
  • 343
2 votes
2 answers
420 views

I am trying to implement a model with a custom loss function in the Flux.jl package. I include the code for a simplified model, but the error stays the same. I have an interpolator which takes a ...
Stefan Berger's user avatar
0 votes
1 answer
180 views

I was trying to train a convolution network. But it is not improving, i.e. loss is not decreasing. And the train function is also terminating much more quickly than usual. Below is the minimal code to ...
Ritu Lahkar's user avatar
5 votes
2 answers
236 views

I was going through this Flux.jl tutorial and came across something called Chain. m = Chain(Dense(10, 5, relu), Dense(5, 2), softmax) It was not imported from any of the used modules and no namespace ...
Jafar Isbarov's user avatar
0 votes
1 answer
618 views

I'm trying to randomly sample a mini-batch from Flux.dataloader rather than iterate through... I already created train_dataloader object, and all I need is random sampling from this object. Can you ...
Heesoo Song's user avatar
3 votes
2 answers
535 views

I'm trying to implement a gradient-free optimizer function to train convolutional neural networks with Julia using Flux.jl. The reference paper is this: https://arxiv.org/abs/2005.05955. This paper ...
Heesoo Song's user avatar
1 vote
0 answers
227 views

I’m trying to train a MLP model to predict number of real roots of polynomials. x_train and y_train include array of arrays such as [[-204, 20, 13, 1, 0]] which are coefficients of polynomials. x_test ...
skywalker's user avatar
7 votes
0 answers
685 views

I am trying to add Flux into my package repository in Julia but I am getting an error. I typed pkg> add Flux but Julia REPL returns "5 dependencies errored". And they are: LLVM ...
Kostas Fasoulakos's user avatar
1 vote
0 answers
69 views

I am very new to julia. While following tutorial in https://www.math.purdue.edu/~allen450/ML-with-Julia-Tutorial.html, Tracker.update!(W,-alpha*gW) and W = W - alpha * gW behaved differently. With W ...
Ritu Lahkar's user avatar
1 vote
1 answer
199 views

I'm trying to train an LSTM model to predict number of real roots of polynomials. x_train and y_train include array of arrays such as [[-204, 20, 13, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
skywalker's user avatar
2 votes
1 answer
394 views

I have been using Flux.jl and have been confused by the differences when running code within a let block and without. The following example runs without error: using Flux p = rand(2) function f(x) ...
L.Grozinger's user avatar
  • 2,399
2 votes
0 answers
192 views

I'm using Julia Flux.jl to train models. But when I customize my model, there is an issue the variable reference in gradient pullback function doesn't behave as expected. For simplicity, the issue ...
IceQuarze's user avatar
2 votes
1 answer
407 views

I have solved a differential equation with a neural net. I leave code below with an example. I want to be able to compute the first derivative of this neural net with respect to its input "x"...
Gooseeee's user avatar
1 vote
1 answer
321 views

I would like to find out if it's possible to load a saved Flux model or its weights (a .bson file) into an MLJ machine. I would like to evaluate the performance of my model, using the Performance ...
Samuel Mbiya's user avatar
1 vote
2 answers
538 views

Flux.jl provides a helpful train! function which when paired with the @epoch macro, can serve as the main training loop. However, unlike most custom training loops, there is no output info as to the ...
logankilpatrick's user avatar
1 vote
1 answer
397 views

I have a model which I trained using a specific dataset. I did not originally break the set up into a train and test set (which I should have). With that said, I want to do some adhoc testing to see ...
logankilpatrick's user avatar
1 vote
1 answer
361 views

My original issue was that I wanted my model to only output 0-1 so I can map back to my categorical images labels (Flux.jl restrict variables between 0 and 1). So I decided to add a sigmoid activation ...
logankilpatrick's user avatar
3 votes
3 answers
678 views

I have a resnet model which I am working with. I originally trained the model using batches of images. Now that it is trained, I want to do inference on a single image (224x224 with 3 color channels). ...
logankilpatrick's user avatar
0 votes
1 answer
176 views

Right now, I am trying to load an arbitrary .BSON model into Flux which looks like the following: weights = ONNX.load_weights("weights.bson") Dict{String, Any} with 521 entries: "...
logankilpatrick's user avatar
2 votes
0 answers
264 views

I am trying to numerically solve an integrodifferential PDE with NeuralPDE.jl. The equation has an analytical solution in the Laplace domain, and therefore I can validate the numerical solution. The ...
dapias's user avatar
  • 2,672
1 vote
0 answers
231 views

I want to run this NN in which input is time over some interval. There's no label, and the loss function requires the derivative of the outputs and a specified function (H in my code), which is also a ...
Gabriel RM's user avatar
3 votes
1 answer
733 views

I have a model trained in PyTorch, saved in .pth format. Is it possible to use and load that model in Flux.jl? I looked around but did not see this mentioned anywhere in the Flux docs.
logankilpatrick's user avatar
2 votes
1 answer
331 views

I am currently working with a dataset in which the boundary between classes is not very well defined. I don't want to use regular classification since the nuance overlap of these classes might not be ...
logankilpatrick's user avatar
2 votes
1 answer
382 views

I am currently working on a transfer learning problem so I would like to freeze most of my layers such that the model is not re-trained, and only the final layer's weights are modified. How can I ...
logankilpatrick's user avatar
2 votes
0 answers
492 views

I am currently working with some Video data so rather than use a standard feed-forward model, I want to use a Long short-term memory (LSTM) architecture such that the context/memory persists in the ...
logankilpatrick's user avatar
0 votes
0 answers
467 views

My current model is suffering from overfitting. I want to be able to add dropout to my model such that I prevent overfitting by shutting down some neurons. I was reading through this article on ...
logankilpatrick's user avatar