def add_model_specific_args(parent_parser):
     parser = child_argparser(
         LSTMStacked.add_model_specific_args(parent_parser))
     temp_args, _ = parser.parse_known_args()
     if temp_args.input_size is not None and temp_args.input_size <= 2048:
         if temp_args.n_layers is not None:
             default_batch_size = 256
             if temp_args.n_layers == 2:
                 default_batch_size = 256 + 64 + 32
             elif temp_args.n_layers == 1:
                 default_batch_size = 512 + 32
             parser.add_argument('-b',
                                 '--batch_size',
                                 type=int,
                                 default=default_batch_size)
     return parser
    def add_model_specific_args(parent_parser):
        parser = child_argparser(
            pn.PredNet.add_model_specific_args(parent_parser))

        # See if n_layers has been specified to infer default batch size
        temp_args, _ = parser.parse_known_args()
        if temp_args.n_layers is not None:
            if temp_args.n_layers == 2:
                default_batch_size = 256 + 64 + 32
            elif temp_args.n_layers == 1:
                default_batch_size = 512 + 128 + 64
            else:
                default_batch_size = 256

        parser.add_argument('-b',
                            '--batch_size',
                            type=int,
                            default=default_batch_size)
        return parser
Exemple #3
0
    def add_model_specific_args(parent_parser):
        parser = child_argparser(
            pn.PredNet.add_model_specific_args(parent_parser))
        parser.add_argument('--layer_loss_mode', type=str, default='')
        parser.add_argument('--n_predictions', type=int, default=3)
        parser.add_argument('--gamma', type=float, default=0.97)

        # See if we have the right number of inputs and n_layers has been
        # specified to infer default batch size
        temp_args, _ = parser.parse_known_args()
        if temp_args.input_size is not None and temp_args.input_size <= 2048:
            if temp_args.n_layers is not None:
                default_batch_size = 256
                if temp_args.n_layers == 1:
                    default_batch_size = 256 + 128
                parser.add_argument('-b',
                                    '--batch_size',
                                    type=int,
                                    default=default_batch_size)
        return parser
    def add_model_specific_args(parent_parser):
        parser = child_argparser(BaseTorchModel.add_model_specific_args(
            parent_parser))
        parser.add_argument('--n_layers', type=int, default=2)
        parser.add_argument('--lr', type=float, default=0.0001)
        parser.add_argument('--output_mode', type=str, default='error')
        parser.add_argument('--layer_loss_mode', type=str, default='first')

        # See if we have the right number of inputs and n_layers has been
        # specified to infer default batch size
        temp_args, _ = parser.parse_known_args()
        default_batch_size = 256
        if temp_args.input_size is not None and temp_args.input_size <= 2048:
            if temp_args.n_layers is not None:
                if temp_args.n_layers == 2:
                    default_batch_size = 256 + 128
                elif temp_args.n_layers == 1:
                    default_batch_size = 512 + 128 + 64
        
        parser.add_argument('-b', '--batch_size', type=int,
                            default=default_batch_size)
        return parser
 def add_model_specific_args(parent_parser):
     parser = child_argparser(parent_parser)
     parser.add_argument('--n_layers', type=int, default=1)
     parser.add_argument('--lr', type=float, default=0.001)
     return parser
Exemple #6
0
 def add_model_specific_args(parent_parser):
     parser = child_argparser(
         LSTMStackedDense.add_model_specific_args(parent_parser))
     parser.add_argument('--n_layers', type=int, default=1)
     parser.add_argument('-b', '--batch_size', type=int, default=512 + 128)
     return parser
Exemple #7
0
 def add_dataset_specific_args(parent_parser):
     parser = child_argparser(
         SchapiroFractalsDataset.add_dataset_specific_args(parent_parser))
     parser.add_argument('--input_size', type=int, default=2048)
     return parser