Questions tagged [custom-training]
90 questions
0
votes
1 answer
Extremely poor accuracy upon training network from scratch
I am trying to retrain resnet50 from scratch using a dataset that is similar to ImageNet. I wrote the following training loop:
def train_network(epochs , train_loader , val_loader , optimizer , network):
since = time.time ( )
…

Priyesh Sharma
- 109
- 3
0
votes
0 answers
How to change/reset individual neurons during training
I would like to test what the impact is of randomly resetting certain neurons during training, in a Pytorch-based model with a number of linear layers like this:
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
…
0
votes
1 answer
how to convert the output of a nural network to long type while maintaining the trainability
The output of my pytorch neural network is a float64 type of data. This variable has to be used as a pixel offset and as such I need to convert it to long type.
However I have just discovered that a conversion out=out.long() switches the variable…

Mauro Gentile
- 1,463
- 6
- 26
- 37
0
votes
1 answer
How to create joint loss with paired Dataset samples in Tensorflow Keras API?
I'm trying to train an autoencoder, with constraints that force one or more of the hidden/encoded nodes/neurons to have an interpretable value. My training approach uses paired images (though after training the model should operate on a single…

mattroos
- 125
- 1
- 11
0
votes
0 answers
Tensorflow: how to modify the backpropagation in a layer N
I would need to do a kind of custom backpropagation so that, in an arbitrary layer of the network I can decide if actually modify the weights going outside that layer, or make them unchanged.
For example: I would like to study what happens if,…

Cla
- 171
- 1
- 12
0
votes
2 answers
YOLOv4 training: Cannot detect multiple classes on a single image
I used the Open Images dataset to train the CNN for two classes: Person, Mobile phone. The problem is that Yolo detects only 1 class per image. For example, if an image contains a human and a mobile phone, only mobile phones will be detected.…

WefPok
- 13
- 5
0
votes
0 answers
tensorflow 0% GPU utilization despite manual activation
This is a follow up to my previous question in which I indicated CPU and GPU slow training performance. I did another test run on google colab and used wandb to monitor the training and show CPU, GPU utilization and several other metrics, it shows…

watch-this
- 1
- 4
- 20
0
votes
1 answer
How to continue training Doc2Vec with a specific domain corpus after training with a generic corpus
I want to train a Doc2Vec model with a generic corpus and, then, continue training with a domain-specific corpus (I have read that is a common strategy and I want to test results).
I have all the documents, so I can build and tag the vocab at the…
0
votes
1 answer
Train model in Pytorch with custom loss how to set up optimizer and run training?
I am new to pytorch and I am trying to run a github model I found and test it. So the author's provided the model and the loss function.
like this:
#1. Inference the model
model = PhysNet_padding_Encoder_Decoder_MAX(frames=128)
rPPG, x_visual,…

NeuralNew
- 96
- 1
- 10
0
votes
1 answer
ValueError: Unknown layer: RBFLayer
I am new in Deep Learning. I want to built the face recognition model on custom dataset using rbf neural network.I have dataset of 187 images with 17 classes. I train and save the model but can't use it. my code:
from keras import backend as K
from…
user12542498
0
votes
0 answers
calling tensorflow2 model is not returning the output that has been defined in the call() method
When I call the tf2 model, it is not returning me the values that it is supposed to return as per the way I have defined the call() method in the tf Model subclass.
Instead, calling the call() method of the model is returning me the tensor that I…

n0obcoder
- 649
- 8
- 24
0
votes
1 answer
getting same accuracy and loss for each epoch using train_on_batch
I am doing a binary classification problem where I have 440 images in total. I am training CNN using the "train_on_batch" function for each batch. I know for train_on_batch is used for large datasets but I am using it on a small dataset for test…

DHRUV MAKWANA
- 1
- 4
0
votes
3 answers
OOM when allocating tensor with shape[1,48,48,1024] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
I'm trying to reproduce the training of the Mask RCNN in the following repository:https://github.com/maxkferg/metal-defect-detection
Code snippet for the train is the following:
# Training - Stage 1
print("Training network heads")
…

Pierpaolo Croce
- 57
- 2
- 14
0
votes
1 answer
Errors when training my saved tensorflow model
I'm trying to build a custom keras model whith the subclassing API but I get some errors when I load a previous instance of my model and I try to train it :
Here is the class of my model, it has 3 inputs and 1 output :
import tensorflow as…

Tessan
- 49
- 1
- 9
-1
votes
1 answer
Training Custom Model on Vertex AI
I have couple of of questions regarding training custom model:
I am using prebuilt Google image and everything is running fine, but I am not able to get the artifacts in "local-package-path" folder.
I am using my own container and want to…

Vishwa
- 14
- 2