0

我的代码如下:

def create_model(input_shape = (224, 224, 3)):
    input_img = Input(shape=input_shape)
    model = efnB0_model (input_img)
    model = MaxPooling2D(pool_size=(3, 3), strides=2, 2)(model)

    backbone = model

当我尝试运行代码时,我得到:

  File "<ipython-input-76-677f39f95f0d>", line 5
    model = MaxPooling2D(pool_size=(3, 3), strides=2, 2)(model)
                                                     ^
SyntaxError: positional argument follows keyword argument

我应该如何修改我的代码?

4

1 回答 1

1

(注:仅看,无法测试)

strides=(2, 2)

(您正在设置: strides=2
然后传递另一个位置 arg 2

于 2020-07-28T20:53:28.930 回答