import tensorflow as tf

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)
tf_v = tf.Variable(5, dtype=tf.float32)

sess.run(tf.global_variables_initializer())

print(f'a * tf_v = {sess.run(a * tf_v)}')

weights = tf.constant([[1.0, -2], [-3, 4]]);
regular_l1 = tf.contrib.layers.l1_regularizer(0.5)(weights)
regular_l2 = tf.contrib.layers.l2_regularizer(0.5)(weights)
print(f'\nregular_l1={sess.run(regular_l1)} regular_l2={sess.run(regular_l2)}')

val_val = sess.run(val)
print('\nval=' + str(val_val))
print(f'\nargmax_0={val_val.argmax(0)} argmax_1={val_val.argmax(1)}')
print('\ntf.argmax(val, 0)=' + str(sess.run(tf.argmax(val, 0))))
print('tf.argmax(val, 1)=' + str(sess.run(tf.argmax(val, 1))))

