摘要: import matplotlib # matplotlib.use('TkAgg') matplotlib.use('agg') 阅读全文
posted @ 2023-12-11 17:35 山…隹 阅读(3) 评论(0) 推荐(0) 编辑
摘要: import tqdm 阅读全文
posted @ 2023-12-04 15:47 山…隹 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import einops # 创建一个形状为(batch_size, seq_length, hidden_dim)的张量 tensor = tf.constant([[[1, 2, 3, 4], [5, 6, 7, 8]], [[9, 10, 11, 12], [13, 14, 15, 16]] 阅读全文
posted @ 2023-11-10 15:50 山…隹 阅读(17) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf tf.config.experimental_run_functions_eagerly(True) 然后就可以训练时在模型内部打断点,调试内部结构了 阅读全文
posted @ 2023-07-19 21:24 山…隹 阅读(17) 评论(0) 推荐(0) 编辑
摘要: ai# 子图间距plt.tight_layout(rect=[0, 0.2, 1, 0.9]) # 自适应图是否重叠,参数是坐标,是子图的覆盖区域,从左0到右1,从下0到上0.9 plt.subplots_adjust(left=None, bottom=None, right=None, top= 阅读全文
posted @ 2023-01-24 23:43 山…隹 阅读(241) 评论(0) 推荐(0) 编辑
摘要: # 模型加载 MS16_path = './MS_Unet16_split-1_warm(10)_lr(0.01)_Base/fold_4/last_model/Modelsave' MS16_bor_path = './MS16_bor1_split-1_warm(10)_lr(0.01)_Bas 阅读全文
posted @ 2022-12-22 13:42 山…隹 阅读(25) 评论(0) 推荐(0) 编辑
摘要: import numpy as np import matplotlib.pyplot as plt from pynverse import inversefunc def my_tah(x): sigma = -0.1 # base_tah = np.tanh(x) # base_tah = ( 阅读全文
posted @ 2022-11-18 19:56 山…隹 阅读(134) 评论(0) 推荐(0) 编辑
摘要: import numpy as np import matplotlib.pyplot as plt import random import math x_size = 100000 X = np.linspace(-1,1,x_size) Y1 = +np.sqrt(1-np.square(X) 阅读全文
posted @ 2022-09-02 16:19 山…隹 阅读(159) 评论(0) 推荐(0) 编辑
摘要: class WarmUpCos(keras.callbacks.Callback): def __init__(self, lr_max,lr_min, warm_step,sum_step,bat): super(WarmUpCos, self).__init__() self.lr_max = 阅读全文
posted @ 2022-07-20 00:55 山…隹 阅读(147) 评论(0) 推荐(0) 编辑
摘要: class WarmUpLineDecayScheduler(keras.callbacks.Callback): def __init__(self, lr_max,lr_min, warm_step,sum_step,bat): super(WarmUpLineDecayScheduler, s 阅读全文
posted @ 2022-07-14 19:34 山…隹 阅读(467) 评论(0) 推荐(0) 编辑