Skip to content

Commit

Permalink
Add py_to_r conversion methods for TF 2.9 tracking wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Feb 1, 2024
1 parent 158bf9c commit 15ee3a1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ S3method(prod,tensorflow.tensor)
S3method(py_str,tensorflow.python.framework.tensor_shape.TensorShape)
S3method(py_to_r,tensorflow.python.trackable.data_structures.ListWrapper)
S3method(py_to_r,tensorflow.python.trackable.data_structures._DictWrapper)
S3method(py_to_r,tensorflow.python.training.tracking.data_structures.ListWrapper)
S3method(py_to_r,tensorflow.python.training.tracking.data_structures._DictWrapper)
S3method(range,tensorflow.tensor)
S3method(rbind,tensorflow.tensor)
S3method(rep,tensorflow.tensor)
Expand Down
8 changes: 8 additions & 0 deletions R/generics.R
Original file line number Diff line number Diff line change
Expand Up @@ -855,3 +855,11 @@ py_to_r.tensorflow.python.trackable.data_structures.ListWrapper <- function(x) {
import_builtins()$list(x)
}

# tf_version <= 2.9
#' @export
py_to_r.tensorflow.python.training.tracking.data_structures.ListWrapper <-
py_to_r.tensorflow.python.trackable.data_structures.ListWrapper

#' @export
py_to_r.tensorflow.python.training.tracking.data_structures._DictWrapper <-
py_to_r.tensorflow.python.trackable.data_structures._DictWrapper

0 comments on commit 15ee3a1

Please sign in to comment.