Skip to content

Commit

Permalink
Force TFP modules to load, fix model init
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannes Riebl committed Jun 26, 2024
1 parent 724d32e commit badb029
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ plot.liesel.model.model.Model <- function(x, nodes = FALSE, ...) {
#' @importFrom reticulate py_has_attr

get_distribution <- function(x) {
.lsld$GaussianCopula # fix #4
.tfd$Normal # fix #4

if (is.character(x)) {
if (py_has_attr(.lsld, x)) .lsld[[x]] else .tfd[[x]]
} else {
Expand All @@ -63,6 +66,9 @@ get_distribution <- function(x) {
#' @importFrom reticulate py_has_attr

get_bijector <- function(x) {
.lslb$AlgebraicSigmoid # fix #4
.tfb$Identity # fix #4

if (is.character(x)) {
if (py_has_attr(.lslb, x)) .lslb[[x]] else .tfb[[x]]
} else {
Expand Down

0 comments on commit badb029

Please sign in to comment.