PyTorch Release Notes
support. Functions are executed immediately instead of enqueued in a static graph, improving ease of use and provides a sophisticated debugging experience. In the container, see /workspace/README.md for container from the NGC container registry: ‣ Install Docker. ‣ For NVIDIA DGX™ users, see Preparing to use NVIDIA Containers Getting Started Guide. ‣ For non-DGX users, see NVIDIA ® GPU Cloud ™ (NGC) container run -it --rm -v local_dir:container_dir nvcr.io/nvidia/ pytorch:-py3 Note: If you use multiprocessing for multi-threaded data loaders, the default shared memory segment size with which 0 码力 | 365 页 | 2.94 MB | 1 年前3keras tutorial
libraries such as Theano, TensorFlow, Caffe, Mxnet etc., Keras is one of the most powerful and easy to use python library, which is built on top of popular deep learning libraries like TensorFlow, Theano, avoid breaking the packages installed in the other environments. So, it is always recommended to use a virtual environment while developing Python applications. Linux/Mac OS Linux or mac OS users installation location. Windows 2. Keras ― Installation Keras 4 Windows user can use the below command, py -m venv keras Step 2: Activate the environment This step will configure0 码力 | 98 页 | 1.57 MB | 1 年前3AI大模型千问 qwen 中文文档
of natural language understanding, text generation, vision understanding, audio understanding, tool use, role play, playing as AI agent, etc. 最新版本 Qwen1.5 有以下特点: • 6 种模型规模,包括 0.5B、1.8B、4B、7B、14B 和 72B; from_pretrained("Qwen/Qwen1.5-7B-Chat") # Instead of using model.chat(), we directly use model.generate() # But you need to use tokenizer.apply_chat_template() to format your inputs as shown␣ �→below prompt model_inputs = tokenizer([text], return_tensors="pt").to(device) # Directly use generate() and tokenizer.decode() to get the output. # Use `max_new_tokens` to control the maximum output length. generated_ids0 码力 | 56 页 | 835.78 KB | 1 年前3《Efficient Deep Learning Book》[EDL] Chapter 3 - Learning Techniques
improve your model footprint. However, given that they lead to an improvement in quality metrics, we can use them to boost the performance of models that might have not been suitable earlier because of a lower a probability of 30% and a ‘hamster’ with a probability of 70%. The sample generation techniques use models to generate samples for labels. Consider a training sample for English to Spanish translation: human face dataset would be less likely to have, for example, inverted faces. It wouldn’t be much use spending time and resources to train a model that recognizes faces in any orientation if it is going0 码力 | 56 页 | 18.93 MB | 1 年前3《Efficient Deep Learning Book》[EDL] Chapter 4 - Efficient Architectures
attention mechanism and the hashing trick. In this chapter, we will deepdive into their architectures and use them to transform large and complex models into smaller and efficient models capable of running on features an embedding, where the two features are its dimensions. We will shortly explain how we can use these embeddings. Animal Embedding (cute, dangerous) dog (0.85, 0.05) cat (0.95, 0.05) snake (0 have multiple classes / a large number of examples / more than two features? In those cases, we could use classical machine learning algorithms like the Support Vector Machine4 (SVM) to learn classifiers that0 码力 | 53 页 | 3.92 MB | 1 年前3Keras: 基于 Python 的深度学习库
AttributeError: Layer lstm_1 has multiple inbound nodes, hence the notion of "layer output" is ill-defined. Use `get_output_at(node_index)` instead. 好吧,通过下面的方法可以解决: assert lstm.get_output_at(0) == encoded_a assert SimpleMLP(keras.Model): def __init__(self, use_bn=False, use_dp=False, num_classes=10): super(SimpleMLP, self).__init__(name='mlp') self.use_bn = use_bn self.use_dp = use_dp self.num_classes = num_classes activation='softmax') if self.use_dp: self.dp = keras.layers.Dropout(0.5) if self.use_bn: self.bn = keras.layers.BatchNormalization(axis=-1) def call(self, inputs): x = self.dense1(inputs) if self.use_dp: x = self0 码力 | 257 页 | 1.19 MB | 1 年前3《Efficient Deep Learning Book》[EDL] Chapter 2 - Compression Techniques
tirelessly towards storing and transmitting information in as few bits as possible. Depending on the use case, we might be interested in compressing in a lossless or lossy manner. We can fit 10 apples in Hence, it is important to ensure that we evaluate these techniques using the metrics relevant to our use case. In some cases, these techniques can help reduce complexity and improve generalization. Let us transmit a collection (vector) of these variables over an expensive communication channel. Can we use quantization to reduce transmission size and thus save some costs? What if it did not matter to us0 码力 | 33 页 | 1.96 MB | 1 年前3PyTorch Brand Guidelines
Learn more at PyTorch.org Please only use the PyTorch name and marks when accurately referencing the PyTorch Foundation or its software projects While our system encourages a flexible use of elements, it’s important to present the symbol in its entirety maintaining legibility and clarity. We use the circular dot as a measurement reference things simple, ensuring there is a strong contrast between the symbol and the background. Don’t use colors that aren’t in the approved color palette or or those that will create a vibration between0 码力 | 12 页 | 34.16 MB | 1 年前3《Efficient Deep Learning Book》[EDL] Chapter 6 - Advanced Learning Techniques - Technical Review
change the output), then we can simply add a few additional layers (known as the prediction head), use the appropriate loss function, and train the model with the labeled data for the task at hand. We can general model our hope is that we can use these limited number of labeled examples for fine-tuning since the model already knows the general concepts about language, and use the same model across many tasks itself, there is no need for any sort of human intervention for labeling. Therefore, we can simply use e-books, Wikipedia and other sources for NLU related models, and web images & videos for computer vision0 码力 | 31 页 | 4.03 MB | 1 年前3《Efficient Deep Learning Book》[EDL] Chapter 5 - Advanced Compression Techniques
Exercise: Sparsity improves compression Let's import the required libraries to start with. We will use the gzip python module for demonstrating compression. The code for this exercise is available as a However, we could use variable pruning rates across the pruning rounds. The motivation behind using variable sparsity is that a pre-trained model’s weights will get disrupted if we use a large pruning rate sparsity of 80% in the last round. The pruning rates for each round can be fixed initially or we can use an algorithm such as polynomial decay which computes the rates for each step based on the initial sparsity0 码力 | 34 页 | 3.18 MB | 1 年前3
共 33 条
- 1
- 2
- 3
- 4