titu1994 / keras-non-local-nets

Keras implementation of Non-local Neural Networks
MIT License
290 stars 100 forks source link

`IndexError: tuple index out of range` at line 152 of nonlocal_resnet.py #7

Closed soulmachine closed 5 years ago

soulmachine commented 5 years ago

I tried to use NonLocalResNet50:

model = NonLocalResNet50(input_shape=(224, 224, 3), classes=340)

But got the following error:

IndexError: tuple index out of range

It's raised from line 152 of nonlocal_resnet.py:

    150     x = block_function(filters=filters, stage=stage, block=i,
    151                        transition_strides=transition_strides[i],
--> 152                        dilation_rate=dilation_rates[i],
    153                        is_first_block_of_first_layer=(is_first_layer and i == 0),
    154                        dropout=dropout,