Giter Site home page Giter Site logo

RuntimeError: Given input size: (1536x5x5). Calculated output size: (1536x0x0). Output size is too small about facenet-pytorch-glint360k HOT 2 OPEN

tamerthamoqa avatar tamerthamoqa commented on May 30, 2024
RuntimeError: Given input size: (1536x5x5). Calculated output size: (1536x0x0). Output size is too small

from facenet-pytorch-glint360k.

Comments (2)

tamerthamoqa avatar tamerthamoqa commented on May 30, 2024 2

Hello JinhaSong,

Did you specify the input image to be 299x299? I think the minimum should be 150x150 but I am not sure on that to be honest.

For reference, I have imported the Inception-ResNet-V2 implementation from Cadene's repository here:
https://github.com/Cadene/pretrained-models.pytorch/blob/master/pretrainedmodels/models/inceptionresnetv2.py

from facenet-pytorch-glint360k.

JoannisAretakis avatar JoannisAretakis commented on May 30, 2024 1

Hi JinhaSong,
I had similar issue and I managed to fix it by setting AvgPool2d kernel_size to 5. Since the
VGGFace2 images are smaller the current network at that layer ends up with tensor 1536x5x5 instead of 1536x8x8.
Applying pooling with kernel_size 8 which is larger that what is provided by the previous layer causes this issue. Hope that helps !

from facenet-pytorch-glint360k.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.