class_docstr: Model for predicting autofills given context.
class_docstr_tok: ["Model","for","predicting","autofills","given","context","."]
code: def compute_cross_entropy(self, logits, labels):
      if self.hparams.use_softmax_loss:
          # don't use tf.nn.softmax_cross_entropy because we need the shape to
          # remain constant
          return -tf.nn.log_softmax(logits, dim=2) * labels
      else:
          return tf.nn.sigmoid_cross_entropy_with_logits(
              logits=logits, labels=labels
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  from magenta.models.coconet import lib_hparams
  from magenta.models.coconet import lib_tfutil
  import tensorflow.compat.v1
label_desc: Use image node_id 14 for calling the CoconetGraph obj's underlying member method code with example usage: obj.compute_cross_entropy(logits, labels) and returns: unknown, tf