<jupyter_start><jupyter_text>https://blog.csdn.net/liuxiao214/article/details/81037416<jupyter_code>import os 
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
import tensorflow as tf
import numpy as np


from tensorflow.keras.layers import LeakyReLU, ReLU, LayerNormalization,BatchNormalization

tf.keras.backend.set_floatx('float64')
a = np.arange(1, 10)
x = np.ones((9,9))
for i in range(9):
    x[i] = a
x = x.astype('float64')
print(x)
x = x.reshape(1, 9, 9)
res = BatchNormalization(axis=2)(x).numpy()
res
res = LayerNormalization(axis=2)(x).numpy()
res
res<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15358361774744028, 'fraction_numerical': 0.04607508532423208, 'mean_word_length': 6.246913580246914, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '101580', 'license': 'MIT', 'n_tokens_mistral': 259, 'n_tokens_neox': 240, 'n_words': 44, 'path': 'BatchNormal.ipynb', 'repo_name': 'beidongjiedeguang/my-deep-learning', 'size': '586'}