import tensorflow as tf

print(sess.run(tf.floordiv(13, 4)))
print(sess.run(tf.mod(13.2, 4)))

print(sess.run(tf.cross([1, 0, 0], [0, 1, 0])))
print(sess.run(tf.square([1, 2, 3])))


def custom_polynomial(local_tf, value):
    return local_tf.subtract(3 * local_tf.square(value), value) + 10


print((sess.run(custom_polynomial(tf, 11))))

alpha = 0.1
val = tf.constant([[2, 3], [1, 4]], dtype=tf.float32)
l1 = tf.contrib.layers.l1_regularizer(alpha)(val)
l2 = tf.contrib.layers.l2_regularizer(alpha)(val)

A = [[0.8, 0.6, 0.3], [0.1, 0.6, 0.4]]
B = [1, 1]
top_k = tf.nn.top_k(A, 2)
in_top_k = tf.nn.in_top_k(A, B, 1)

sess.run(tf.global_variables_initializer())

print(f'\nl1={sess.run(l1)} l2={sess.run(l2)}')

a = np.array([1, 2, 3], dtype=np.float32)
