Skip to content

Commit cd5e927

Browse files
authored
Clean up comments in script.jl
1 parent 5357883 commit cd5e927

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

examples/2-deep-kernel-learning/script.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ ps, st = Lux.setup(rng, neuralnet)
5555

5656
# Create a wrapper function for the neural network that will be updated during training
5757
function neural_transform(x, θ)
58-
# neuralnet returns (output, new_state), we only need the output
5958
return first(neuralnet(x, θ, st))
6059
end
6160

@@ -94,11 +93,8 @@ end
9493

9594
anim = Animation()
9695
for i in 1:nmax
97-
# Compute gradients with respect to neural network parameters
9896
loss_val, grads = Zygote.withgradient(update_kernel_and_loss, ps)
99-
# Update parameters using Optimisers.jl
10097
opt_state, ps = Optimisers.update(opt_state, ps, grads[1])
101-
# Update the kernel with new parameters for visualization
10298
k = SqExponentialKernel() FunctionTransform(x -> neural_transform(x, ps))
10399
fx = AbstractGPs.FiniteGP(GP(k), x_train, noise_std^2)
104100

0 commit comments

Comments
 (0)