all_dims: All dims

Description Usage Examples

Description

This function returns an object that can be used when subsetting tensors with [. If you are familiar with python,, this is equivalent to the python Ellipsis ..., (not to be confused with ... in R).

Usage

1

Examples

1
2
3
4
5
6
7
8
## Not run: 
# in python, if x is a numpy array or tensorflow tensor
x[..., i]
# the ellipsis means "expand to match number of dimension of x".
# to translate the above python expression to R, write:
x[all_dims(), i]

## End(Not run)

eric-erki/TensorFlow-for-R documentation built on May 31, 2019, 12:10 p.m.