original_docstring: 
      Build the TensorFLow loss and optimizer operations.
      :param nn_last_layer: TF Tensor of the last layer in the neural network
      :param correct_label: TF Placeholder for the correct label image
      :param learning_rate: TF Placeholder for the learning rate
      :param num_classes: Number of classes to classify
      :return: Tuple of (logits, train_op, cross_entropy_loss)
      
docstring: Build the TensorFLow loss and optimizer operations.
docstring_tokens: Build the TensorFLow loss and optimizer operations .
code: def optimize(nn_last_layer, correct_label, learning_rate, num_classes):
      """
      Build the TensorFLow loss and optimizer operations.
      :param nn_last_layer: TF Tensor of the last layer in the neural network
      :param correct_label: TF Placeholder for the correct label image
      :param learning_rate: TF Placeholder for the learning rate
      :param num_classes: Number of classes to classify
      :return: Tuple of (logits, train_op, cross_entropy_loss)
      """
      # TODO: Implement function
      logits = tf.reshape(nn_last_layer, (-1, num_classes))
      labels = tf.reshape(correct_label, (-1, num_classes))
  
      cross_entropy_loss = tf.reduce_mean(
          tf.nn.softmax_cross_entropy_with_logits(logits=logits, labels=labels))
      train_op = tf.train.AdamOptimizer(
          learning_rate).minimize(cross_entropy_loss)
  
      return logits, train_op, cross_entropy_loss
code_tokens: def optimize ( nn_last_layer , correct_label , learning_rate , num_classes ) : logits = tf . reshape ( nn_last_layer , ( - 1 , num_classes ) ) labels = tf . reshape ( correct_label , ( - 1 , num_classes ) ) cross_entropy_loss = tf . reduce_mean ( tf . nn . softmax_cross_entropy_with_logits ( logits = logits , labels = labels ) ) train_op = tf . train . AdamOptimizer ( learning_rate ) . minimize ( cross_entropy_loss ) return logits , train_op , cross_entropy_loss
short_docstring: Build the TensorFLow loss and optimizer operations.
short_docstring_tokens: Build the TensorFLow loss and optimizer operations .
comment: """
      Build the TensorFLow loss and optimizer operations.
      :param nn_last_layer: TF Tensor of the last layer in the neural network
      :param correct_label: TF Placeholder for the correct label image
      :param learning_rate: TF Placeholder for the learning rate
      :param num_classes: Number of classes to classify
      :return: Tuple of (logits, train_op, cross_entropy_loss)
      """$SEP$# TODO: Implement function