How to convert Flux.jl's tracked values to just values

first-steps
flux

#1

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, relu));
loss(x,y) = sum((model(x) .- y).^2)
opt = ADAM(params(model))

x = rand(Bool, 14*16+4)
tracked_value = model(x)
Float64.(tracked_value) # doesn't work

just gives me the tracked value not the Float64 values


#2

Should be

Tracker.data(tracked_value)

cf https://github.com/FluxML/Flux.jl/issues/398