AttributeError: ‘Sequential’ object has no attribute ‘comple’

I'm trying to create a CNN with tensorflow, but whenenever I run my code it says the following error: "AttributeError: 'Sequential' object has no attribute 'comple'" I've searched all over the internet and while I've found similar errors, the solutions don't work for me. I'm using version 2.1.0 of tensorflow

My packages:

import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.datasets import cifar10
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.models import Model, Sequential, load_model
from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D
from tensorflow.keras.callbacks import TensorBoard
import pickle

The code:

model = tf.keras.Sequential()

model.add(Conv2D(64, (3, 3), input_shape=X.shape[1:]))  
model.add(Activation("relu"))  
model.add(MaxPooling2D(pool_size=(2, 2)))

model.add(Conv2D(64, (3, 3), input_shape=X.shape[1:]))
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2, 2)))

model.add(Flatten())  
model.add(Dense(64))  
model.add(Activation('relu'))
model.add(Dense(1))

model.add(Activation('sigmoid'))  
model.comple(loss='binary_crossentropy')

optimizer = 'adam'
metrics = ['accuracy']
model.fit(X, y, batch_size=32, epochs=3, validation_split=0.1, callbacks=[tensorboard])

any help is appreciated



Read more here: https://stackoverflow.com/questions/64597428/attributeerror-sequential-object-has-no-attribute-comple

Content Attribution

This content was originally published by Steeloise at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: