Tutorials

Learning tasks

How To

Reference

Background

public ImageClassificationstruct

ImageClassification(classes, sz[; augmentations, ...]) <: Method{ImageClassificationTask}
ImageClassification(n, ...)

A Method for multi-class image classification using softmax probabilities.

classes is a vector of the category labels. Alternatively, you can pass an integer. Images are resized to sz.

During training, a random crop is used and augmentations, a DataAugmentation.Transform are applied.

Types

  • input::AbstractMatrix{2, <:Colorant}: an image
  • target the class label that the image belongs to
  • x::AbstractArray{Float32, 3}: a normalized 3D-array with dimensions height, width, channels
  • y::AbstractVector{Float32}: one-hot encoding of category

Model

  • input size: (sz..., ch, batch) where ch depends on color type C.
  • output size: (nclasses, batch)