Learn R Programming

kerasR (version 0.8.1)

expand_dims: 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

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