original_docstring:  Concrete function for train setp and update train metircs
  
          Args:
              features (OrderedDict:tf.Tensor): OrderedDict of tensor containing input  features.
              labels (tf.Tensor): labels indicating the next_item id
  
          Returns:
              None
          
docstring: Concrete function for train setp and update train metircs
docstring_tokens: Concrete function for train setp and update train metircs
code: def train_step(features, labels):
          """ Concrete function for train setp and update train metircs
  
          Args:
              features (OrderedDict:tf.Tensor): OrderedDict of tensor containing input  features.
              labels (tf.Tensor): labels indicating the next_item id
  
          Returns:
              None
          """
          with tf.GradientTape() as tape:
              predictions = model(features, training=True)
              label_indicies = item_index_table.lookup(labels)
              loss = loss_object(label_indicies, predictions)
          gradients = tape.gradient(loss, model.trainable_variables)
          optimizer.apply_gradients(zip(gradients, model.trainable_variables))
  
          train_loss(loss)
          train_accuracy(label_indicies, predictions)
          train_top_10_accuracy(label_indicies, predictions)
code_tokens: def train_step ( features , labels ) : with tf . GradientTape ( ) as tape : predictions = model ( features , training = True ) label_indicies = item_index_table . lookup ( labels ) loss = loss_object ( label_indicies , predictions ) gradients = tape . gradient ( loss , model . trainable_variables ) optimizer . apply_gradients ( zip ( gradients , model . trainable_variables ) ) train_loss ( loss ) train_accuracy ( label_indicies , predictions ) train_top_10_accuracy ( label_indicies , predictions )
short_docstring: Concrete function for train setp and update train metircs
short_docstring_tokens: Concrete function for train setp and update train metircs
comment: """ Concrete function for train setp and update train metircs
  
          Args:
              features (OrderedDict:tf.Tensor): OrderedDict of tensor containing input  features.
              labels (tf.Tensor): labels indicating the next_item id
  
          Returns:
              None
          """