Train classifier images (21,28,3) dont classify well

I modified this workflow with 3 kinds of images of shape(21,28,3). The execution is OK but when I test images not work well because the result is always tha same. This is my code to Dl Python network creator. Something wrong???:

variable name of the output network: output_network

import tensorflow as tf
from TFModel import TFModel

input_shape = (None, 21, 28, 3)
num_classes = 3

Create a graph

graph = tf.Graph()

Set the graph as default -> Create every tensor in this graph

with graph.as_default():

# Create an input tensor
x = tf.placeholder(tf.float32, shape=input_shape, name='input')

# Define the graph
# Convolutional Layer #1
conv1 = tf.layers.conv2d(inputs=x, filters=32, kernel_size=[5, 5],
						 padding="same", activation=tf.nn.relu)

# Pooling Layer #1
pool1 = tf.layers.max_pooling2d(inputs=conv1, pool_size=[2, 2], strides=2)

	
# Convolutional Layer #2 and Pooling Layer #2
conv2 = tf.layers.conv2d(inputs=pool1, filters=64, kernel_size=[5, 5],
						 padding="same", activation=tf.nn.relu)
pool2 = tf.layers.max_pooling2d(inputs=conv2, pool_size=[2, 2], strides=2)

	
# Convolutional Layer #2 and Pooling Layer #2
conv3 = tf.layers.conv2d(inputs=pool2, filters=128, kernel_size=[5, 5],
						 padding="same", activation=tf.nn.relu)
pool3 = tf.layers.max_pooling2d(inputs=conv3, pool_size=[2, 2], strides=2)

# Dense Layer
pool2_flat = tf.reshape(pool3, [-1, 768])
dense = tf.layers.dense(inputs=pool2_flat, units=512, activation=tf.nn.relu)

# Create an output tensor
y = tf.layers.dense(dense, num_classes, activation=tf.nn.softmax, name='output')

Create the output network

output_network = TFModel(inputs={‘input’: x}, outputs={‘output’: y}, graph=graph)

Duplicate: CNN Training Question