Questions tagged [pruning]

Use pruning for questions related to algorithms used on data structures to facilitate generalization and performance optimization.

Pruning is a general technique to guard against the creation of an algorithm too specific to the training data so that it can be applied to other data sets.

References

193 questions
1
vote
1 answer

Deploy a pruned Tron (TRC20) node

Tron main net (TRC20) is about 500GB nowadays and needs much server config! I'm searching for a way to prune the network like the pruning method in Bitcoin nodes or light or fast sync modes in Ethereum Blockchain. Does anybody know a way to do that?
Amin
  • 421
  • 5
  • 7
1
vote
1 answer

Pytorch pruning on LSTM increases model size?

I am applying pruning using pytorch's torch.nn.utils.prune on a model with LSTM layers. However, when I save the contents of the state_dict, the model is much larger than before pruning. I'm not sure why, as if I print out the sizes of the elements…
iampotato
  • 11
  • 2
1
vote
1 answer

How to set a minimum number of epoch in Optuna SuccessiveHalvingPruner()?

I'm using Optuna 2.5 to optimize a couple of hyperparameters on a tf.keras CNN model. I want to use pruning so that the optimization skips the less promising corners of the hyperparameters space. I'm using something like this: study0 =…
1
vote
0 answers

Large Neural Network Pruning

I have done some experiments on neural network pruning, but only on small models. I used to prune the relevant weights as follows (similarly as it is explained in the official tutorial…
Alfred
  • 503
  • 1
  • 5
  • 20
1
vote
1 answer

How can I calculate FLOPs and Params without 0 weights neurons affected?

My Prune code is shown below, after running this, I will get a file named 'pruned_model.pth'. import torch from torch import nn import torch.nn.utils.prune as prune import torch.nn.functional as F from cnn import net ori_model = '/content/drive/My…
Xiaolin Li
  • 13
  • 1
  • 4
1
vote
0 answers

Accessing/modifying an element in a nested dictionary

I am trying to apply reduced-error post-pruning on a decision tree that is implemented with the a nested dictionary in Python. Here's a sample of the tree, when fitted on the data and with a constraint of being at most three layers deep (although it…
sineman
  • 89
  • 1
  • 7
1
vote
0 answers

ValueError: If your data is in the form of symbolic tensors, you cannot use `validation_split`

images = images / 255.0 model = tf.keras.Sequential([ keras.layers.InputLayer(input_shape=(227, 227, 3)), keras.layers.Conv2D(96, [7, 7], [4, 4], data_format='channels_last'), …
1
vote
1 answer

How do I get an evaluation function from this Alpha Beta Pruning exercise?

I have an alpha beta pruning exercise that states the following (dots and boxes): Next, a strategy game is described: Starting with an empty grid of dots, players (A and B) take turns, adding a single horizontal or vertical line between two…
1
vote
1 answer

Keras Pruning: Setting Weights to Zero Doesn't Accelerate Inference?

I'm writing a pruning algorithm for tf.keras that simply removes the lowest x percentile of weights from a layer / filter. To do this, I've tried setting the value of the weights to prune to zero. Having read other sources, I'm under the impression…
Jack98
  • 57
  • 9
1
vote
0 answers

How to physically remove a neuron in PyTorch?

In the paper "Learning both Weights and Connections for Efficient Neural Networks", it shrink the size of a neural networks according to a criteria. However, I found that all of the implementation of this paper does not physically shrink the size of…
wenlee0816
  • 11
  • 2
1
vote
0 answers

Freezing weights in specified value during training of sklearn's MLP classifier

I am using scikit-learn's multilayer perceptron classifier and I want to evaluate some pruning techniques for neural networks, such as Optimal Brain Damage. This method requires, iteratively, to remove weights from the network, i.e. manually setting…
Javi
  • 159
  • 1
  • 8
1
vote
1 answer

Tensorflow remove layers from pretrained model

Is there a way to load a pretrained model in Tensorflow and remove the top layers in the network? I am looking at Tensorflow release r1.10 The only documentation I could find is with…
1
vote
1 answer

Remove most common words mallet

I create from a list of strings a list of instances consisting of token feature sequences. Via command line, I can prune those data based on counts, tf-idf etc.…
Joker3139
  • 101
  • 3
  • 9
1
vote
1 answer

adding alpha beta to negamax

I'm implementing a version of Negamax for "Chain Reaction" game. Here there is a version of the algorithm that works good: public int[] think(Field field, int profondita, int alpha, int beta, int color) { // TODO Auto-generated method…
Pietro Gerace
  • 45
  • 1
  • 10
1
vote
0 answers

Tensorflow: how to save a graph with pruned weights

I've applied iterative pruning to my neural network as in this work to reduce my network size with about 90%. The idea is to remove edges that are not important to my network (weights close to zero). I perform the following code to save the model…
Maarten
  • 6,894
  • 7
  • 55
  • 90