《Efficient Deep Learning Book》[EDL] Chapter 4 - Efficient Architecturesfrequency) from the given training corpus. We would learn embeddings of dimensions each (where we can also view 10 We are dealing with word tokens as an example here, hence you would see the mention of words and embedding (referred to as the extracted features, but essentially it is the same thing). Here is a document describing the use of TFHub models for this purpose. You only need to train a small classification0 码力 | 53 页 | 3.92 MB | 1 年前3
【PyTorch深度学习-龙龙老师】-测试版202112编码函数,depth 设置向量长度 out = torch.zeros(label.size(0), depth) idx = torch.LongTensor(label).view(-1, 1) out.scatter_(dim=1, index=idx, value=1) return out y = torch.tensor([0,1,2 # x: [b, 1, 28, 28], y: [512] # 打平操作:[b, 1, 28, 28] => [b, 784] x = x.view(x.size(0), 28*28) # 送入网络模型,=> [b, 10] out = model(x) # 标签进行 one-hot LecunYann, BottouLéon, BengioYoshua, & HaffnerPatrick. (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE, (页 2278-2324). PaszkeAdam, GrossSam, MassaFrancisco, LererAdam0 码力 | 439 页 | 29.91 MB | 1 年前3
AI大模型千问 qwen 中文文档the method of creating and quantizing GGUF files in quantization/llama.cpp. You can refer to that document for more information. 1.4.4 PPL 评测 llama.cpp 为我们提供了评估 GGUF 模型 PPL 性能的方法。为了实现这一点,你需要准备一个数据集,比如 "skypilot-nightly[aws,gcp]" 随后,您需要用如下命令确认是否能使用云: sky check For more information, check the official document and see if you have set up your cloud accounts correctly. Alternatively, you can also use the official �→automatically run code to download the picture ' + \ 'and select an image operation from the given document to process the image' # Add a custom tool named my_image_gen: @register_tool('my_image_gen') class0 码力 | 56 页 | 835.78 KB | 1 年前3
阿里云上深度学习建模实践-程孟力com/org/a-li-ling-jie 3. EasyRec: https://github.com/alibaba/EasyRec 4. 推荐解决方案: https://help.aliyun.com/document_detail/161927.html 5. EasyCV:https://github.com/alibaba/EasyCV 6. EasyNLP: https://github.com/alibaba/EasyNLP 8. DSW: https://help.aliyun.com/document_detail/194831.html 9. DLC: https://help.aliyun.com/document_detail/165124.html 10. EAS: https://help.aliyun.com/document_detail/110980.html 11. Blade: https://help aliyun.com/document_detail/205128.html 12. PaiFlow: https://help.aliyun.com/document_detail/438027.html 13. Alink: https://github.com/alibaba/Alink 14. Whale: https://help.aliyun.com/document_detail/4285270 码力 | 40 页 | 8.51 MB | 1 年前3
PyTorch Release Notesincluding tutorials, documentation, and examples, see: ‣ PyTorch website ‣ PyTorch project This document provides information about the key features, software enhancements and improvements, known issues with March 2017 updates Known Issues There are no known issues in this release. Notice This document is provided for information purposes only and shall not be regarded as a warranty of a certain functionality warranties, expressed or implied, as to the accuracy or completeness of the information contained in this document and assumes no responsibility for any errors contained herein. NVIDIA shall have no liability for0 码力 | 365 页 | 2.94 MB | 1 年前3
Lecture 1: OverviewMachine Learning Document Search Given counts of words in a document, determine what its topic is. Group documents by topic without a pre-specified list of topics. Many words in a document, many, many documents classification problem, we want to predict the class of an item. The type of tumor, the topic of a document, the semantics contained in an image, whether a customer will purchase a product. For a regression0 码力 | 57 页 | 2.41 MB | 1 年前3
PyTorch OpenVINO 开发实战系列教程第一篇reshape 函数之外,还有另外一个基于 tensor 的维度 转换方法 tensor.view(), 它的用法代码演示如下: x = torch.randn(4, 4) print(x.size()) x = x.view(-1, 8) print(x.size()) x = x.view(1, 1, 4, 4) print(x.size()) 运行结果如下: torch.Size([4 Size([2, 8]) torch.Size([1, 1, 4, 4]) 其中 torch.randn(4, 4) 是创建一个 4x4 的随机张量;x.view(-1, 8) 表示转换为每行八列的,-1 表示自动计算行数;x.view(1, 1, 4, 4) 表示转换为 1x1x4x4 的四维张量。其中 torch.size 表示 输出数组维度大小。 ● 其它属性操作 通道交换与寻找最大值是 print(x.size()) x = torch.tensor([2., 3., 4.,12., 3., 5., 8., 1.]) print(torch.argmax(x)) x = x.view(-1, 4) print(x.argmax(1)) 运行结果如下: torch.Size([5, 5, 3]) torch.Size([3, 5, 5]) tensor(3) tensor([30 码力 | 13 页 | 5.99 MB | 1 年前3
pytorch 入门笔记-03- 神经网络relu(self.conv1(x)), 2) x = F.max_pool2d(F.relu(self.conv2(x)), 2) # 改变数据的维度 x = x.view(-1, self.num_flat_features(x)) x = F.relu(self.fc1(x)) x = F.relu(self.fc2(x)) MSELoss是一个比较简单的损失函数,它计算输出和目标间的均方误差, 例如: output = net(input) target = torch.rand(10) target = target.view(1, -1) criterion = nn.MSELoss() loss = criterion(output, target) print(loss) tensor(0.4526, gra .grad_fn 属性,将看到如下所示的计算图。 input -> conv2d -> relu -> maxpool2d -> conv2d -> relu -> maxpool2d -> view -> linear -> relu -> linear -> relu -> linear -> MSELoss -> loss 所以,当我们调用 loss.backward() 时,整张计算图都会0 码力 | 7 页 | 370.53 KB | 1 年前3
机器学习课程-温州大学-03深度学习-PyTorch入门ndim x.dim() x.size x.nelement() 形状操作 x.reshape x.reshape(相当于 tensor.contiguous().view()); x.view x.flatten x.view(-1);nn Flatten() 类型转换 np.floor(x) torch.floor(x); x.floor() 比较 np.less x.lt np.less_equal/np0 码力 | 40 页 | 1.64 MB | 1 年前3
深度学习与PyTorch入门实战 - 09. 维度变换Tensor维度变换 主讲人:龙良曲 Operation ▪ View/reshape ▪ Squeeze/unsqueeze ▪ Transpose/t/permute ▪ Expand/repeat 2 View reshape ▪ Lost dim information 3 Flexible but prone to corrupt 4 Squeeze v.s. unsqueeze0 码力 | 16 页 | 1.66 MB | 1 年前3
共 22 条
- 1
- 2
- 3













