Skip to content

Commit

Permalink
rebuild side
Browse files Browse the repository at this point in the history
  • Loading branch information
t-kalinowski committed Jul 13, 2021
1 parent 046c814 commit 976231c
Show file tree
Hide file tree
Showing 34 changed files with 1,169 additions and 805 deletions.
2 changes: 2 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
is_true <- function(x) identical(x, TRUE)
is_bool <- function(x) identical(x, TRUE) || identical(x, FALSE)
is_tensor <- function(x) inherits(x, "tensorflow.tensor")
# is_tensor_shape <- function(x) inherits(x, "tensorflow.python.framework.tensor_shape.TensorShape")
is_eager_tensor <- function(x) is_tensor(x) && py_has_attr(x, "numpy")
is_eager <- function(x) py_has_attr(x, "numpy")
# TODO: maybe check for actual class here? with base::inherits() or
Expand Down Expand Up @@ -65,6 +66,7 @@ tensor_type <- function(x) {

drop_empty <- function(x)
x[!vapply(x, function(x) !is_tensor(x) && identical(length(x), 0L), FALSE)]
# x[!vapply(x, function(x) !is_tensor(x) && !is_tensor_shape && identical(length(x), 0L), FALSE)]

is_empty <- function(x) !is_tensor(x) && identical(length(x), 0L)

Expand Down
11 changes: 7 additions & 4 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 26 additions & 23 deletions docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 976231c

Please sign in to comment.