Package org.jetbrains.kotlinx.dl.dataset.preprocessor

Types

CustomPreprocessor
Link copied to clipboard
class CustomPreprocessor(customPreprocessor: Preprocessor?) : Preprocessor

This wrapper preprocessor applies the passed custom preprocessor to be used in Preprocessing DSL.

ImageShape
Link copied to clipboard
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).

Preprocessing
Link copied to clipboard
class Preprocessing

The data preprocessing pipeline presented as Kotlin DSL on receivers.

Preprocessor
Link copied to clipboard
interface Preprocessor

Basic interface for the data preprocessing.

Rescaling
Link copied to clipboard
class Rescaling(scalingCoefficient: Float) : Preprocessor

This preprocessor defines the Rescaling operation. It scales each pixel pixel_i = pixel_i / scalingCoefficient.

TensorPreprocessing
Link copied to clipboard
class TensorPreprocessing

The whole tensor preprocessing pipeline DSL.

Functions

load
Link copied to clipboard
fun Preprocessing.load(block: Loading.() -> Unit)
preprocess
Link copied to clipboard
fun preprocess(init: Preprocessing.() -> Unit): Preprocessing
rescale
Link copied to clipboard
fun TensorPreprocessing.rescale(block: Rescaling.() -> Unit)
transformImage
Link copied to clipboard
fun Preprocessing.transformImage(block: ImagePreprocessing.() -> Unit)
transformTensor
Link copied to clipboard
fun Preprocessing.transformTensor(block: TensorPreprocessing.() -> Unit)