Giter Club home page Giter Club logo

numpy-cnn's People

Contributors

elefhead avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

numpy-cnn's Issues

can not run

Hello! When I run cnn.py, I received error as following:
FileNotFoundError: [Errno 2] No such file or directory: './data/data_batch_1'

could you please check it?

Clarification about the implementation

I've seen that in flatten.py you are transposing the input after flattening and reshaping with np.reshape(Z.shape[0], -1).
If this is the output from the previous layer:

array([[[[-18.0992297 ,   4.02661879, -26.38740113],
         [  4.1076395 ,   5.11381946,  -1.99698891],
         [  3.52465515,  12.75818289,  -1.3031802 ]]],


       [[[ -6.1276822 ,  -0.63462835,   0.65559075],
         [  0.09962715,   3.65460836,   7.24738437],
         [-21.24060198,  -0.21378359, -21.09988605]]],


       [[[-34.73760556,   4.71261136,  23.10390976],
         [ -7.06577993,  15.1269017 ,   6.36696882],
         [-31.18436636,  -5.41256305,  25.87760449]]],


       [[[ 12.32376955, -23.15656867,  -2.30117432],
         [  4.28086566,   6.55903427, -17.02264095],
         [-18.28691051, -16.67304131,  16.4118617 ]]]])
# a.shape = (4, 1, 3, 3) --> feature_maps, depth, height, width

than the output of the Flatten layer will be:

array([[-18.0992297 ,  -6.1276822 , -34.73760556,  12.32376955],
       [  4.02661879,  -0.63462835,   4.71261136, -23.15656867],
       [-26.38740113,   0.65559075,  23.10390976,  -2.30117432],
       [  4.1076395 ,   0.09962715,  -7.06577993,   4.28086566],
       [  5.11381946,   3.65460836,  15.1269017 ,   6.55903427],
       [ -1.99698891,   7.24738437,   6.36696882, -17.02264095],
       [  3.52465515, -21.24060198, -31.18436636, -18.28691051],
       [ 12.75818289,  -0.21378359,  -5.41256305, -16.67304131],
       [ -1.3031802 , -21.09988605,  25.87760449,  16.4118617 ]])
# a.shape == (4, 9)

It isn't flattened. What didn't I understand? Why not just returning Z.flatten()?
Thanks!

Problem with 'valid' padding

I've looked at the code and in layers/convolution.py line 156:

dA[i, :, :, :] = da_pad[pad_h: -pad_h, pad_w: -pad_w, :]

If you use 'valid' padding then pad_w and pad_h would be 0 which will put an empty array in dA.

dA[i, :, :, :] = da_pad[0: -0, 0: -0, :]

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.