You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using DistributionsAD, Distributions, Flux
using DistributionsAD: TuringDiagMvNormal
Flux.@functor TuringDiagMvNormal
m = [1.0]
S = [0.1]
f =TuringDiagMvNormal(m,S)
x =5.+randn(1,100)
ps = Flux.params(f)
#loss() = sum(logpdf(f,x)) # this returns nothings the loop belowloss() =loglikelihood(f,x) # this works fine
gs = Flux.gradient(loss, ps)
for p in ps
display(gs[p])
end
I think the logpdf is not hit during the gradient computation somehow. adding an error() in here still just returns nothings...
The text was updated successfully, but these errors were encountered:
This puzzles me a bit
I think the
logpdf
is not hit during thegradient
computation somehow. adding anerror()
in here still just returnsnothing
s...The text was updated successfully, but these errors were encountered: