(model, use_tf_sampling)
return tf.saved_model.signature_def_utils.predict_signature_def(
      inputs={
          'pianorolls': model.model.pianorolls,
          'masks': model.model.masks,
          'lengths': model.model.lengths,
      }, outputs={
          'predictions': model.model.predictions
      })
Creates a signature def for the SavedModel.
Creates a signature def for the SavedModel.
Creates a signature def for the SavedModel .
def get_signature_def(model, use_tf_sampling):
  """Creates a signature def for the SavedModel."""
  if use_tf_sampling:
    return tf.saved_model.signature_def_utils.predict_signature_def(
        inputs={
            'pianorolls': model.inputs['pianorolls'],
        }, outputs={
            'predictions': tf.cast(model.samples, tf.bool),
        })
  return tf.saved_model.signature_def_utils.predict_signature_def(
      inputs={
          'pianorolls': model.model.pianorolls,
          'masks': model.model.masks,
          'lengths': model.model.lengths,
      }, outputs={
          'predictions': model.model.predictions
      })
def get_signature_def ( model , use_tf_sampling ) : if use_tf_sampling : return tf . saved_model . signature_def_utils . predict_signature_def ( inputs = { 'pianorolls' : model . inputs [ 'pianorolls' ] , } , outputs = { 'predictions' : tf . cast ( model . samples , tf . bool ) , } ) return tf . saved_model . signature_def_utils . predict_signature_def ( inputs = { 'pianorolls' : model . model . pianorolls , 'masks' : model . model . masks , 'lengths' : model . model . lengths , } , outputs = { 'predictions' : model . model . predictions } )