PyTorch Release Notes0 through v1.2.1 exposes a Regular Expression Denial of Service (ReDOS) vulnerability. ‣ Known security vulnerabilities: ‣ CVE-2022-32212, CVE-2022-43548, CVE-2023-0286, CVE-2022-32223, CVE-2023-0286 0 through v1.2.1 exposes a Regular Expression Denial of Service (ReDOS) vulnerability. ‣ Known security vulnerabilities: ‣ CVE-2022-25882 for ONNX<1.13.0 PyTorch RN-08516-001_v23.07 | 61 Chapter Tacotron2 inference performance regression of up to 15% for workloads using dynamic input shapes. Security CVEs ‣ CVE-2022-45198 - Pillow before 9.2.0 performs Improper Handling of Highly Compressed GIF0 码力 | 365 页 | 2.94 MB | 1 年前3
动手学深度学习 v2.0-----------------------------------------------------+ 在PyTorch中,每个数组都有一个设备(device),我们通常将其称为环境(context)。默认情况下,所有 变量和相关的计算都分配给CPU。有时环境可能是GPU。当我们跨多个服务器部署作业时,事情会变得更加 棘手。通过智能地将数组分配给环境,我们可以最大限度地减少在设备之间传输数据的时间。例如,当在带 permute(1, 0, 2) # 广播context,使其具有与X相同的num_steps context = state[-1].repeat(X.shape[0], 1, 1) X_and_context = torch.cat((X, context), 2) output, state = self.rnn(X_and_context, state) output = self unsqueeze(hidden_state[-1], dim=1) # context的形状为(batch_size,1,num_hiddens) context = self.attention( query, enc_outputs, enc_outputs, enc_valid_lens) # 在特征维度上连结 x = torch.cat((context, torch.unsqueeze(x, dim=1))0 码力 | 797 页 | 29.45 MB | 1 年前3
《Efficient Deep Learning Book》[EDL] Chapter 4 - Efficient Architecturescan train the model is to predict a hidden word in a sentence, given the words surrounding it (the context). This is known as the Continuous Bag of Words (CBOW) task, where the model learns to predict a masked based on the surrounding words (context). Mathematically, we want to find a word , which maximizes the conditional probability , where the size of the sliding window of context is ( words on each side of dataset is preprocessed (lowercase, strip punctuation, normalization etc.) to create pairs of input context (neighboring words), and the label (masked word to be predicted). The word tokens are vectorized0 码力 | 53 页 | 3.92 MB | 1 年前3
AI大模型千问 qwen 中文文档the embedding model or modify the context window size or text chunk size depending on your computing resources. Qwen 1.5 model families support a maximum of 32K context window size. import torch from llama_index llm = HuggingFaceLLM( model_name="Qwen/Qwen1.5-7B-Chat", tokenizer_name="Qwen/Qwen1.5-7B-Chat", context_window=30000, max_new_tokens=2000, generate_kwargs={"temperature": 0.7, "top_k": 50, "top_p": 0.95} load_index_from_storage # save index storage_context = StorageContext.from_defaults(persist_dir="save") # load index index = load_index_from_storage(storage_context) 1.15.4 检索增强(RAG) 现在您可以输入查询,Qwen1.5 将基于索引文档的内容提供答案。0 码力 | 56 页 | 835.78 KB | 1 年前3
机器学习课程-温州大学-12深度学习-自然语言处理和词嵌入型的文本。在这一步中, 我们确定词汇量的大小(我们称之为vocab_size,比如说,将其视为10,000)以及 哪些词属于它。在训练阶段的开始,我们创建两个矩阵 - Embedding矩阵和Context 矩阵。这两个矩阵在我们的词汇表中嵌入了每个单词(这vocab_size是他们的维度 之一)。第二个维度是我们希望每次嵌入的时间长度(embedding_size- 300是一个 常见值)。 现在我们有四个单词:输入单词not和输出/上下文单词:( thou实际邻 居),aaron,和taco(负样本)。我们继续查找它们的嵌入 - 对于输 入词,我们查看Embedding矩阵。对于上下文单词,我们查看Context矩 阵(即使两个矩阵都在我们的词汇表中嵌入了每个单词)。 23 3.Word2Vec 训练流程 现在我们需要一种方法将这些分数转化为看起来像概率的东西 : 使用sigmoid函数把概率转换为0和1。 ,`thou`,`aaron`和`taco`)。我们现在进行下一步(下一个正样本及 其相关的负样本),并再次执行相同的过程。 当我们循环遍历整个数据集多次时,嵌入继续得到改进。然后我们可以停 止训练过程,丢弃`Context`矩阵,并使用`Embeddings`矩阵作为下一个任务 的预训练嵌入。 27 4.GloVe 03 Word2Vec 04 GloVe 02 词嵌入 050 码力 | 44 页 | 2.36 MB | 1 年前3
《Efficient Deep Learning Book》[EDL] Chapter 6 - Advanced Learning Techniques - Technical Review48550/arXiv.1803.07728. 2 Doersch, Carl, et al. "Unsupervised Visual Representation Learning by Context Prediction." arXiv, 19 May. 2015, doi:10.48550/arXiv.1505.05192. Figure 6-4 (a): Detecting relative research papers, since they can help improve your baseline models even if they were presented in the context of different model architectures and hyperparameters. For example, the paper titled: ResNet Strikes Subclass Distillation It can also be useful to revisit some of the other learning techniques in the context of the problem at hand. For instance, in chapter 3, we found that distillation was a very handy technique0 码力 | 31 页 | 4.03 MB | 1 年前3
华为云深度学习在文本分类中的实践-李明磊tokenizer word2vec Elmo pb ckpt H5 (Keras) RESTful API RPC API Function test Concurrence test Security test Multi class Multi label preprocessor Traditional --->simple Char replacement Synonym0 码力 | 23 页 | 1.80 MB | 1 年前3
keras tutorialANN doesn’t remember the steps from previous situations and learned to make decisions based on context in training. Meanwhile, RNN stores the past information and all its decisions are taken from what we have confusion in one input then we need to check again other inputs to recognize the correct context which takes the decision from the past. Workflow of ANN Let us first understand the different reading the word in the given order and trying to understand each word and its meaning in the given context and finally understanding the sentence in a positive or negative sentiment. Here, the words are0 码力 | 98 页 | 1.57 MB | 1 年前3
深度学习与PyTorch入门实战 - 47. RNN原理?3 ?@?4 + ?4 ?@?5 + ?5 Flaws ▪ Long sentence ▪ 100+ words ▪ too much parametes [w, b] ▪ no context information ▪ consistent tensor Naïve version I hate this boring movie ?@?1 + ?1 Pos/Neg ?@0 码力 | 12 页 | 705.66 KB | 1 年前3
《TensorFlow 2项目进阶实战》4-商品检测篇:使用RetinaNet瞄准你的货架商品ILSVRC • The PASCAL Visual Object Classes (VOC) Challenge Pascal VOC • Microsoft Common Objects in Context MS-COCO PASCAL VOC 数据集 4个大类:person, animal, vehicle, household 20个小类: • person • bird, cat,0 码力 | 67 页 | 21.59 MB | 1 年前3
共 14 条
- 1
- 2













