hello guys i'm new to tensorflow nd i'm workin on capsule network this how my dataset looks like :
-train
|-class1
|-class2
|-class3
I'm using ImageDataGenerator flow_from_directory to generate labels from directories names :
train = ImageDataGenerator(rescale= 1/255)
trainData = train.flow_from_directory(dir_path , class_mode='categorical' , target_size=(80, 80), batch_size=batch_size )
this is the placeholder for labels :
y = tf.placeholder(shape=[None], dtype=tf.int64, name="y")
the tutorial that i'm following is workin on mnist dataset so he did this to feed training data to the model :
X_batch, y_batch = mnist.train.next_batch(batch_size)
i did this instead :
X_batch, y_batch = trainData.next()
it works well with images but not with labesl because i got this error :
Cannot feed value of shape (10, 3) for Tensor 'y:0', which has shape '(?,)'
y_batch.shape --> (10, 3) 10 is the batch_size and i guess 3 is the number of classes , i'am confused about this
Can anyone help please ?