Tobitor
Tobitor

Reputation: 1508

MaxPooling2D - Positional Argument follows keyword argument

My code is the following:

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

When I try to run the code I get:

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

How should I amend my code?

Upvotes: 0

Views: 74

Answers (1)

user14005715
user14005715

Reputation:

(Note: just by looking at it, cannot test)

strides=(2, 2)

(You are setting: strides=2,
and then passing another positional arg 2)

Upvotes: 1

Related Questions