Keras: GlobalAveragePooling2D error 'Tensor' object has no attribute 'lower'

Created on 10 Mar 2018  路  2Comments  路  Source: keras-team/keras

Same for GlobalMaxPooling2D

keras from master, tensorflow from tf-nightly-gpu

```def disc():
def conv(i, deph, size, std, usebn = True):
i = Conv2D(filters = deph, kernel_size = size, strides = 1, padding = 'same')(i)
if usebn:
i = bn(i)
i = relu(i)
i = MaxPooling2D(std)(i)
return i

inp = Input(shape = d_shape)
i = inp

i = conv(i, depth, size, 2, False)    
i = conv(i, depth, size, 2)
i = conv(i, depth, size, 2)
i = conv(i, depth, size, 2)

i = GlobalMaxPooling2D(i)

i = Dense(len(labels), activation = 'softmax')(i)

m = Model(inp, i)

Most helpful comment

GlobalMaxPooling2D()(i)

All 2 comments

GlobalMaxPooling2D()(i)

Damm, pretty obvious, thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

harishkrishnav picture harishkrishnav  路  3Comments

vinayakumarr picture vinayakumarr  路  3Comments

anjishnu picture anjishnu  路  3Comments

snakeztc picture snakeztc  路  3Comments

rantsandruse picture rantsandruse  路  3Comments