ValueError: Error when checking target: expected model_2 to have shape (None, 252, 252, 1) but got array with shape (300, 128, 128, 3)

hi I am building a image classifier for one-class classification in which i’ve used autoencoder while running this model I am getting this error by this line (autoencoder_model.fit) (ValueError: Error when checking target: expected model_2 to have shape (None, 252, 252, 1) but got array with shape (300, 128, 128, 3).)

Creating a list of dictionaries with same keys?

I wanted to create a list that contains x amount of dictionaries all containing the same keys but with different values that’s made in a for loop: Something like [{'name': Brenda, 'Age': 22, 'Sex': Female}, {'name': Jorda, 'Age': 32, 'Sex': Male}, {'name': Richard, 'Age': 54, 'Sex': Male}] My code is this: people = [] person … Read more