def mlp_prune_model(args, model, input_data): hiddens = [int(s) for s in args.hidden.split('-')] + [2] sums = mlp_prune(model, input_data.data, args.input_dim, hiddens, prune_thres=args.prune_thres, comp_lb=args.compress_lb) return BatchLRLoss(model, sums, input_data.label)
def debug_sparse_mlp_prune_model(args, model, input_data): hiddens = [int(s) for s in args.hidden.split('-')] + [2] sums = debug_sparse_mlp_prune(model, input_data.data, args.input_dim, hiddens, input_data.sparse_segments) return BatchLRLoss(model, sums, input_data.label)
def mlp_decomp_model(args, model, input_data): hiddens = [int(s) for s in args.hidden.split('-')] + [2] sums = mlp_decomp(model, input_data.data, args.input_dim, hiddens) return BatchLRLoss(model, sums, input_data.label)