Questions tagged [densenet]
43 questions
3
votes
1 answer
How necessary are activation functions after dense layer in neural networks?
I'm currently training multiple recurrent convolutional neural networks with deep q-learning for the first time.
Input is a 11x11x1 matrix, each network consists of 4 convolutional layer with dimensions 3x3x16, 3x3x32, 3x3x64, 3x3x64. I use…

patricia
- 33
- 4
2
votes
1 answer
How to solve `NameError: name 'compression' is not defined`?
I am trying to implement DenseNet model and I am using image dataset with 4 classes.
Code snippets:
For building model:
def denseblock(input, num_filter = 12, dropout_rate = 0.2):
global compression
temp = input
for _ in range(l):
BatchNorm =…

Rezuana Haque
- 608
- 4
- 14
2
votes
1 answer
The Tensorflow model graph built with keras.utils.plot_model does not show concatenations
I'm trying to build a dense block, so I wrote a simple example like this:
input_layer = Input(shape=(HEIGHT, WIDTH, 3))
layer1 = Conv2D(1, (3, 3), activation="relu", padding="same")(input_layer)
layer2 = Conv2D(2, (3, 3), activation="relu",…

Bratyslav Morhunov
- 105
- 1
- 9
2
votes
0 answers
TensorFlow Lite Full-Integer Quantization fails in TF 2
I've trained resnet50v2 and densenet 169 models. TensorFlow nightly 2.3.0-dev20200608. The model works fine and I tried some optimization such as "simple" tf lite, tf lite dynamic range, tf lite 16float, and they all work fine (the accuracy is…

Stefano555
- 31
- 3
2
votes
2 answers
Dropout with densely connected layer
Iam using a densenet model for one of my projects and have some difficulties using regularization.
Without any regularization, both validation and training loss (MSE) decrease. The training loss drops faster though, resulting in some overfitting of…

Michael Lempart
- 51
- 10
2
votes
0 answers
Densenet with Hinge loss on CIFAR dataset
I am trying to use Hinge loss with densenet on the CIFAR 100 dataset. The learning converges to some point and after that there is no learning. The accuracy is much less than Densenet with CrossEntropy loss function. I tried with different learning…

user570593
- 3,420
- 12
- 56
- 91
1
vote
1 answer
How to unfreeze layers from a densenet? (PyTorch)
I'd like to perform fine-tuning of an entire block from DenseNet-161. At the moment, I know I can use the following to freeze all layers apart from the classifier:
model = models.densenet161(pretrained=True)
for param in model.parameters():
…

Ze0ruso
- 485
- 4
- 17
1
vote
1 answer
What is the purpose of decreased FLOPs and parameter size if they are not for increased speed?
CNN algorithms like DenseNet DenseNet stress parameter efficiency, which usually results in less FLOPs. However, what I am struggling to understand is why this is important. For DenseNet, in particular, it has low inference speed. Isn't the purpose…

ddd
- 121
- 1
- 1
- 9
1
vote
1 answer
How to Extract the feature vectors and save them in Densenet121?
I'm trying to extract the feature vectors of my dateset (x-ray images) which is trained on Densenet121 CNN for classification using Pytorch. I want to extract the feature vectors from one of the the intermediate layers.
model.eval()…

RBYOU
- 11
- 1
1
vote
0 answers
How to use multi label while training multi label classification
I have a data set that consists of images. I am trying to perform multi-label classification on this data set. But the training labels consist of too many labels which are CSV file format. Now I find it a little difficult on how to utilizes these…

acoustic python
- 259
- 1
- 2
- 12
1
vote
1 answer
TypeError: forward() takes 2 positional arguments but 4 were given, Pytorch
I am trying to write a GAN generator based on Densenet and Deconv method. I am new to PyTorch and unable to figure out
TypeError: forward() takes 2 positional arguments but 4 were given.
I tried the approach as suggested in
Pytorch TypeError:…

Abhistar
- 85
- 9
1
vote
1 answer
PyTorch: "ValueError: can't optimize a non-leaf Tensor" after changing pretrained model from 3 RGB Channels to 4 Channels
I have been trying to change the pretrained PyTorch Densenet's first conv layer from 3 channels to 4 channels while maintaining its original RGB channel's pretrained weights. I have done the following codes, but the optimizer part throws me this…

Jason
- 39
- 8
1
vote
0 answers
TypeError: unsupported operand type(s) for *: 'Dimension' and 'float' in DenseNet using keras
I want to apply DenseNet model using keras on my data but I get this error. I don't know how to solve it.
in transition
x = tf.keras.layers.Conv2D( np.floor( compression_factor * num_feature_maps ).astype( np.int ) ,
kernel_size=(1, 1),…

Edayildiz
- 545
- 7
- 16
1
vote
0 answers
ValueError: Error when checking target: expected dense_33 to have shape (60, 60, 5) but got array with shape (240, 240, 5)
When I try to train this model, it generates the error 'ValueError: Error when checking target: expected dense_33 to have shape (60, 60, 5) but got array with shape (240, 240, 5)'.
After one-hot encoding, y_train.shape is (4992, 240, 240,…

Elizabeth
- 21
- 2
1
vote
1 answer
convert fc layer to conv layer in dense net
I have to convert the fc layer in the dense net to conv layer. Below is the architecture of the dense net.
# Dense Block
def denseblock(input, num_filter = 12, dropout_rate = 0.0):
global compression
temp = input
for _ in range(l):
…

Satyam Anand
- 479
- 1
- 5
- 14