gwding / draw_convnet

2.64k stars 513 forks source link

How to remove one fully connected layer? #6

Open laur1s opened 7 years ago

laur1s commented 7 years ago

I only have one fully connected layer in my conv net. However, when I try to remove it from list num_list = [1, 500] I get add_layer(patches, colors, size=size_list[ind], num=num_show_list[ind], IndexError: list index out of range How do I solve this problem?

gwding commented 7 years ago

size_list and num_list should have same size, change the line above to

size_list = [fc_unit_size, fc_unit_size]

would fix the error

laur1s commented 7 years ago

convnet_fig

Thanks! However, now I am getting a huge gap between conv and fully connected layers and no directed links between convolutional layers.

gwding commented 7 years ago

looks like u are using Python 3? or matplotlib 2.0 there're some problems there

python 2 and matplotlib 1.4 should have no problem.

sorry that i don't have time to look into details at this moment

On Mar 9, 2017 17:08, "Laurynas Tumosa" notifications@github.com wrote:

[image: convnet_fig] https://cloud.githubusercontent.com/assets/7099082/23777621/e79dcc38-052d-11e7-9ee7-df7995a37788.png

Thanks! However, now I am getting a huge gap between conv and fully connected layers and no directed links between convolutional layers.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gwding/draw_convnet/issues/6#issuecomment-285542083, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7ZuhACwFemZd2dUSiQgDBe6efBtN3qks5rkKKRgaJpZM4MYzCJ .

laur1s commented 7 years ago

Thank you, downgrading the matplotlib fixed the connections. Could you tell me what parameter controls the distance between fully connected and hidden layers? That huge gap remained and doesn't look very good

gwding commented 7 years ago

@laur1s actually I'm not able to generate the huge gap you've shown , if i set

    size_list = [fc_unit_size, fc_unit_size]
    num_list = [500, 2]

if you still have the problem you might play with x_diff_list to see if it fixes the problem