R/types.R

#' Tensor shape
#'
#' @param ... Tensor dimensions
#'
#' @export
shape <- function(...) {
  values <- list(...)
  lapply(values, function(value) {
    if (!is.null(value))
      as.integer(value)
    else
      NULL
  })
}
eric-erki/TensorFlow-for-R documentation built on May 31, 2019, 12:10 p.m.