ImageShape

data class ImageShape(width: Long?, height: Long?, channels: Long?)

Helper class to keep widely used shape of image object presented as a 4D tensor (batchSize = 1, width, height, channels). null values are allowed for width, height and channels, indicating that the dimension size is unknown.

Constructors

ImageShape
Link copied to clipboard
fun ImageShape(width: Long? = null, height: Long? = null, channels: Long? = null)

Properties

channels
Link copied to clipboard
val channels: Long? = null

number of channels in the image

height
Link copied to clipboard
val height: Long? = null

image height

numberOfElements
Link copied to clipboard
val numberOfElements: Long

Returns number of elements in a tensor with the given shape.

width
Link copied to clipboard
val width: Long? = null

image width