Skip to content

Commit 300c6d9

Browse files
committed
only use keras_array if it's not a python object for tfdatasets case
1 parent 595932e commit 300c6d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/layer-methods.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ as_node_index <- function(node_index) {
169169
#' @export
170170
adapt <- function(object, data, reset_state = NULL) {
171171

172-
data <- keras_array(data)
172+
if (!inherits(data, "python.builtin.object"))
173+
data <- keras_array(data)
173174

174175
# layers can implement adapt with different default reset_state
175176
if (is.null(reset_state))

0 commit comments

Comments
 (0)