All Questions
200 questions
-4
votes
0
answers
30
views
Common practices to mitigate accuracy plateauing at baseline? [closed]
I'm training a Deep neural network to detect diabetic retinopathy using Efficient-net B0 and only training the classifier layer with conv layers frozen. Initially to mitigate the class imbalance I ...
0
votes
0
answers
64
views
how to apply backward warp (pytorch's grid_sample) with forward optical flow?
I have been working on optical flow algorithms recently and have been using pytorch to apply the optical flow field.
I have noticed that most libraries have implemented only the backward warp function ...
2
votes
0
answers
33
views
Conversion of model weights from old Keras version to Pytorch
I want to transfer pretrained weights from an old project on github : https://github.com/ajgallego/staff-lines-removal
The original Keras model code is:
def get_keras_autoencoder(self, input_size=256, ...
0
votes
1
answer
62
views
Using zip() on two nn.ModuleList
Is using two different nn.ModuleList() zipped lists correct to build the computational graph for training a neural net in PyTorch? nn.ModuleList is a wrapper around Python's list with a registration ...
0
votes
0
answers
30
views
dsac_tools(calculate essential matrix using pytorch) computational problem
I am trying to find a Python model that can calculate the essential matrix so I can integrate it into my machine learning model.
def _homo(x):
# input: x [N, 2] or [batch_size, N, 2]
# output: ...
0
votes
0
answers
47
views
Correct loss function for bboxes in a detector model
I try to clarify the learning process of the detector model with anchors.
Unfortunately, I have some trouble with the loss function. I have built the model with the classification and regression heads,...
-1
votes
1
answer
62
views
What's the problems in my custom layernorm function?
import numpy as np
import torch
import torch.nn.functional as F
def layer_norm(x, weight, bias, eps=1e-6):
# x shape: [bs, h, w, c]
# Calculate mean and variance across the spatial dimensions ...
0
votes
0
answers
53
views
Fast AI Siamese model not improving
So I was following this tutorial: Fast Ai Siamese, however after I completed it, I got 50% accuracy. I tried loads of things, but nothing worked. So the only place where I think the problem could be ...
1
vote
1
answer
169
views
Albumentations intensity augmentations disrupt the image
I'm using a preprocessed, z-score normalized list as the source for my dataset.
Here's a collage of images augmented by Albumentations:
enter image description here
Here's my Compose:
augmentation = A....
2
votes
0
answers
56
views
Reducing and Reconstruction CNN model parameters using a VAE
Suppose I have a simple CNN model with 2 Conv2D layers, I trained this model on my image dataset, I am going to feed the parameters of this CNN model into a VAE (as input of encoder) to first reduce ...
0
votes
1
answer
81
views
Video classification using CNN + LSTM combination loss isn't reducing, metrics aren't improving
I'm trying to build a binary classification network for videos.
Dataset class loads 16/32 frames per video along with its label.
The model is a combination of pretrained Resnet101 followed by LSTM and ...
0
votes
0
answers
73
views
TypeError: img should be PIL Image. Got <class 'dict'>
I am trying to train my model on my local GPU and it gives an error while the same code runs properly on Google Colab.
from datasets import load_dataset
dataset = load_dataset("tglcourse/...
0
votes
2
answers
379
views
How do I concatenate outputs of two different models if the shapes are completely different?
I am having two pretrained models in pytorch which use different type of input data. Both of them I am using for feature extraction and want to concatenate their outputs at the end and put them into ...
2
votes
1
answer
409
views
Why conv2d yields different results with different batch size
I feed the conv2d with the same data but different batch size (using stack) as input:
a = torch.rand(1, 512, 16, 16) # (1, 512, 16, 16)
b = torch.cat([a, a, a], dim=0) # (3, 512, 16, 16)
a, b = a....
0
votes
0
answers
257
views
YOLO-NAS on Apple m1: "RuntimeError: Currently topk on mps works only for k<=16"
I'm trying out YOLO-NAS from supergradients on my Apple M1 pro machine. I ran the following code to inference a video on MPS:
from super_gradients.training import models
model = models.get("...