logo
Loading...

Vgg範例問題 - Cupoy

需要請助教們好好看看內容~~錯誤蠻多的哩......作業內容 : 請我們   嘗試導入Incepti...

cvdl-2

Vgg範例問題

2020/03/17 03:12 PM
電腦視覺深度學習論壇
陽明益
觀看數:0
回答數:2
收藏數:1
cvdl-2

需要請助教們好好看看內容~~

錯誤蠻多的哩......


作業內容 : 請我們   嘗試導入Inception Block到 Vgg_Inception中

但根本沒說要填入哪邊? 給的程式碼看起來完整, 結果不能執行

要看了給的答案才知道問題點在哪邊??

花了好久時間才發現~~ 我們是不是在協助debug 教材呀 ~~   暈了, 來去睡.....


def VGG16_ResNet_Inception(include_top=True,input_tensor=None, input_shape=(224,224,1),

          pooling='max',classes=1000):

 

    img_input = Input(shape=input_shape)

    

    x = Conv2d_bn(img_input,64, (3, 3), activation='relu', padding='same', name='block1_conv1')

    x = Conv2d_bn(x,64, (3, 3), activation='relu', padding='same', name='block1_conv2')

    x = MaxPooling2D((2, 2), strides=(2, 2), name='block1_pool')(x)


    # Block 2

    x = Conv2d_bn(x,128, (3, 3), activation='relu', padding='same', name='block2_conv1')

    x = Conv2d_bn(x,128, (3, 3), activation='relu', padding='same', name='block2_conv2')

    x = MaxPooling2D((2, 2), strides=(2, 2), name='block2_pool')(x)


    # Block 3

    x = InceptionV1_block(x, ((64,), (96,128), (16,32), (32,)), 3, 'Block_1')

    x = InceptionV1_block(x, ((64,), (96,128), (16,32), (32,)), 3, 'Block_2')

    x = InceptionV1_block(x, ((64,), (96,128), (16,32), (32,)), 3, 'Block_3')

    x = MaxPooling2D((2, 2), strides=(2, 2), name='block3_pool')(x)