Questions tagged [pre-trained-model]

A machine learning model created by someone else. Questions about the practical use and implementation details (using a pretrained model as a starting point, or benchmark) are allowed; however, questions about the theory behind these models are off-topic.

A machine learning model created by someone else. Questions about the practical use and implementation details (using a pretrained model as a starting point, or benchmark) are allowed, questions about the theory behind these models are off-topic and should be asked on the Artificial Intelligence site.

505 questions
7
votes
3 answers

Pre train a model (classifier) in scikit learn

I would like to pre-train a model and then train it with another model. I have model Decision Tree Classifer and then I would like to train it further with model LGBM Classifier. Is there a possibility to do this in scikit learn? I have already read…
Test
  • 571
  • 13
  • 32
7
votes
2 answers

Continual pre-training vs. Fine-tuning a language model with MLM

I have some custom data I want to use to further pre-train the BERT model. I’ve tried the two following approaches so far: Starting with a pre-trained BERT checkpoint and continuing the pre-training with Masked Language Modeling (MLM) + Next…
7
votes
1 answer

Modify trained model architecture and continue training Keras

I want to train a model in a sequential manner. That is I want to train the model initially with a simple architecture and once it is trained, I want to add a couple of layers and continue training. Is it possible to do this in Keras? If so, how? I…
Nagabhushan S N
  • 6,407
  • 8
  • 44
  • 87
7
votes
4 answers

Fine Tuning Pretrained Model MobileNet_V2 in Pytorch

I am new to pyTorch and I am trying to Create a Classifier where I have around 10 kinds of Images Folder Dataset, for this task I am using Pretrained model( MobileNet_v2 ) but the problem is I am not able to change the FC layer of it. There is not…
7
votes
1 answer

Uni-directional Transformer VS Bi-directional BERT

I just finished reading the Transformer paper and BERT paper. But couldn't figure out why Transformer is uni-directional and BERT is bi-directional as mentioned in BERT paper. As they don't use recurrent networks, it's not so straightforward to…
JShen
  • 399
  • 1
  • 3
  • 10
7
votes
2 answers

VGG16 trained on grayscale imagenet

I have found the VGG16 network pre-trained on the (color) imagenet database (as .npy). Is there a VGG16 network pre-trained on a gray-scale version of the imagenet database available? (The usual 'tricks' for using the 3-channel filters of the…
6
votes
2 answers

How to convert a PyTorch nn.Module into a HuggingFace PreTrainedModel object?

Given a simple neural net in Pytorch like: import torch.nn as nn net = nn.Sequential( nn.Linear(3, 4), nn.Sigmoid(), nn.Linear(4, 1), nn.Sigmoid() ).to(device) How do I convert it into a Huggingface PreTrainedModel…
alvas
  • 115,346
  • 109
  • 446
  • 738
6
votes
2 answers

ImageNet pretrained ResNet50 backbones are different between Pytorch and TensorFlow

"Obviously!", you might say... But there's one significant difference that I have trouble explaining by the difference in random initialization. Take the two pre-trained basenets (before the average pooling layer) and feed them with the same image,…
Jav
  • 1,445
  • 1
  • 18
  • 47
6
votes
1 answer

Pre-Trained models for text Classification

So I have few words without labels but I need to classify them into 4-5 categories. I can visibly say that this test set can be classified. Although I do not have training data so I need to use a pre-trained model to classify these words. Which…
6
votes
2 answers

How can I add new layers on pre-trained model with PyTorch? (Keras example given)

I am working with Keras and trying to analyze the effects on accuracy that models which are built with some layers with meaningful weights, and some layers with random initializations. Keras: I load VGG19 pre-trained model with include_top = False…
Selin Gök
  • 331
  • 1
  • 5
  • 20
6
votes
2 answers

Latest Pre-trained Multilingual Word Embedding

Are there any latest pre-trained multilingual word embeddings (multiple languages are jointly mapped to a same vector space)? I have looked at the following but they don't fit my needs: FastText / MUSE…
6
votes
4 answers

Duplicate node name in graph: 'conv2d_0/kernel/Adam'

I just saved a model, by that code: def train(): with tf.Session() as sess: saver = tf.train.Saver(max_to_keep = 2) Loss = myYoloLoss([Scale1,Scale2,Scale3],[Y1, Y2 ,Y3]) opt = tf.train.AdamOptimizer(2e-4).minimize(Loss) init =…
heiheihei
  • 659
  • 1
  • 6
  • 15
6
votes
2 answers

Error when loading FastText's french pre-trained model with gensim

I am trying to use the FastText's french pre-trained binary model (downloaded from the official FastText's github page). I need the .bin model and not the .vec word-vectors so as to approximate misspelled and out-of-vocabulary words. However when I…
Clara-sininen
  • 191
  • 2
  • 9
6
votes
1 answer

How to save a trained model (Estimator) and Load it back to test it with data in Tensorflow?

I have this snippet, for my model import pandas as pd import tensorflow as tf from tensorflow.contrib import learn from tensorflow.contrib.learn.python import SKCompat #Assume my dataset is using X['train'] as input and y['train'] as…
5
votes
2 answers

How to concatenate 2 pytorch models and make the first one non-trainable in PyTorch

I've two networks, which I need to concatenate for my full model. However my first model is pre-trained and I need to make it non-trainable when training the full model. How can I achieve this in PyTorch. I am able to concatenate two models using…
Nagabhushan S N
  • 6,407
  • 8
  • 44
  • 87
1
2
3
33 34