code: def cross_entropy_loss(y, logits):
      # Convert labels to int 64 for tf cross-entropy function.
      y = tf.cast(y, tf.int64)
      # Apply softmax to logits and compute cross-entropy.
      loss = tf.nn.sparse_softmax_cross_entropy_with_logits(
          labels=y, logits=logits
      )
      # Average loss across the batch.
      return tf.reduce_mean(loss)
  
file_path: MachineLearningNotebooks/how-to-use-azureml/ml-frameworks/tensorflow/hyperparameter-tune-and-warm-start-with-tensorflow/tf_mnist.py
imports: import numpy
  import argparse
  import os
  import re
  import tensorflow
  import time
  import glob
  from azureml.core import Run
  from utils import load_data
  from tensorflow.keras import Model, layers
label_desc: Use image node_id 1 for calling a global function with example usage: cross_entropy_loss(y, logits) and returns: tf