Sanjeet Kumar
Sanjeet Kumar

Reputation: 37

Binary image classification TypeError: Invalid keyword argument(s) in `compile()`

model.compile(
optimizer= keras.optimizers.Adam(), 
loss= [keras.losses.SparseCategoricalCrossentropy(from_logits= True)
      ], 
metrices= ['accuracy'])

model.fit(ds_train, epochs= 10, verbose=2)

TypeError: Invalid keyword argument(s) in compile(): ({'metrices'},). Valid keyword arguments include "cloning", "experimental_run_tf_function", "distribute", "target_tensors", or "sample_weight_mode".

Upvotes: 0

Views: 9033

Answers (1)

Light
Light

Reputation: 177

check your spelling.. its "metrics" ..

model.compile(
optimizer= keras.optimizers.Adam(), 
loss= keras.losses.SparseCategoricalCrossentropy(from_logits= True), 
metrics= ['accuracy'])

model.fit(ds_train, epochs= 10, verbose=2)

Upvotes: 6

Related Questions