code: def _sum_of_squares(input_tensor):
      """Computes the sum of squares of the tensor for each element in the batch."""
      return tf.reduce_sum(
          input_tensor=tf.square(input_tensor),
          axis=tuple(range(1, input_tensor.shape.ndims)),
      )
  
file_path: graphics/tensorflow_graphics/projects/gan/losses.py
imports: from collections import abc
  from typing import Sequence, Union
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: _sum_of_squares(input_tensor) and returns: tf