Skip to content

Commit 24ca4dd

Browse files
committed
calling keras_array allows passing vectors to adapt
1 parent 687d341 commit 24ca4dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/layer-methods.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ as_node_index <- function(node_index) {
168168
#'
169169
#' @export
170170
adapt <- function(object, data, reset_state = NULL) {
171+
172+
data <- keras_array(data)
173+
171174
# layers can implement adapt with different default reset_state
172175
if (is.null(reset_state))
173176
object$adapt(data)

0 commit comments

Comments
 (0)