expand_dims: Expand dimensions of an array

View source: R/preprocessing.R

expand_dimsR Documentation

Expand dimensions of an array

Description

Expand the shape of an array by inserting a new axis, corresponding to a given position in the array shape. Useful when predicting a model based on a single input.

Usage

expand_dims(a, axis = 0)

Arguments

a

array to expand

axis

position (amongst axes) where new axis is to be inserted.

Author(s)

Taylor B. Arnold, taylor.arnold@acm.org

References

Chollet, Francois. 2015. Keras: Deep Learning library for Theano and TensorFlow.

See Also

Other preprocessing: Tokenizer, img_to_array, load_img, one_hot, pad_sequences, text_to_word_sequence


kerasR documentation built on Aug. 17, 2022, 5:06 p.m.