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
3
votes
1 answer

Why does huggingface bert pooler hack make mixed precission training stable?

Huggigface BERT implementation has a hack to remove the pooler from optimizer. https://github.com/huggingface/transformers/blob/b832d5bb8a6dfc5965015b828e577677eace601e/examples/run_squad.py#L927 # hack to remove pooler, which is not used # thus it…
3
votes
0 answers

How to access immediate activations of custom model containing a pretrained-model?

I have a custom network of a Keras Xception base with added regression head: pretrained_model = tf.keras.applications.Xception(input_shape=[244, 244, 3], include_top=False, weights='imagenet') pretrained_model.trainable = True model =…
3
votes
2 answers

Is there any way that can convert a data format of .pb file from NCHW into NHWC?

I have a CNN model which was trained in Pytorch based on the data format N(batch) x C(channel) x H(height) x W(width). I saved the pre-trained model as model.pth. Afterward, I converted the pre-trained model from model.pth -> model.onnx by using…
3
votes
0 answers

Porting Keras older version models to latest version

I've a pretrained model in Keras-0.3.3. It is saved as json_file and weights file. If I try to load it in latest keras, it fails. How can I port the model to latest keras version? PS: The model I'm referring to is in this github page Edit 1: Adding…
Nagabhushan S N
  • 6,407
  • 8
  • 44
  • 87
3
votes
1 answer

Tensorflow Hub vs Keras application - performance drop

I have image classification problem and i want to use Keras pretrained models for this task. When I use such a model model = tf.keras.Sequential([ hub.KerasLayer("https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/4", …
3
votes
1 answer

How could we combine two trained model (deep learning network: GAN network with CNN and ResNet)

I have a GAN network (Generative Adversarial Network), consisting of some CNN, ResNet as the structure. I was wondering if I could combine two trained models into one model that maintains functions of model1 and mode2 as before. I have two training…
3
votes
0 answers

pytorch:RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)

I want to train a 100-classes model by using pretrain inceptionV3,but in my training code, I got a strange error, show the error below: my training code is: step = -1 print_inter=50 val_inter=400 train_size = ceil(len(data_set['train']) /…
3
votes
0 answers

Saving an h2o pipeline model build using sklearn

I have an sklearn pipeline with h2o preprocessors and h2o estimators. Please see below. pipeline = Pipeline([("standardize", h2o.transforms.preprocessing.H2OScaler()), ("pca", h2o.transforms.decomposition.H2OPCA(k=2)), …
Anup
  • 63
  • 1
  • 6
3
votes
1 answer

Re-train pre-trained ResNet-50 model with tf slim for classification purposes

I would like to re-train a pre-trained ResNet-50 model with TensorFlow slim, and use it later for classifying purposes. The ResNet-50 is designed to 1000 classes, but I would like just 10 classes (land cover types) as output. First, I try to code…
poetyi
  • 236
  • 4
  • 13
3
votes
0 answers

Debugging the optmization run while training variables of a pre-trained tensorflow model

I am loading a pre-trained model and then extracting only the trainable variables which I want to optimize (basically change or fine-tune) according to my custom loss. The problem is the moment I pass a mini-batch of data to it, it just hangs and…
3
votes
1 answer

How to restore a tensorflow model that only has one file with extension ".model"

I want to use a pretrained tensorflow model provided by an unknown author. I do not know how he/she managed to save the tensorflow model (he/she used tensorflow version >= 1.2) to only one file with the extension '.model', as normally I get either…
3
votes
1 answer

Keras - Classifier not learning from Transfer-Values of a Pre-Trained Model

I'm currently trying to use a pre-trained network and test in on this dataset. Originally, I used VGG19 and just fine-tuned only the classifier at the end to fit with my 120 classes. I let all layers trainable to maybe improve performance by…
Nicolas M.
  • 1,472
  • 1
  • 13
  • 26
3
votes
1 answer

Pre-trained vector of skip-gram and skip-n-gram

I am doing a project where I need a pre-trained vector of the skip-gram model. I heard that there is also a variant named skip-n-gram model which gives better result. I am wondering what do I need to train the models myself? Since I just need them…
Maruf
  • 792
  • 12
  • 36
3
votes
2 answers

Keras: using VGG16 to detect specific, non-generic item?

I'm learning about using neural networks and object detection, using Python and Keras. My goal is to detect something very specific in an image, let's say a very specific brand / type of car carburetor (part of a car engine). The tutorials I found…
3
votes
2 answers

High-resolution image classification

Usually pre-trained networks like VGG16 / Inception etc. works with low resolution like < 500px. Is it possible to add a high-resolution convolution layer (or two) before the very first layer of pre-trained VGG16 / Inception to make the network be…