u/Plane_Stick8394

▲ 14 r/pytorch+2 crossposts

I'm reproducing a published paper's hybrid Gabor + CNN architecture in PyTorch. The original implementation is in TensorFlow. My reproduction consistently lands ~4 pp below the paper's reported test accuracy on DermaMNIST (73-74% vs paper's 77.01%). I'd like to know which cross-framework differences are most likely to cause this gap.

Ahmed et al., "A Lightweight Hybrid Gabor Deep Learning Approach", IJCV 2026 (DOI: 10.1007/s11263-025-02658-2). The architecture is a fixed Gabor filter bank front-end followed by a small CNN with one SE block, one residual block, and three FC layers. ~340k parameters total. I've already tried Different sigma_factor values (1.0 vs 1.2) and Multiple random seeds (42, 0, 123) and tried diffrent sigma valyes of the lpf and hpf channels but its didnt close the gap.

please any idea on how to at least get a 76% to match the paper because i wanted to add improvements to see the diffrence, i would really appreciate it on how to fix this problem or any advice on what to do.

also here is just example of one epoch i have noticed that the test accuracy is lower than the validation accuracy: im i doing something wrong

[  47/100] Train: 75.70%  Val: 76.07%  Best: 76.97%  Loss: 0.6827

[paper] test acc = 0.7382

Code example:

python

class FixedGaborFrontEnd(nn.Module):
    def __init__(self, scales=(0.10, 0.20, 0.40), orientations=(4, 4, 4),
                 sigma_factor=1.0, input_size=224, output_size=56):
        super().__init__()
        # Build Gabor parameters (fixed buffers, not learnable)
        sigmas, thetas, freqs, kernel_sizes = [], [], [], []
        for f, o in zip(scales, orientations):
            sigma = sigma_factor / (math.pi * f)
            N = 2 * int(math.floor(3 * sigma)) + 1
            for k in range(o):
                sigmas.append(sigma)
                thetas.append(math.pi * k / o)
                freqs.append(f)
                kernel_sizes.append(N)
        # ... build real/imag kernels with zero-mean + L2 normalization ...

    def forward(self, x):
        # Convert RGB to grayscale
        if x.shape[1] != 1:
            x = 0.299 * x[:, 0:1] + 0.587 * x[:, 1:2] + 0.114 * x[:, 2:3]
        real = F.conv2d(x, self.real_kernels, padding=self.max_kernel_size // 2)
        imag = F.conv2d(x, self.imag_kernels, padding=self.max_kernel_size // 2)
        magnitude = torch.sqrt(real ** 2 + imag ** 2 + 1e-8)
        lpf = F.conv2d(x, self.lpf_kernel, padding=self.lpf_pad)
        hpf = F.conv2d(x, self.hpf_kernel, padding=self.hpf_pad)
        feats = torch.cat([magnitude, lpf, hpf], dim=1)
        feats = F.avg_pool2d(feats, 4, 4)  # 224 → 56
        return feats

# Standard backbone follows: SE → Conv-BN-ReLU → MaxPool → ResBlock → Dropout → GAP → FC × 3

optimizer = torch.optim.Adam(model.parameters(), lr=1e-3)
scheduler = torch.optim.lr_scheduler.ReduceLROnPlateau(optimizer, mode='min', factor=0.5
reddit.com
u/Plane_Stick8394 — 15 days ago
▲ 79 r/PhdProductivity+2 crossposts

I’m a PhD student working in AI/computer vision, and I’ve hit a frustrating wall with a project.

My supervisor asked me to improve the accuracy of a published paper. My first step has been to faithfully reproduce their results before trying any modifications. The issue is I can’t even match their reported baseline. The paper reports ~77% accuracy, but after multiple runs and careful tuning, I’m consistently getting around 73%.

I’ve double-checked what I can: implementation details, preprocessing, hyperparameters (as much as they’re described), and even small things like random seeds and evaluation protocols. I also reached out to the paper’s author to clarify parts of the paper not mentioned but haven’t received a response.

At this point, I’m unsure how to proceed. It’s hard to justify “improvements” when my baseline is already below theirs.

Has anyone here dealt with this kind of reproducibility gap? How did you handle it especially when key details might be missing or authors are unresponsive? Any practical advice would be really appreciated.

reddit.com
u/Plane_Stick8394 — 17 days ago

Hey everyone,

I’m currently working on a project where I’m trying to integrate a Chebyshev filter into a CNN architecture to improve performance compared to a baseline model. The idea is to leverage the filter (either in preprocessing or as part of the network pipeline) to enhance feature extraction, but so far my results are… basically the same as the baseline 😅

I’ve experimented with a few variations (different filter parameters, placements in the pipeline, etc.), but I’m not seeing any meaningful improvement in accuracy. At this point, I’m wondering if I’m missing something fundamental in how this should be applied, or if the benefit just isn’t that significant in practice.

Has anyone here worked on something similar or tried combining classical signal processing techniques like Chebyshev filters with CNNs?

Where did you integrate the filter (input preprocessing vs inside the network)?

Did it actually help performance?

Any tips on tuning or pitfalls to avoid?

I’m kind of stuck right now and my supervisor is expecting some progress soon, so I’d really appreciate any pointers or even papers/repos I could look into.

Thanks in advance!

reddit.com
u/Plane_Stick8394 — 19 days ago

Hey everyone,

I’m currently working on a project where I’m trying to integrate a Chebyshev filter into a CNN architecture to improve performance compared to a baseline model. The idea is to leverage the filter (either in preprocessing or as part of the network pipeline) to enhance feature extraction, but so far my results are… basically the same as the baseline 😅

I’ve experimented with a few variations (different filter parameters, placements in the pipeline, etc.), but I’m not seeing any meaningful improvement in accuracy. At this point, I’m wondering if I’m missing something fundamental in how this should be applied, or if the benefit just isn’t that significant in practice.

Has anyone here worked on something similar or tried combining classical signal processing techniques like Chebyshev filters with CNNs?

Where did you integrate the filter (input preprocessing vs inside the network)?

Did it actually help performance?

Any tips on tuning or pitfalls to avoid?

I’m kind of stuck right now and my supervisor is expecting some progress soon, so I’d really appreciate any pointers or even papers/repos I could look into.

Thanks in advance!

reddit.com
u/Plane_Stick8394 — 19 days ago
▲ 7 r/PhDStress+1 crossposts

I’m a PhD student working in AI/computer vision, and I recently realized I made a pretty serious mistake in my experiments.

I had results that looked better than benchmark methods and already showed them to my supervisor. Based on that, he suggested we aim for a conference submission in July. The problem is that I’ve now discovered the comparison wasn’t actually fair, so those results aren’t valid.

I’m feeling really stressed and honestly scared about how to handle this. I’m considering redoing all the experiments and hoping I can reproduce similar results before July, but I’m not sure if that’s realistic or even the right approach.

Has anyone been in a similar situation? How did you handle it, especially when you had already shared results with your advisor? Any advice would really help.

reddit.com
u/Plane_Stick8394 — 21 days ago