摘要:
https://github.com/pytorch/hub 代码 https://pytorch.org/hub/ 解释 阅读全文
摘要:
import matplotlib # matplotlib.use('TkAgg') matplotlib.use('agg') 阅读全文
摘要:
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]] 阅读全文
摘要:
import tensorflow as tf tf.config.experimental_run_functions_eagerly(True) 然后就可以训练时在模型内部打断点,调试内部结构了 阅读全文
摘要:
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= 阅读全文
摘要:
# 模型加载 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 阅读全文
摘要:
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 = ( 阅读全文
摘要:
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) 阅读全文
摘要:
class WarmUpCos(keras.callbacks.Callback): def __init__(self, lr_max,lr_min, warm_step,sum_step,bat): super(WarmUpCos, self).__init__() self.lr_max = 阅读全文