Issue while using ReverseDiff in turing model

Sahil_Khan
Thu, 01 Jun 2023 11:36:55 +0000
New to Julia

Hello,

In discourse I found out that using reversediff is better for performance when you have high dimensional model. So, I’m trying to switch to reversediff from forwarddiff.

But at the moment I’m facing this issue

nested task error: type TrackedArray has no field retcode

In my code I have this checkpoint

 if SciMLBase.successful_retcode(sol.retcode)  == 1
    predicted[i] = sol'[16,6]
  else
    Turing.@addlogprob! -Inf
    return nothing
  end

which seems to be cause of error message. Is there any way to resolve this?

5 posts - 2 participants