Questions tagged [efficientnet]

questions about retraining efficientnet with Keras to create new object detection models

efficientnet is a lightweight convolutional neural network architecture achieving the state-of-the-art accuracy with an order of magnitude fewer parameters and FLOPS, on both ImageNet and five other commonly used transfer learning datasets.

109 questions
1
vote
1 answer

How can I prune efficientnet parameters via pytorch?

I am training a model with efficientnet pytorch and to reduce overfitting, I want to prune some of the parameters. My model is implemented as follows: import torchvision.models as models import torch.nn as nn model =…
Thai Pro
  • 11
  • 1
1
vote
1 answer

Saving Frozen EfficientNetB0 in Tensorflow 2.x fails due to custom gradients

I'm fine tuning an EfficientNetB0 model (from Keras Applications in TF 2.9.2) and I want to optimize the final model as much as possible in order to be inferred via Tensorflow C++ API. Applying tf.saved_model.save after…
1
vote
3 answers

Keras. EfficientNetV2 doesn't converge while EfficientNet does

Using transfer learning with EfficientNet (B4) for the image classification yielded decent results. Trying to run the same with the V2 gets stuck with no learning. Any idea what should be done to solve it? Thanks This converges just fine starting…
1
vote
0 answers

Efficient Net Image Classification

I am trying to classify custom data with Keras Efficient net.evening and morning I was following here for classification custom data evening morning. https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/ I could not do the…
Laura
  • 56
  • 5
1
vote
1 answer

Correct way to iterate over Keras ragged tensor

I have an input Tensorflow ragged tensor structured like this [batch num_images width height channels] and I need to iterate over the dimension num_images to extract some features relevant for downstream applications. Example code is the…
Alberto
  • 467
  • 3
  • 16
1
vote
3 answers

Tensorflow EfficientNetB0 Error: TypeError: Exception encountered when calling layer "tf.math.truediv" (type TFOpLambda)

Encountered the following error when creating a Feature Extraction EfficientNetB0 model from tensorflow.keras.applications.EfficientNetB0. --------------------------------------------------------------------------- TypeError …
1
vote
0 answers

Why is the validation accuracy coming to be the baseline accuracy

I am using EfficientNetB0 for custom training . I get the following output In order to debug I tried the same data for train and test and get the following error This is not happening with other networks like Xception and Inception. What can be…
1
vote
0 answers

Normalizing and standardizing reducing accuracy when using pre-trained 'imagenet' weights?

I am new to CNN's, and have read in multiple places that inputs should have low magnitudes such as normalized to values of 0->1, -1->+1, standardized around zero and so on. I tried all of these methods but the accuracy is never as good as when I use…
1
vote
1 answer

what is the number of layers in EfficientNetB2?

Knowing that the total number of layers in EfficientNet-B0 is 237 and in EfficientNet-B7 the total comes out to 813, what is the total number of layers in EfficientNetB2 ?
pc dar
  • 11
  • 3
1
vote
2 answers

Typeerror: 1 positional argument but 2 were given, torch.nn.linear takes

I am using EfficientNet to extract features and trying to add a fully connected layer to pre-trained model to reduce the dimension of the out-features from efficientnet to 512. I encountered the following error when the features pass through the…
ChengguiS.
  • 31
  • 8
1
vote
0 answers

Tensorflow hub vs tf.keras.applications for transfer learning

I'm trying to figure out what is the difference between using a pretrained model from tensorflow hub versus using the very same architecture from tf.keras.applications. I've tried training 2 models with the same architecture - one from tf hub, an…
1
vote
0 answers

ValueError: Layer model expects 5 input(s), but it received 3035 input tensors

I have a stacked model of 5 EfficientNetB3 models. I am trying to get the predictions out of it. Following are the dataset and model building: Dataset: def build_decoder(with_labels=True, target_size=(300, 300), ext='jpg'): def decode(path): …
Arthur
  • 21
  • 2
1
vote
1 answer

How to add an auxiliary head to an intermediary layer of a pretrained keras model?

This is my first question on stack overflow. I'm going to try to give as much context as I can. Thank you for taking the time to read my question ! I'm currently using efficentnet for a classification problem. I want to add an auxiliary head on an…
Tom Darmon
  • 13
  • 3
1
vote
0 answers

Dtype error when using Mixed Precision and building EfficientNetB0 Model

System information OS Platform and Distribution : MacOS TensorFlow installed from : Colab TensorFlow version : 2.5.0 Python version: python 3.7 GPU model and memory: Tesla T4 Error TypeError: Input 'y' of 'Sub' Op has type float16 that does not…
1
vote
1 answer

How to read predict() result in Tensorflowjs using a SavedModel

Code using tfjs-node: const model = await tf.node.loadSavedModel(modelPath); const data = fs.readFileSync(imgPath); const tfimage = tf.node.decodeImage(data, 3); const expanded = tfimage.expandDims(0); const result =…