Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

How to batch data for Flux for nonlinear system identification?

$
0
0

@Volker wrote:

Hi,

I´m little bit confused by the batching topic of the documentation of Flux. So here is what I would like to do:

E.g. I have a nonlinear dynamic system

y[k] = 0.4 * atan(2.0 * u[k-1]) + 0.6 * y[k-1]

I excitate the system with a signal u and store u and y. Then I delay my input signal u by one time step and concatenate it with my system output to a matrix (1000 x 2).

u = rand(1000, 1)
y = zeros(1000, 1)
for i in 2:length(u_k_1)
        y[k] = 0.4 * atan(2.0 * u[k-1]) + 0.6 * y[k-1]
end

data = hcat(vcat([0.0], u[1:end-1]), y)

Now I would like to know how to batch it for Flux considering a batch size e.g. of 32.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles