class_docstr: Model for predicting autofills given context.
class_docstr_tok: ["Model","for","predicting","autofills","given","context","."]
docstr: Builds the graph.
docstr_tok: ["Builds","the","graph","."]
code: def build(self):
      """Builds the graph."""
      featuremaps = self.get_convnet_input()
      self.residual_init()
  
      layers = self.hparams.get_conv_arch().layers
      n = len(layers)
      for i, layer in enumerate(layers):
          with tf.variable_scope("conv%d" % i):
              self.residual_counter += 1
              self.residual_save(featuremaps)
  
              featuremaps = self.apply_convolution(
                  featuremaps, layer, i
              )
              featuremaps = self.apply_residual(
                  featuremaps, is_first=i == 0, is_last=i == n - 1
              )
              featuremaps = self.apply_activation(featuremaps, layer)
              featuremaps = self.apply_pooling(featuremaps, layer)
  
              self.hiddens.append(featuremaps)
  
      self.logits = featuremaps
      self.predictions = self.compute_predictions(logits=self.logits)
      self.cross_entropy = self.compute_cross_entropy(
          logits=self.logits, labels=self.pianorolls
      )
  
      self.compute_loss(self.cross_entropy)
      self.setup_optimizer()
  
      for var in tf.trainable_variables():
          tf.logging.info("%s_%r", var.name, var.get_shape().as_list())
  
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 10 for calling the CoconetGraph obj's underlying member method code with example usage: obj.build() without return types