import torch.nn.functional as F
import torch
import numpy
import tensorflow as tf
a = numpy.random.randn(2,3).astype(numpy.float32)
tr_a = torch.from_numpy(a)
print('tr_a')
print(tr_a)
norm_tr_a = torch.nn.functional.normalize(tr_a, dim=0, p=2)
print(norm_tr_a)
tf_a = tf.convert_to_tensor(a)
print('tf_a')
print(tf_a)
norm_tf_a = tf.nn.l2_normalize(tf_a, axis=0, epsilon=1e-12)
print(norm_tf_a)