Questions tagged [fine-tune]

156 questions
1
vote
0 answers

Does it need a relu function for bert fine tuning?

For example, if it is a multi-class classification, is the following line necessary in the forward function? final_layer = self.relu(linear_output) The class definition is below: class BertClassifier(nn.Module): def __init__(self,…
1
vote
1 answer

Fine-tuning of OpeanAI model with unsupervised set, not supervised

I want GPT-3 model to know everything about my domain area, for example my inbox. I want to be able to ask it questions like "Have I even had a Silicon Valley Bank account?" and get correct response. I've familiarized myself with fine-tuning…
epahomov
  • 631
  • 1
  • 6
  • 7
1
vote
1 answer

Do I need to retrain Bert for NER to create new labels?

I am very new to natural language processing and I was thinking about working on named entity recognition NER. A friend of mine who works with NLP advised me to check out BERT, which I did. When reading the documentation and checking out the…
1
vote
0 answers

Transfer learning (or fine-tuning) pre-trained model on non-text data

I am currently fine-tuning a sentiment analysis bert-based model using PyTorch Trainer from hugging face. So far, so good. I have easily managed to fine-tune the model on my text data. However, I'd like to conduct an ablation study to see how the…
1
vote
0 answers

How can I restructure my loop to paginate faster right now it takes too long?

Per_page limit is 100 & I needed the function to be able to find results for any date range. So I added a do while loop and this is what I ended up with: async function foo(repoOwner, repository, startingDate, endingDate){ const…
1
vote
2 answers

Visualizing ViT Attention maps after fine tuning on medical dataset

I have imported the Vit-b32 model and fine-tuned it to perform classification task on echo images. Now I want to visualize the attention maps so that I can know on which part of the image the model is focusing for doing the classification task. But…
1
vote
0 answers

How to finetune torchvision.models.detection.ssd300_vgg16?

I need to fine tune object detect algorithms using pytorch. All available tutorials do instance segmentation. Any guides or code examples on loading: model=torchvision.models.detection.ssd300_vgg16(pretrained=False) and training it to a new set of…
user2140324
  • 31
  • 1
  • 1
  • 2
1
vote
1 answer

MXNET - How to add dropout layer to ResNet_v1 pretrained model

I am trying to finetune a pretrained model in mxnet: ResNet50_v1. This model does not have dropout and I would like to add it to avoid overfitting and make it look similar to the last layers of I3D_Resnet50_v1_Kinetics400. I tried to do the…
Beatriz
  • 33
  • 4
1
vote
1 answer

loading saved model doesn't behave as expected when finetuning it

I trained a pytorch model the accuracy at end of the first epoch is 20% and the loss value is 3.8 . I trained it until the loss is 3.2 and accuracy is around 50% and save it like this: torch.save(model.state_dict(), 'model.pth') Then I load it…
Marzi Heidari
  • 2,660
  • 4
  • 25
  • 57
1
vote
0 answers

fine-tuning bert for abstractive text summarization

I am using BERT (araBert to be more specific) for Arabic abstractive text summarization, but I don't want to train all the parameters from scratch. What I am looking for is a way to freeze the layers and then add some layers (LSTM or Transformer…
1
vote
0 answers

fine tuning with hugging face trainer when adding layer on eletra model

i'm trying to fine tune my own model with hugging face trainer module. There was no problem until just training ElectraforQuestionAnswering, however I tried to add additional layer on the model and tried the same process. And there comes this…
장준서
  • 11
  • 2
1
vote
1 answer

Error with MXNET and CUDA in Google Colab: no kernel image is available for execution on the device

I am following a tutorial to fin-tune a SOTA model with MXNet. I am doing it in Google Colab: https://cv.gluon.ai/build/examples_action_recognition/finetune_custom.html However, I am unable to make it work. I believe it has to do with the version…
1
vote
2 answers

pytorch RuntimeError: Input and output sizes should be greater than 0, but got input (H: 1605, W: 2) output (H: 799, W: 0)

I'm trying to fine-tune Pytorch model using their own tutorial from their page. I try it on dataset StaVer from Kaggle: rtatman/stamp-verification-staver-dataset. The only change to their code is the paths to the dataset. The error occured in the…
1
vote
1 answer

How to freeze layers and fine tune a custom Siamese Network

I have the following Siamese Network (Xception-Based) that is composed as follows: from tensorflow.keras.models import Model, model_from_json, Sequential from tensorflow.keras.preprocessing.image import ImageDataGenerator, array_to_img,…
mad
  • 2,677
  • 8
  • 35
  • 78
1
vote
0 answers

Proper use of BatchNormalization when Fine-Tunning

I`m using keras and TF 2.0 I'm trying to implement ResNet50 pre-trained on ImageNet to a different problem (pneumonia binary classification) and I've found that there is some discussion online about how to properly set batch normalization layers to…