From 15ee3a1f1d52553bdb1b0f0101c3b351fe58dcc6 Mon Sep 17 00:00:00 2001 From: Tomasz Kalinowski Date: Thu, 1 Feb 2024 08:42:54 -0500 Subject: [PATCH] Add py_to_r conversion methods for TF 2.9 tracking wrappers --- NAMESPACE | 2 ++ R/generics.R | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/NAMESPACE b/NAMESPACE index cdb91a6..d2eb993 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -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) diff --git a/R/generics.R b/R/generics.R index bb907ad..33afa15 100644 --- a/R/generics.R +++ b/R/generics.R @@ -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