Closed akshataman closed 6 years ago
you'll need to modify these lists in order to add layers. layer parameters are distributed in these lists and in order.
############################
size_list = [(32, 32), (18, 18), (10, 10), (6, 6), (4, 4)] num_list = [3, 32, 32, 48, 48] x_diff_list = [0, layer_width, layer_width, layer_width, layer_width] text_list = ['Inputs'] + ['Feature\nmaps'] (len(size_list) - 1) loc_diff_list = [[3, -3]] len(size_list) ############################
start_ratio_list = [[0.4, 0.5], [0.4, 0.8], [0.4, 0.5], [0.4, 0.8]] end_ratio_list = [[0.4, 0.5], [0.4, 0.8], [0.4, 0.5], [0.4, 0.8]] patch_size_list = [(5, 5), (2, 2), (5, 5), (2, 2)] ind_bgn_list = range(len(patch_size_list)) text_list = ['Convolution', 'Max-pooling', 'Convolution', 'Max-pooling']
############################
size_list = [(fc_unit_size, fc_unit_size)] 3 num_list = [768, 500, 2] num_show_list = list(map(min, num_list, [NumFcMax] len(num_list))) x_diff_list = [sum(x_diff_list) + layer_width, layer_width, layer_width] top_leftlist = np.c[np.cumsum(x_diff_list), np.zeros(len(x_diff_list))] loc_diff_list = [[fc_unit_size, -fc_unit_size]] len(top_left_list) text_list = ['Hidden\nunits'] (len(size_list) - 1) + ['Outputs']
On Wed, 20 Jun 2018 at 05:30, Akshat Aman notifications@github.com wrote:
I need to add more convolution layers in my model. But I am not able to understand the code to do so. Can you please help me to do so?
Below is the visualization of model which I want to make. Please help. Layer (type) Output Shape Param #
conv2d_11 (Conv2D) (None, 126, 126, 16) 448
conv2d_12 (Conv2D) (None, 124, 124, 32) 4640
max_pooling2d_9 (MaxPooling2 (None, 62, 62, 32) 0
conv2d_13 (Conv2D) (None, 60, 60, 32) 9248
max_pooling2d_10 (MaxPooling (None, 30, 30, 32) 0
conv2d_14 (Conv2D) (None, 28, 28, 32) 9248
max_pooling2d_11 (MaxPooling (None, 14, 14, 32) 0
conv2d_15 (Conv2D) (None, 12, 12, 32) 9248
max_pooling2d_12 (MaxPooling (None, 6, 6, 32) 0
dropout_5 (Dropout) (None, 6, 6, 32) 0
flatten_3 (Flatten) (None, 1152) 0
dense_5 (Dense) (None, 32) 36896
dropout_6 (Dropout) (None, 32) 0
dense_6 (Dense) (None, 3) 99
Total params: 69,827 Trainable params: 69,827 Non-trainable params: 0
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gwding/draw_convnet/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7ZutwU1szcItifG5raqR4Oq6Ud6Im9ks5t-hYxgaJpZM4Uu7Ai .
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!
Can you please suggest me the essential changes so as to fit my model.
@akshataman if you haven't figured it out, can you copy the full error message to here?
IndexError Traceback (most recent call last)
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.
I need to add more convolution layers in my model. But I am not able to understand the code to do so. Can you please help me to do so?
Below is the visualization of model which I want to make. Please help.
Layer (type) Output Shape Param #
conv2d_11 (Conv2D) (None, 126, 126, 16) 448
conv2d_12 (Conv2D) (None, 124, 124, 32) 4640
max_pooling2d_9 (MaxPooling2 (None, 62, 62, 32) 0
conv2d_13 (Conv2D) (None, 60, 60, 32) 9248
max_pooling2d_10 (MaxPooling (None, 30, 30, 32) 0
conv2d_14 (Conv2D) (None, 28, 28, 32) 9248
max_pooling2d_11 (MaxPooling (None, 14, 14, 32) 0
conv2d_15 (Conv2D) (None, 12, 12, 32) 9248
max_pooling2d_12 (MaxPooling (None, 6, 6, 32) 0
dropout_5 (Dropout) (None, 6, 6, 32) 0
flatten_3 (Flatten) (None, 1152) 0
dense_5 (Dense) (None, 32) 36896
dropout_6 (Dropout) (None, 32) 0
dense_6 (Dense) (None, 3) 99
Total params: 69,827 Trainable params: 69,827 Non-trainable params: 0