动手学深度学习 v2.03,其中系数2是切线的斜率。 x = np.arange(0, 3, 0.1) plot(x, [f(x), 2 * x - 3], 'x', 'f(x)', legend=['f(x)', 'Tangent line (x=1)']) 2.4. 微积分 67 2.4.2 偏导数 到目前为止,我们只讨论了仅含一个变量的函数的微分。在深度学习中,函数通常依赖于许多变量。因此,我 们需要将微分的思想推广到多元函数(multivariate 成32位浮点数格式, # 并除以255使得所有像素的数值均在0~1之间 trans = transforms.ToTensor() mnist_train = torchvision.datasets.FashionMNIST( root="../data", train=True, transform=trans, download=True) mnist_test = torchvision torchvision.datasets.FashionMNIST( root="../data", train=False, transform=trans, download=True) 53 https://discuss.d2l.ai/t/1785 3.5. 图像分类数据集 111 Fashion‐MNIST由10个类别的图像组成,每个类别由训练数据集(train dataset)中的6000张图像和测试数据0 码力 | 797 页 | 29.45 MB | 1 年前3
机器学习课程-温州大学-06机器学习-KNN算法北京: 清华大学出版社,2016. [4] Cover T M , Hart P E . Nearest neighbor pattern classification[J]. IEEE Trans.inf.theory, 1953, 13(1):21-27. [5] Hastie T., Tibshirani R., Friedman J. The Elements of Statistical0 码力 | 26 页 | 1.60 MB | 1 年前3
【PyTorch深度学习-龙龙老师】-测试版2021120.0)) # 绘制权值矩阵范围 surf = ax.plot_surface(X, Y, weights, cmap=plt.get_cmap('rainbow'), line width=0) # 设置坐标轴名 ax.set_xlabel('网格 x 坐标', fontsize=16, rotation = 0) ax.set_ylabel('网格 step(action) # 构建样本并存储 trans = Transition(state, action, action_prob, reward, next_stat e) agent.store_transition(trans) state = next_state # 刷新状态 learning,” Machine Learning, 卷 8, pp. 229-256, 01 5 1992. [5] G. A. Rummery 和 M. Niranjan, “On-Line Q-Learning Using Connectionist Systems,” 1994. [6] H. Hasselt, A. Guez 和 D. Silver, “Deep Reinforcement0 码力 | 439 页 | 29.91 MB | 1 年前3
keras tutorialWhere, Line 1 imports Sequential model from Keras models Line 2 imports Dense layer and Activation module Line 4 create a new sequential model using Sequential API Line 5 adds a dense Line 1 imports Sequential model from Keras models Line 2 imports Dense layer, Dropout layer and Activation module Line 4 create a new sequential model using Sequential API Line 5 adds function. Line 6 adds a dropout layer (Dropout API) to handle over-fitting. Line 7 adds another dense layer (Dense API) with relu activation (using Activation module) function. Line 8 adds another0 码力 | 98 页 | 1.57 MB | 1 年前3
PyTorch Release Notesone of the following commands: ‣ --ipc=host ‣ --shm-size=in the command line to docker run --gpus all To pull data and model descriptions from locations outside the container TensorRT integration for PyTorch and brings the capabilities of TensorRT directly to Torch in one line Python and C++ APIs. ‣ Starting with the 22.05 release, the PyTorch container is available for the TensorRT integration for PyTorch and brings the capabilities of TensorRT directly to Torch in one line Python and C++ APIs. ‣ Starting with the 22.05 release, the PyTorch container is available for the 0 码力 | 365 页 | 2.94 MB | 1 年前3
Lecture Notes on Gaussian Discriminant Analysis, NaiveExpectation-Maximization (EM) algorithm. 6.1 Convex Sets and Convex Functions A set C is convex if the line segment between any two points in C lies in C, i.e., for ∀x1, x2 ∈ C and ∀θ with 0 ≤ θ ≤ 1, we have we have the inequality in the fifth line. The sixth equality also comes from Eq. (31) 13 To tighten the lower bound, we should let the equality (in the forth line) hold. According to Jensen’s inequality in particular holds for Qi = Q[t] i , according to Eq. (32). We have the inequality in the second line, because θ[t+1] is calculated by θ[t+1] = arg max θ � i � z(i)∈Ω Q[t] i (z(i)) log p(x(i), z(i);0 码力 | 19 页 | 238.80 KB | 1 年前3
如何利用深度学习提高高精地图生产的自动化率-邹亮�������������� ���� ���� ������(Lane line Detection) �� ���)�)�(� ����&���&��,���,� ������� �������� �� ���&�&��&� �&��,��� ����&����&��,���,� ������(Lane line Detection) g�R������f A��������) S�e�����)��������)��� Oc��������(����������������������)��������������� �����U���a�S�PeF ������(Lane line Detection)��� �������� (Sign Detection, Traffic Light Detection) �� ���������� �������� (Sign Detection0 码力 | 34 页 | 56.04 MB | 1 年前3
Lecture Notes on Support Vector Machinegi(ω∗) = 0 for ∀i = 1, 2, · · · , k. Another observation is that, since the inequality in the third line holds with equality, ω∗ actually minimizes L(ω, α∗, β ∗) over ω. 2.2.3 Karush-Kuhn-Tucker (KKT) Conditions following, we take α1 and α2 for example to explain the optimization process of the SMO algorithm (i.e., Line 4 in Algorithm 1). By treating α1 and α2 as variables while the others as known quantities, the objective ?! + ?! (b) y(1)y(2) = 1 Figure 7: α+ 1 and α+ 2 . which confines the optimization to be on a line. Since 0 ≤ α1, α2 ≤ C, we can derive a lower bound L and an upper bound H for them. As shown in Fig0 码力 | 18 页 | 509.37 KB | 1 年前3
AI大模型千问 qwen 中文文档rank0_print("Loading data...") train_data = [] with open(data_args.data_path, "r") as f: for line in f: train_data.append(json.loads(line)) train_dataset = dataset_cls(train_data, tokenizer=tokenizer, max_len=max_len) eval_data_path: eval_data = [] with open(data_args.eval_data_path, "r") as f: for line in f: eval_data.append(json.loads(line)) eval_dataset = dataset_cls(eval_data, tokenizer=tokenizer, max_len=max_len)0 码力 | 56 页 | 835.78 KB | 1 年前3
Keras: 基于 Python 的深度学习库ile(path): while 1: f = open(path) for line in f: # create Numpy arrays of input data # and labels, from each line in the file x, y = process_line(line) yield (x, y) 模型 47 f.close() model.fi generate_arrays_from_file(path): while 1: f = open(path) for line in f: # 从文件中的每一行生成输入数据和标签的 numpy 数组, x1, x2, y = process_line(line) yield ({'input_1': x1, 'input_2': x2}, {'output': y}) f.close() 20.7 print_summary keras.utils.print_summary(model, line_length=None, positions=None, print_fn=None) 打印模型概况。 参数 • model: Keras 模型实例。 • line_length: 打印的每行的总长度 (例如,设置此项以使其显示适应不同的终端窗口大小)。 • positions:0 码力 | 257 页 | 1.19 MB | 1 年前3
共 19 条
- 1
- 2













