Python MaxPoolig2D-位置参数跟随关键字参数
我的代码如下:Python MaxPoolig2D-位置参数跟随关键字参数,python,keras,error-handling,max-pooling,Python,Keras,Error Handling,Max Pooling,我的代码如下: 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 "<
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
文件“”,第5行
模型=MaxPoolig2D(池大小=(3,3),步幅=2,2)(模型)
^
SyntaxError:位置参数跟在关键字参数后面
我应该如何修改我的代码?(注意:仅仅通过查看代码,无法进行测试)
(您正在设置:strips=2
,然后传递另一个位置arg
2
)就是这样!非常感谢。
strides=(2, 2)