1.norm:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'#过滤爆红的信息
import tensorflow as tf
#norm:求各个数字平方相加再开根
a = tf.ones([2,3])
print(tf.norm(a))
print(tf.sqrt(tf.reduce_sum(tf.square(a))))#先平方后相加再求根
b = tf.ones([2,4,28,5])
print(tf.norm(b))
print(tf.norm(a,ord=2,axis=1))#2还是平方相加后求根
print(tf.