I am running VGG16 network for image classification on svhn database. I am saving images into shape (None,64,64,3) and labels of shape (None,10).Labels are 1d array of size 10.
Below is the part of my code.
import pandas as pd import numpy as np import cv2 import tensorflow as tf import os import scipy from skimage import data, io, filters import scipy.io as sio from utils import * import h5py vgg = tf.keras.applications.vgg16.VGG16 (include_top=False, weights='imagenet', input_tensor=None, input_shape=(64,64,3), pooling='avg', classes=10) vgg.compile(loss='categorical_crossentropy', optimizer='sgd', metrics=['accuracy']) vgg.fit(train_data, labels_data, epochs=5, batch_size=32)
and so I get error:
ValueError: Error when checking target: expected block5_pool to have shape (None, 512) but got array with shape (None, 10)
What changes should I do?