深度学习与PyTorch入门实战 - 08. 索引与切片索引与切片 主讲人:龙良曲 Indexing ▪ dim 0 first select first/last N select by steps select by specific index … select by mask ▪ .masked_select() select by flatten index 下一课时 Tensor变换 Thank You.0 码力 | 10 页 | 883.44 KB | 1 年前3
PyTorch Release Notesthat the pull successfully completes before you proceed to step 3. 3. To run the container image, select one of the following modes: ‣ Interactive ‣ If you have Docker 19.03 or later, a typical command precision training by adding only three lines of Python to an existing FP32 (default) script. AMP will select an optimal set of operations to cast to FP16. FP16 operations require 2X reduced memory bandwidth precision training by adding only three lines of Python to an existing FP32 (default) script. AMP will select an optimal set of operations to cast to FP16. FP16 operations require 2X reduced memory bandwidth0 码力 | 365 页 | 2.94 MB | 1 年前3
【PyTorch深度学习-龙龙老师】-测试版2021127, 7]) 5.6 高级操作 上述介绍的操作函数大部分是常有并且容易理解的,接下来将介绍部分常用,但是稍 复杂的功能函数。 5.6.1 索引采样 torch.index_select()函数可以实现根据索引号收集数据的目的。考虑班级成绩册的例 子,假设共有 4 个班级,每个班级 35 个学生,8 门科目,则保存成绩册的张量 shape 为 [4,35,8]。随机创建张量如下: 1~2 个班级的成绩册,可以给定需要收集班级的索引号:[0,1],并指定班 级的维度 dim=0,通过 torch.index_select()函数收集数据,代码如下: In [38]: # 选择班级维度的 0,1 号班级 out = torch.index_select(x, dim=0, index=torch.tensor([0,1])) out.shape Out[38]: 1、4、9、12、13、27 号同学的成绩数据,则切 片方式实现起来非常麻烦,而 torch.index_select 则是针对于此需求设计的,使用起来更加 方便,实现如下: In [39]: # 收集第 1,4,9,12,13,27 号同学成绩 out = torch.index_select(x, dim=1, index=torch.tensor([0,3,8,11,12,26]))0 码力 | 439 页 | 29.91 MB | 1 年前3
《Efficient Deep Learning Book》[EDL] Chapter 5 - Advanced Compression Techniquesnumber of weights, say 60%, we risk the removal of key weights. Hence, a more measured approach to select removal candidates is required. If we assign saliency scores to the model weights based on a certain algorithm is as follows: Algorithm: Clustering a given set of elements in a tensor . 1. Initialization: Select an initial set of centroids. 2. Assignment step: Assign each element in to the closest centroid data points. Another scheme is to select centroids that are linearly spaced amongst these data-points. Yet another scheme is to incrementally and probabilistically select centroids from points based on the0 码力 | 34 页 | 3.18 MB | 1 年前3
阿里云上深度学习建模实践-程孟力EasyRec AutoFeature 特征组合 • Count select count(1) group by col • GroupByThenMax/Min/Avg/Sum select max(col2) group by col1 • CrossCount[2] select count (1) group by col1,col2 特征组合 +0 码力 | 40 页 | 8.51 MB | 1 年前3
Experiment 1: Linear Regressionspaced vector (linspace) and logarithmically spaced vector (logspace). Try both in this exercises and select the better one to improve the illustration. 5 Multivariate Linear Regression We now look at a more : , 3 ) − mu( 3 ) ) . / sigma ( 3 ) ; 5.1 Selecting A Learning Rate Using J(θ) Now it’s time to select a learning rate α. The goal of this part is to pick a good learning rate in the range of 0.001 ≤0 码力 | 7 页 | 428.11 KB | 1 年前3
keras tutorialand acquire a good understanding of the data. The better understanding of the data is required to select the correct ANN algorithm. Choose an algorithm (model) Keras 15 Choose an layers in ANN can be represented by Keras Layer in Keras. Prepare data: Process, filter and select only the required information from the data. Split data: Split the data into training and keras.applications.resnet50 import ResNet50 >>> from keras.applications import resnet50 Step2: Select an input Let us choose an input image, Lotus as specified below: >>> filename = 'banana.jpg'0 码力 | 98 页 | 1.57 MB | 1 年前3
深度学习与PyTorch入门实战 - 35. Early-stopping-DropoutDropout ▪ Stochastic Gradient Descent Early Stopping ▪ Regularization How-To ▪ Validation set to select parameters ▪ Monitor validation performance ▪ Stop at the highest val perf. Dropout ▪ Learning0 码力 | 16 页 | 1.15 MB | 1 年前3
深度学习与PyTorch入门实战 - 54. AutoEncoder自编码器Auto-Encoders ▪ PCA, which finds the directions of maximal variance in high- dimensional data, select only those axes that have the largest variance. ▪ The linearity of PCA, however, places significant0 码力 | 29 页 | 3.49 MB | 1 年前3
Lecture 4: Regularization and Bayesian StatisticsSeptember 20, 2023 4 / 25 Addressing The Overfitting Problem Reduce the number of features Manually select which features to keep Use a model selection algorithm Regularization Keep all the features, but0 码力 | 25 页 | 185.30 KB | 1 年前3
共 15 条
- 1
- 2













