Questions tagged [densenet]

43 questions
0
votes
2 answers

Whenever i try to print classification report, in accuracy column it prints some other value 0.50 but my accuracy is 0.96

Importing libraries import matplotlib.pyplot as plt import seaborn as sns import keras from keras.layers import * from keras.models import * from sklearn.metrics import classification_report, confusion_matrix from keras.preprocessing import…
0
votes
1 answer

Low accuracy using functional API + CNN and CIFAR10; incorrect initialization?

I'm new to using CNNs but I'm trying to make one using the functional API with the CIFAR10 dataset. The only thing is I'm getting very very low accuracy. I've looked over my textbook examples and documentation but can't figure out why it's so low…
0
votes
1 answer

Is my configuration for Densenet in tensorflow wrong?

When I am running the code pasted below, the model is just training for “multiplier” =1 or =4. Running the same code in google colab → just training for multiplier=1 Is there any mistake in how I am using DenseNet here? Thanks in advance, appreciate…
Steffen
  • 9
  • 2
0
votes
1 answer

Using densenet with fastai

I am trying to train a densenet model using the fast.ai library. I checked the documentation and I managed to make it work for resnet50. However, for densenet, it seems to be unable to find the module. I tried to use arch=models.dn121 as stated by…
0
votes
1 answer

Evaluating DenseNet model in Keras with weighted classes

I am doing a binary classification in Keras, using DenseNet. Created weighted classes: # Assign weights weight_for_0 = num_normal/(num_normal + num_covid) weight_for_1 = num_covid/(num_normal + num_covid) class_weight = {0: weight_for_0, 1:…
Anakin Skywalker
  • 2,400
  • 5
  • 35
  • 63
0
votes
1 answer

Shapes incompatible with DenseNet transfer learning

I want to do transfer learning with DenseNet, and I found an example I want to work off of. model_d=DenseNet121(weights='imagenet',include_top=False, input_shape=(224, 224, 3)) x=model_d.output x= GlobalAveragePooling2D()(x) x=…
0
votes
1 answer

Tensorflow Quantization Aware Training

I want to quantize a DenseNet model. I am using Tensorflow 2.4. import tensorflow_model_optimization as tfmot model = tf.keras.applications.DenseNet121(include_top=True,weights=None,input_tensor=None,input_shape=None,pooling=None,classes=1000)…
0
votes
2 answers

Unable to load chexnet pre-trained weight file to Densenet121

Im trying to load Keras chexNet weight file to Densenet121, https://www.kaggle.com/theewok/chexnet-keras-weights I'm getting ValueError: You are trying to load a weight file containing 242 layers into a model with 241 layers. if I Call…
Bhuvan S
  • 213
  • 1
  • 4
  • 10
0
votes
1 answer

convert fully connected layer to conv2d and predict output?

I'm trying get flatten layer as input to convd2d and predicting the output for 10 class classification problem on Densenet with cifar-10 dataset. following code snippet where I'm getting the error. global compression BatchNorm =…
Saranraj K
  • 412
  • 1
  • 7
  • 19
0
votes
0 answers

IndexError: index 87 is out of bounds for dimension 0 with size 39

I am making an image classifier and this error occurs, when I use Vgg16, DenseNet, etc. I have seen the model, after printing the model using this model = models.densenet169(pretrained=True). Now, this is actual error - output =…
0
votes
1 answer

input to all nodes of hidden layers are same then how they differentiate in their output?

I am new to deep learning and trying to understand the concept behind hidden layers, but i am not clear with following things: If there are suppose 3 hidden layers. When we take output from all the nodes of 2nd layer as input to all the nodes of 3rd…
0
votes
1 answer

Loading pretrained FastAI models in Kaggle kernels without using internet

I am trying to load a densenet121 model in Kaggle kernel without switching on the internet. I have done the required steps such as adding the pre-trained weights to my input directory and moving it to '.cache/torch/checkpoints/'. It still would not…
-2
votes
1 answer

ImportError: cannot import name 'Input' from 'keras.models'

please open imageImportError Traceback (most recent call last) in cell 12 ImportError: cannot import name 'Input' from 'keras.models' (C:\Users\91626\AppData\Roaming\Python\Python39\site-packages\keras\models_init_.py)
1 2
3