cyto_dl.nn.track_sequence_predictor module#

class cyto_dl.nn.track_sequence_predictor.TrackClassifier(patch_size, pos_embedding_length=120, emb_dim=128, num_layer=8, num_head=4, num_classes=2)[source]#

Bases: Module

Transformer that encodes images in a sequence as tokens and classifies each of them.

forward(img)[source]#
cyto_dl.nn.track_sequence_predictor.positionalencoding1d(d_model, length)[source]#
Parameters:
  • d_model – dimension of the model

  • length – length of positions

Returns:

length*d_model position matrix