(hparams)
Updates hparams for symbolic music modeling problems.
Updates hparams for symbolic music modeling problems.
Updates hparams for symbolic music modeling problems .
def update_transformer_hparams_for_music(hparams):
  """Updates hparams for symbolic music modeling problems."""
  hparams.shared_embedding_and_softmax_weights = False
  hparams.symbol_modality_num_shards = 1
  hparams.label_smoothing = 0.0

  hparams.layer_prepostprocess_dropout = 0.1
  hparams.attention_dropout = 0.1
  hparams.relu_dropout = 0.1

  hparams.max_length = 0
  hparams.batch_size = 2048

  hparams.sampling_method = "random"
  hparams.summarize_vars = True

  # For local attention.
  hparams.add_hparam("block_length", 512)

  # For decoding.
  hparams.add_hparam("decode_output_dir", "/tmp/")

  # For multi-embedding aggregation in melody & performance autoencoder
  hparams.add_hparam("aggregation", "sum")
def update_transformer_hparams_for_music ( hparams ) : hparams . shared_embedding_and_softmax_weights = False hparams . symbol_modality_num_shards = 1 hparams . label_smoothing = 0.0 hparams . layer_prepostprocess_dropout = 0.1 hparams . attention_dropout = 0.1 hparams . relu_dropout = 0.1 hparams . max_length = 0 hparams . batch_size = 2048 hparams . sampling_method = "random" hparams . summarize_vars = True # For local attention. hparams . add_hparam ( "block_length" , 512 ) # For decoding. hparams . add_hparam ( "decode_output_dir" , "/tmp/" ) # For multi-embedding aggregation in melody & performance autoencoder hparams . add_hparam ( "aggregation" , "sum" )