code: def cross_entropy_dense(prediction, ground_truth, weight_map=None):
      if weight_map is not None:
          raise NotImplementedError
  
      entropy = tf.nn.softmax_cross_entropy_with_logits(
          logits=prediction, labels=ground_truth
      )
      return tf.reduce_mean(entropy)
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import tensorflow
  from niftynet.engine.application_factory import LossSegmentationFactory
  from niftynet.layer.base_layer import Layer
label_desc: Use image node_id 9 for calling a global function with example usage: cross_entropy_dense(prediction, ground_truth, weight_map) and returns: tf