Giter Site home page Giter Site logo

Not able to add layers about draw_convnet HOT 5 CLOSED

gwding avatar gwding commented on September 26, 2024
Not able to add layers

from draw_convnet.

Comments (5)

gwding avatar gwding commented on September 26, 2024

from draw_convnet.

akshataman avatar akshataman commented on September 26, 2024

convnet_fig

I somehow added these layers but I'm facing problem in patch_size_list! After increasing the size, the error comes out to be "index 11 is out of bounds for axis 0 with size 11"
I'm sending you the code screenshot!

screenshot 1

Can you please suggest me the essential changes so as to fit my model.

from draw_convnet.

gwding avatar gwding commented on September 26, 2024

@akshataman if you haven't figured it out, can you copy the full error message to here?

from draw_convnet.

akshataman avatar akshataman commented on September 26, 2024

IndexError Traceback (most recent call last)
in ()
165 patch_size_list[ind], ind,
166 top_left_list, loc_diff_list, num_show_list, size_list)
--> 167 label(top_left_list[ind], text_list[ind] + '\n{}x{} kernel'.format(
168 patch_size_list[ind][0], patch_size_list[ind][1]), xy_off=[26, -65]
169 )

IndexError: list index out of range

This error is coming while I changed the parameters below:

############################
# in between layers
start_ratio_list = [[0.4, 0.5], [0.4, 0.8], [0.4, 0.5], [0.4, 0.8], [0.4, 0.5], [0.4, 0.8], [0.4, 0.5], [0.4, 0.8], [0.4, 0.5], [0.4, 0.8], [0.4, 0.5]]
end_ratio_list = [[0.4, 0.5], [0.4, 0.8], [0.4, 0.5], [0.4, 0.8], [0.4, 0.5], [0.4, 0.8], [0.4, 0.5], [0.4, 0.8], [0.4, 0.5], [0.4, 0.8], [0.4, 0.5]]
patch_size_list = [(3, 3), (2, 2), (3, 3), (2, 2), (2, 2), (3, 3), (2, 2), (2, 2), (3, 3), (2, 2), (2, 2)]
ind_bgn_list = range(len(patch_size_list))
text_list = ['Convolution', 'Convolution', 'Max-pooling', 'Convolution', 'Max-pooling', 'Convolution', 'Max-pooling', 'Dropout', 'Flatten']

for ind in range(len(patch_size_list)):
    add_mapping(
        patches, colors, start_ratio_list[ind], end_ratio_list[ind],
        patch_size_list[ind], ind,
        top_left_list, loc_diff_list, num_show_list, size_list)
    label(top_left_list[ind], text_list[ind] + '\n{}x{} kernel'.format(
        patch_size_list[ind][0], patch_size_list[ind][1]), xy_off=[26, -65]
    )

Below is the model which I want. It's urgent. Please suggest me how to do that.
mymodel

from draw_convnet.

gwding avatar gwding commented on September 26, 2024

you'll need to make sure the length of lists make sense. e.g. for in-between layers lists, you need them to have the same length. length of "in-between" lists should be n-1, where n is the number layers.

from draw_convnet.

Related Issues (12)

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.