original_docstring: 
          Step of optimization
          1. Move data to device
          2. Get emmbeddings from data
          3. Run Miners for triplet/pair mining. It can be also empty function
          4. Run Loss function. Return Loss and logs
          5. Update model parameters
  
          :param data: Data as Tensor
          :param labels: Labels as Tensor
          
docstring: Step of optimization
  1. Move data to device
  2. Get emmbeddings from data
  3. Run Miners for triplet/pair mining. It can be also empty function
  4. Run Loss function. Return Loss and logs
  5. Update model parameters
docstring_tokens: Step of optimization 1 . Move data to device 2 . Get emmbeddings from data 3 . Run Miners for triplet / pair mining . It can be also empty function 4 . Run Loss function . Return Loss and logs 5 . Update model parameters
code: def forward_and_backward(self, data, labels):
          """
          Step of optimization
          1. Move data to device
          2. Get emmbeddings from data
          3. Run Miners for triplet/pair mining. It can be also empty function
          4. Run Loss function. Return Loss and logs
          5. Update model parameters
  
          :param data: Data as Tensor
          :param labels: Labels as Tensor
          """
          data = data.to(self.device)
          labels = labels.to(self.device)
          embeddings = self.models(data)
          embeddings = self.mining_funcs(embeddings, labels)
  
          # triplet sampler and Loss
          loss, logs = self.loss_funcs(embeddings, labels)
          self.metrics.update(**logs)
          self.optimizers.zero_grad()
          loss.backward()
          self.optimizers.step()
code_tokens: def forward_and_backward ( self , data , labels ) : data = data . to ( self . device ) labels = labels . to ( self . device ) embeddings = self . models ( data ) embeddings = self . mining_funcs ( embeddings , labels ) loss , logs = self . loss_funcs ( embeddings , labels ) self . metrics . update ( ** logs ) self . optimizers . zero_grad ( ) loss . backward ( ) self . optimizers . step ( )
short_docstring: Step of optimization
  1.
short_docstring_tokens: Step of optimization 1 .
comment: """
          Step of optimization
          1. Move data to device
          2. Get emmbeddings from data
          3. Run Miners for triplet/pair mining. It can be also empty function
          4. Run Loss function. Return Loss and logs
          5. Update model parameters
  
          :param data: Data as Tensor
          :param labels: Labels as Tensor
          """$SEP$# triplet sampler and Loss