frarch.models.classification.cnn.fashionCNN module#

class frarch.models.classification.cnn.fashionCNN.FashionCNN(out_size: int = 128)[source]#

Bases: torch.nn.modules.module.Module

Small CNN network for FashionMNIST dataset.

Parameters

out_size (int) – Size of the output embedding for the feature extraction network. Defaults to 128.

forward(x: torch.Tensor) torch.Tensor[source]#

Define the computation performed at every call.

forward computation for FashionCNN.

Parameters

x (torch.Tensor) – input to the model.

Returns

output of the model.

Return type

torch.Tensor

training: bool#
class frarch.models.classification.cnn.fashionCNN.FashionClassifier(embedding_size: int = 128, classes: int = 10)[source]#

Bases: torch.nn.modules.module.Module

Classifier network for FashionCNN.

Parameters
  • embedding_size (int) – embedding size from FashionCNN network. Defaults to 128.

  • classes (int) – number of output classes for the classifier. Defaults to 10.

forward(x: torch.Tensor) torch.Tensor[source]#

Define the computation performed at every call.

forward computation for FashionCNN.

Parameters

x (torch.Tensor) – input to the model.

Returns

output of the model.

Return type

torch.Tensor

training: bool#