Giter VIP home page Giter VIP logo

Comments (3)

yueseW avatar yueseW commented on July 30, 2024

raise ValueError(err.message)
ValueError: Negative dimension size caused by subtracting 11 from 3 for 'conv_1/convolution' (op: 'Conv2D') with input shapes: [?,3,227,227], [11,11,227,96].

Do you know how to debug this๏ผŸ It occurred when I tried to use the alexnet.

from convnets-keras.

duggalrahul avatar duggalrahul commented on July 30, 2024

Hi @yueseW.
I'm not sure which code you are referring to. If you're interested in performing transfer learning using AlexNet, you can have a look at my project. If this does not help, then please post the code that you are trying to run.

from convnets-keras.

rpandey4 avatar rpandey4 commented on July 30, 2024

Hi @yueseW

Actually it's because I guess you are using tensorflow with keras so you have to change the dimension of input shape to (w, h, ch) instead of default (ch, w, h) For e.g. in AlexNet here

def AlexNet(weights_path=None, heatmap=False):
    if heatmap:
        inputs = Input(shape=(3,None,None))
    else:
        inputs = Input(shape=(3,227,227))

You have to change to

def AlexNet(weights_path=None, heatmap=False):
    if heatmap:
        inputs = Input(shape=(None,None, 3))
    else:
        inputs = Input(shape=(227,227,3))

from convnets-keras.

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.