rstudio / tfprobability

R interface to TensorFlow Probability
https://rstudio.github.io/tfprobability/
Other
54 stars 16 forks source link

AttributeError: module 'tensorflow_probability.python.sts' has no attribute 'build_factored_variational_loss' #157

Open EngineerTaoH opened 1 year ago

EngineerTaoH commented 1 year ago

Hi,

I try to use sts_build_factored_variational_loss to build the loss function, but the error occurs:

'AttributeError: module 'tensorflow_probability.python.sts' has no attribute 'build_factored_variational_loss''.

I check the function

sts_build_factored_variational_loss <-
  function(observed_time_series,
           model,
           init_batch_shape = list(),
           seed = NULL,
           name = NULL) {
    tfp$sts$build_factored_variational_loss(model, observed_time_series, init_batch_shape, seed, name)
}

It seems in sts.R there is no 'build_factored_variational_loss', meaning tfp$sts$build_factored_variational_loss won't work.

I am quite new to programming so I have no idea if that is really the root of the error.

Could you please help me with it?

Thanks.