How to do it...

  1. Create an input placeholder variable:
x = tf$placeholder(tf$float32, shape=shape(NULL, img_size_flat), name='x')

The NULL value in the placeholder allows us to pass non-deterministic arrays size.

  1. Reshape the input placeholder x into a four-dimensional tensor:
x_image = tf$reshape(x, shape(-1L, img_size, img_size, num_channels))
  1. Create an output placeholder variable:
y_true = tf$placeholder(tf$float32, shape=shape(NULL, num_classes), name='y_true')
  1. Get the (true) classes of the output using argmax:
y_true_cls = tf$argmax(y_true, dimension=1L)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset