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
51
votes
3 answers

TypeError: can’t convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first

I am using a modified predict.py for testing a pruned SqueezeNet Model [phung@archlinux SqueezeNet-Pruning]$ python predict.py --image 3_100.jpg --model model_prunned --num_class 2 prediction in progress Traceback (most recent call last): File…
kevin998x
  • 899
  • 2
  • 10
  • 23
21
votes
4 answers

Pruning in Keras

I'm trying to design a neural network using Keras with priority on prediction performance, and I cannot get sufficiently high accuracy by further reducing the number of layers and nodes per layer. I have noticed that very large portion of my weights…
Mirac7
  • 1,566
  • 4
  • 26
  • 44
11
votes
3 answers

Prune unnecessary leaves in sklearn DecisionTreeClassifier

I use sklearn.tree.DecisionTreeClassifier to build a decision tree. With the optimal parameter settings, I get a tree that has unnecessary leaves (see example picture below - I do not need probabilities, so the leaf nodes marked with red are a…
Thomas
  • 4,696
  • 5
  • 36
  • 71
11
votes
2 answers

How do I enable partition pruning in spark

I am reading parquet data and I see that it is listing all the directories on driver side Listing s3://xxxx/defloc/warehouse/products_parquet_151/month=2016-01 on driver Listing s3://xxxx/defloc/warehouse/products_parquet_151/month=2014-12 on…
swatisinghi
  • 667
  • 7
  • 9
10
votes
5 answers

TypeError: Tensor is unhashable. Instead, use tensor.ref() as the key. in Keras Surgeon

I'm using Kerassurgeon module for pruning.I encountered this error while i'm working with VGG-16 in google colab.It works fine for other models.Can someone help me fix this. ---> 17 model_new = surgeon.operate()
18 return…
Nikhil Dupally
  • 753
  • 1
  • 4
  • 12
9
votes
2 answers

How to prune weights less than a threshold in PyTorch?

How to prune weights of a CNN (convolution neural network) model which is less than a threshold value (let's consider prune all weights which are <= 1). How we can achieve that for a weight file saved in .pth format in pytorch?
MSD Paul
  • 1,648
  • 3
  • 13
  • 31
9
votes
1 answer

How to freeze/lock weights of one TensorFlow variable (e.g., one CNN kernel of one layer)

I have a TensorFlow CNN model that is performing well and we would like to implement this model in hardware; i.e., an FPGA. It's a relatively small network but it would be ideal if it were smaller. With that goal, I've examined the kernels and find…
JHarchanko
  • 101
  • 1
  • 6
9
votes
1 answer

Why does the C4.5 algorithm use pruning in order to reduce the decision tree and how does pruning affect the predicion accuracy?

I have searched on google about this issue and I can't find something that explains this algorithm in a simple yet detailed way. For instance, I know the id3 algorithm doesn't use pruning at all, so if you have a continuous characteristic, the…
ksm001
  • 3,772
  • 10
  • 36
  • 57
8
votes
1 answer

How to prune history right in a CoreData+CloudKit app?

My app uses CoreData with iCloud as backend. Multiple devices can access the iCloud database which is thus .public. The local CoreData store is synchronized with iCloud using an NSPersistentCloudKitContainer. I use history tracking according to…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
8
votes
1 answer

Is rpart automatic pruning?

Is rpart automatic pruning? The decision tree produced by rpart is much more levels than that produced by Oracle Data Mining which has the automatic pruning.
Jack Han
  • 81
  • 1
  • 2
7
votes
1 answer

What is XGBoost pruning step doing?

When I use XGBoost to fit a model, it usually shows a list of messages like "updater_prune.cc:74: tree pruning end, 1 roots, 6 extra nodes, 0 pruned nodes, max_depth=5". I wonder how XGBoost is performing the tree pruning? I cannot find the…
DiveIntoML
  • 2,347
  • 2
  • 20
  • 36
7
votes
3 answers

Accelerating FFTW pruning to avoid massive zero padding

Suppose that I have a sequence x(n) which is K * N long and that only the first N elements are different from zero. I'm assuming that N << K, say, for example, N = 10 and K = 100000. I want to calculate the FFT, by FFTW, of such a sequence. This is…
Vitality
  • 20,705
  • 4
  • 108
  • 146
6
votes
1 answer

Is there a free tool capable of pruning unused code from a CLI assembly?

Is there a free tool capable of pruning unused code from a CLI assembly? I know there are obfuscators that are capable of performing this optimization, but these all cost money. Is there a free (or even open source) tool that removes the unused code…
blez
  • 4,939
  • 5
  • 50
  • 82
6
votes
1 answer

Minimum Mean Weight Cycle - Intuitive Explanation

In a directed graph, we are looking for the cycle that had the lowest average edge weights. For instance, a graph with nodes 1 and 2 with path from 1 to 2 of length 2 and from 2 to 1 of length 4 would have minimum mean cycle of 3. Not looking for a…
John Targaryen
  • 1,109
  • 1
  • 13
  • 29
5
votes
1 answer

Why parameters in prunning increases in tensorflow's tfmot

I was prunning a model and came across a library TensorFlow model optimization so initially, we have I trained this model on a default dataset and it gave me an accuracy of 96 percent which is good. then I saved the model in a JSON file and saved…
1
2 3
12 13