from util.option import parser
from util import template

# Group
parser.add_argument('--group_size', type=int, default=16,
                    help='group size for the network of filter group approximation, ECCV 2018 paper.')

# DenseNet Basis
parser.add_argument('--n_group', type=int, default=1,
                    help='number of groups for the compression of densenet')
parser.add_argument('--k_size1', type=int, default=3,
                    help='kernel size 1')
parser.add_argument('--k_size2', type=int, default=3,
                    help='kernel size 2')
parser.add_argument('--inverse_index', action='store_true',
                    help='index the basis using inverse index')
parser.add_argument('--transition_group', type=int, default=6,
                    help='number of groups in the transition layer of DenseNet')

# ResNet Basis
parser.add_argument('--basis_size1', type=int, default=16,
                    help='basis size for the first res group in ResNet')
parser.add_argument('--basis_size2', type=int, default=32,
                    help='basis size for the second res group in ResNet')
parser.add_argument('--basis_size3', type=int, default=64,
                    help='basis size for the third res group in ResNet')
parser.add_argument('--n_basis1', type=int, default=24,
                    help='number of basis for the first res group in ResNet')
parser.add_argument('--n_basis2', type=int, default=48,
                    help='number of basis for the second res group in ResNet')
parser.add_argument('--n_basis3', type=int, default=84,
from util.option import parser
from util import template

# Prune specification
# Possible unused
parser.add_argument('--prune_procedure',
                    default='complete',
                    choices=['complete', 'undergoing', 'final'],
                    help='pruning procedure.')
parser.add_argument('--prune_weight_decay',
                    type=float,
                    default=0.001,
                    help='weight decay during--distillation pruning phase.')
parser.add_argument('--prune_decay',
                    type=str,
                    default='step-100-200-300',
                    help='decay step during pruning phase')
parser.add_argument('--prune_lr',
                    type=float,
                    default=0.1,
                    help='learning rate during pruning phase.')
parser.add_argument('--prune_iteration',
                    type=int,
                    default=250,
                    help='number of iterations during pruning phase.')
parser.add_argument('--prune_solver',
                    default='SGD',
                    choices=['SGD', 'PG'],
                    help='pruning optimization method.')
parser.add_argument(
    '--load_original_param',
Exemple #3
0
from util.option import parser
from util import template

# differentiable pruning via hypernetworks
parser.add_argument(
    '--prune_threshold',
    type=float,
    default=5e-3,
    help='the threshold used to mask out or nullifying the small elements.')
parser.add_argument('--regularization_factor',
                    type=float,
                    default=1e-4,
                    help='the sparsity regularization factor.')
parser.add_argument('--stop_limit',
                    type=float,
                    default=0.05,
                    help='the stop limit of the binary searching method')
parser.add_argument(
    '--prune_same_channels',
    type=str,
    default='Yes',
    choices=['Yes', 'No'],
    help=
    'whether to prune the same channels for the blocks in the same stage of ResNet'
)
parser.add_argument(
    '--embedding_dim',
    type=int,
    default=8,
    help='the dimension of per-location element in the latent matrix')
# parser.add_argument('--finetune', action='store_true',