class MyModel(TFModel):
An example of a tf model class
def _build(self, *args, **kwargs):
images_shape = self.get_from_config("images_shape", (12, 12, 1))
num_classes = self.get_from_config("num_classes", 3)
x = tf.placeholder("float", [None] + list(images_shape), name="x")
y = tf.placeholder("int32",[None], name="y")
y_oe = tf.one_hot(y, num_classes, name="targets")
c = conv2d_block(x, 32, 3, conv=dict(kernel_initializer=tf.contrib.layers.xavier_initializer()), max_pooling=dict(strides=4))
f = flatten(c)
f = tf.layers.dense(f, num_classes)
y_ = tf.identity(f, name="predictions")
// Define a cost function
//tf.losses.add_loss(tf.losses.softmax_cross_entropy(y_oe, y_))