Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
4 replies
67 views

I am working on an optimized implementation of binary feature minimization, which I am familiar with as a computational linguistic task but I would imagine has other applications. Fundamentally, it is ...
user32603240's user avatar
1 vote
1 answer
94 views

Reading up on backtracking led me to a page on geeksforgeeks.org about solutions to the n-queens problem. The first solution is introduced as the "naive approach" that generates all possible ...
retpoline's user avatar
1 vote
1 answer
158 views

I am training on CIFAR10 the following simple CNN class SimpleCNN(nn.Module): def __init__(self): super().__init__() self.conv1 = nn.Conv2d(3, 32, kernel_size=3, padding=1) ...
Noumeno's user avatar
  • 191
0 votes
0 answers
139 views

I am creating a decision tree from scratch and implementing pruning. Currently I believe the problem in my code is that when I prune a tree, the new leaf node I create does not get placed into the ...
isuf's user avatar
  • 51
0 votes
1 answer
1k views

I am trying to prune a Yolov8 detection model, using this snippet. But when I load the pruned model, it still shows the same number of parameters (3,011,048 parameters). I'm not sure if I'm doing this ...
Mary H's user avatar
  • 409
1 vote
1 answer
978 views

I am creating a traditional neural network for PA behavioral modeling in Python using TensorFlow. The model takes in input I and Q values and predicts the amplifier output. So that's a .csv file with ...
Rex's user avatar
  • 13
1 vote
0 answers
57 views

I have two tables partitioned by range on column day,(this is an oversimplification for a more complex design), tables appear similar but day field refers to completly different concept than day in ...
Tony Zucchini's user avatar
0 votes
1 answer
276 views

I'm exploring pruning a neural network using this example. My pruning code, using a pre-trained model, looks like this: prune_low_magnitude = tfmot.sparsity.keras.prune_low_magnitude # Compute end ...
Barney_Dinosaur's user avatar
0 votes
1 answer
622 views

I'm trying to implement model pruning on PyTorch with a ResNet18. Given an instance of ResNet18, I run the following code to load a pre-trained model, prune it and save the pruned model: def ...
Alessandro Masci's user avatar
0 votes
0 answers
296 views

I am trying to prune a YOLOv8 detection model. Following is my code and it runs successfully and I see the saved pruned model. But when I want to train it or run prediction on it, I get the following ...
Mary H's user avatar
  • 409
0 votes
1 answer
570 views

I am trying to build a RL model, where my actor network has some pruned connections. When using the data collector SyncDataCollector from torchrl, the deepcopy fails (see error below). This seems to ...
samje's user avatar
  • 43
0 votes
0 answers
289 views

I am working on machine learning model and trying to tune hyperparameters with Optuna. I want to try pruning, but I dont know how to implement this feature. I am using random forest regressor and ...
david's user avatar
  • 55
0 votes
0 answers
168 views

I try to remove the neurons that was under the required threshold not to do them 0 but to delete it from the VGG neural network. I did the follow: import tensorflow as tf Load the VGG16 model model = ...
Artemis Stefanidou's user avatar
0 votes
4 answers
1k views

The minimal demonstrative example what I am trying to do is as follows: Suppose I have a list of instances of a point class, resembling points in the xy-plane, defined by: class point: def ...
Britzel's user avatar
  • 235
0 votes
1 answer
190 views

I'm using sklearn to try to train a binary classification decision tree to classify spam vs not spam. My classification threshold is 50% (i.e I'll flag it as Spam if I think there's a 50%+ chance that ...
Apollo's user avatar
  • 11
0 votes
1 answer
262 views

Considering a table T with a date based partition named date_part. SELECT * FROM T where date_part="2023-06-06" obviously will show datas from 2023-06-06... If I want datas from 7 days in ...
Sebastien's user avatar
  • 125
3 votes
1 answer
2k views

In the current implementation, what is the recommended way for removing tokens from a any Hugging Face PreTrainedTokenizer? Simply creating a new vocabulary.txt and loading it with from_pretrained is ...
Bram Vanroy's user avatar
  • 28.9k
0 votes
0 answers
112 views

I recently tried to run the offical code from the repository "Filter Pruning via Geometric Median for Deep Convolutional Neural Networks Acceleration" by Yang He. I found that everything ...
Jake's user avatar
  • 1
2 votes
0 answers
747 views

I've installed Tekton Operator and Tekton Config as described here: https://tekton.dev/docs/operator/tektonconfig/ In the tektonconfig, it has a block like this: pruner: resources: - ...
Gary Turner's user avatar
0 votes
0 answers
393 views

I am trying to reduce memory and speed up my own fine-tuned transformer. I came across the tutorial for pruning on the huggingface site. I am referring to the following snippet. The trainer.train() is ...
Jyoti yadav's user avatar
0 votes
1 answer
504 views

I am trying to optimize my machine learning model by using weight pruning. But no matter what I do I cant get rid of the error AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has ...
garrett_17's user avatar
1 vote
1 answer
745 views

To implement L1-norm, unstructured, layer-wise pruning with torch.nn.utils.prune l1_unstructured, radom_unstructured methods, I have a toy LeNet-300-100 dense neural network as- class LeNet300(nn....
Arun's user avatar
  • 2,528
4 votes
0 answers
853 views

I want to merge a dataframe which contains incremental data to my base deltatable. I want to achieve partition pruning while doing it to avoid scanning a lot of files. My data is partitioned based on ...
mdoblado's user avatar
0 votes
1 answer
4k views

I'm running a node of an Ethereum side-chain. I started only getting "peer connected on snap without compatible eth support" error messages in the log a few days ago. It would not download ...
uzumaki's user avatar
  • 2,037
1 vote
0 answers
191 views

I am running some code which repeatedly (every training iteration) calls layer.get_weights() and layer.set_weights(). The callback operation containing these calls takes 0.01ms compared to the 0.004ms ...
Machoo's user avatar
  • 31
1 vote
0 answers
118 views

I am trying to implement a Decision Tree model with depth equal 10. I am using the comand "max_depth=10" on the list of arguments (SciKitLearn), but when I print the max_depth of my model, ...
Igor Gonzaga's user avatar
0 votes
1 answer
1k views

I just noticed Postgres (checked on version 13 and 14) behavior that surprised me. I have a simple table volume with id and unique text column name. Second table dir has 3 columns: id, volume_id and ...
Michał Albrycht's user avatar
3 votes
0 answers
317 views

I am trying to prune InceptionNetV3 from keras trained on imagenet, right now I am using a tensorflow-datasets which has a subset of imagenet which I use for pruning. Currently my pruned models do not ...
onetrillionquestions's user avatar
0 votes
1 answer
523 views

I am new with Pruning using Pytorch. I had this error when training my model : ValueError: Parameter 'weight' of module Conv2d(1, 4, kernel_size=(7, 7), stride=(3, 3)) has to be pruned before pruning ...
Hamid Fsian's user avatar
1 vote
0 answers
307 views

I'm studing C4.5 algorithm and trying to make it in java by myself, but in the part of pruning, I don't understand what it compute in book of C4.5. In this book,it said:"When N training cases are ...
hua's user avatar
  • 169
1 vote
2 answers
12k views

I want to run the 3 code snippets from this webpage. I've made all 3 one post, as I am assuming it all stems from the same problem of optimum not having been imported correctly? Kernel: ...
DanielBell99's user avatar
  • 2,065
1 vote
1 answer
452 views

My aim is to prune a deep tree according to a certain value of the cost-complexity parameter, say 3. I like growing trees with rpart(), in particular for the possibility of customizing plots. However, ...
riccardo-df's user avatar
1 vote
1 answer
496 views

is there a way to show the reduced number of FLOPs of a model after pruning (prune_low_magnitude with tensorflow_model_optimization). I tried to compare the default an the pruned model, but I didn't ...
Thrangel's user avatar
2 votes
1 answer
3k views

Lets see the result that I got first. This is one of a convolution layer of my model, and im only showing 11 filter's weight of it (11 3x3 filter with channel=1) Left side is original weight Right ...
SnowNiNo's user avatar
0 votes
1 answer
588 views

Hi I have trained object detection model using tensorflow 1.14 object detection API, my model is performing well. However, I want to reduce/optimize parameters of model to make it lighter. How can I ...
Sohail's user avatar
  • 21
4 votes
1 answer
4k views

I work with one architecture and trying to sparse it via prune. I wrote functions for pruning, here is one of them: def prune_model_l1_unstructured(model, layer_type, proportion): for module in ...
Anvar Ganiev's user avatar
0 votes
1 answer
629 views

I have a pretrained model LeNet5 defined from scratch. I am performing pruning over filters in the convolution layers present in the model shown below. class LeNet5(nn.Module): def __init__(self, ...
NIKITA RATH's user avatar
0 votes
1 answer
410 views

I'd like to use the pruned model and weight but, whenever I load the model or weight, this error messages keep popping up... My weight and model's files: Error messages
Joanne's user avatar
  • 3
1 vote
1 answer
386 views

Here I learn from the paper called Deep compression [Han et. al.] using resnet18 I also work the following code, the weight times the mask so that it is the after_weight pruned by the k% lowest weight ...
Chris's user avatar
  • 23
0 votes
1 answer
478 views

Essentially, I want to perform pruning to my transfer learning model. I used efficientnetb0 for classifying microorganisms. import tensorflow_model_optimization as tfmot prune_low_magnitude = tfmot....
djbacs's user avatar
  • 51
1 vote
2 answers
820 views

I have a big table in GBQ which is partitioned by date. and I want to use partition pruning to optimize my query. the problem is that filter condition is a value that is read from another table and I ...
sia's user avatar
  • 589
2 votes
0 answers
726 views

I am using a Conv-6 CNN in TensorFlow 2.5 and Python3. The objective is to selectively set certain weights within any trainable layer. The Conv-6 CNN model definition is as follows: def conv6_cnn(): ...
Arun's user avatar
  • 2,528
1 vote
1 answer
888 views

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 ...
Amin's user avatar
  • 471
0 votes
1 answer
273 views

I need to remove the near-zero weights of the Neural network so that the distribution of parameters is far away from the zero point. The distribution of weights after removing nearzero weights and ...
ANewBee666's user avatar
2 votes
1 answer
954 views

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 ...
iampotato's user avatar
2 votes
0 answers
618 views

I'm using the library KerasSurgeon to prune a neural network. When I call the method delete_channels() I get the following error: TypeError Traceback (most recent call ...
Luk's user avatar
  • 21
1 vote
2 answers
2k views

Im having problems when I use the library tensorflow_model_optimization. I am developing a code to prune an already trained neural network. I imported the weights from an h5 file and so I use ...
Gabriela Montes's user avatar
0 votes
1 answer
445 views

I am trying to remove a layer using kerassurgeon however I am facing issue to do I tried different ways but none of themworking. # delete layer_1 from a model from kerassurgeon import Surgeon surgeon =...
ash luck's user avatar
0 votes
1 answer
476 views

I have a baseline TF functional model that I want to prune. I have tried following the code in the documentation, but the size the compressed pruned model is the same size as the compressed baseline ...
LucasStromberg's user avatar
0 votes
2 answers
3k views

is there a way to have pruning with CatBoost and Optuna (in LightGBM it's easy but in Catboost I can't find any hint). My code is like this def objective(trial): param = { 'iterations':...
Andrea Dalseno's user avatar