as_CNN_image_Y: Create a one-hot vector for image labels (output)

View source: R/deepCNN.r

as_CNN_image_YR Documentation

Create a one-hot vector for image labels (output)

Description

Create a one-hot vector for image labels (output)

Usage

as_CNN_image_Y(y, encoding = c("one_hot", "sparse"))

Arguments

y

The labels of the images either as factors for single-label classification or as a numeric or logical matrix for multi-label classification.

encoding

The type of encoding: one-hot encoding or sparse encoding.

Value

A one-hot encoded vector or matrix for the image labels.

See Also

one_hot_encode, as_CNN_image_X

Other Convolutional Neural Network (CNN): alexnet(), as_CNN_image_X(), as_CNN_temp_X(), as_CNN_temp_Y(), as_images_array(), as_images_tensor(), images_load(), images_resize(), inception_resnet_v2(), inception_v3(), lenet5(), mobilenet(), mobilenet_v2(), mobilenet_v3(), nasnet(), resnet, unet(), vgg, xception(), zfnet()


stschn/deepANN documentation built on June 25, 2024, 7:27 a.m.