(self)
return line
Get all hyperparameters as a string.
Get all hyperparameters as a string.
Get all hyperparameters as a string .
def __str__(self):
    """Get all hyperparameters as a string."""
    # include allowed keys only
    shorthand = dict(
        batch_size='bs',
        learning_rate='lr',
        optimize_mask_only='mask_only',
        corrupt_ratio='corrupt',
        crop_piece_len='len',
        use_softmax_loss='soft',
        num_instruments='num_i',
        num_pitches='n_pch',
        quantization_level='quant',
        use_residual='res',
        use_sep_conv='sconv',
        sep_conv_depth_multiplier='depth_mul',
        num_initial_regular_conv_layers='nreg_conv',
        separate_instruments='sep',
        rescale_loss='rescale',
        maskout_method='mm')
    sorted_keys = sorted(shorthand.keys())
    line = ','.join(
        '%s=%s' % (shorthand[key], getattr(self, key)) for key in sorted_keys)
    return line
def __str__ ( self ) : # include allowed keys only shorthand = dict ( batch_size = 'bs' , learning_rate = 'lr' , optimize_mask_only = 'mask_only' , corrupt_ratio = 'corrupt' , crop_piece_len = 'len' , use_softmax_loss = 'soft' , num_instruments = 'num_i' , num_pitches = 'n_pch' , quantization_level = 'quant' , use_residual = 'res' , use_sep_conv = 'sconv' , sep_conv_depth_multiplier = 'depth_mul' , num_initial_regular_conv_layers = 'nreg_conv' , separate_instruments = 'sep' , rescale_loss = 'rescale' , maskout_method = 'mm' ) sorted_keys = sorted ( shorthand . keys ( ) ) line = ',' . join ( '%s=%s' % ( shorthand [ key ] , getattr ( self , key ) ) for key in sorted_keys ) return line