Functional Automatic Differentiation in MindSpore
Introduction to Functional Automatic Differentiation
Automatic differentiation is a core technique in neural network training that enables efficient computation of gradients for optimization. MindSpore implements a functional approach to automatic differentiation through its grad and value_and_grad interfaces, which provide mathematical semanti ...
Posted on Fri, 14 Aug 2026 16:50:33 +0000 by private_click
Comprehensive Guide to MMDetection Framework Installation and Usage
Introduction to MMDetection
MMDetection is an open-source object detection toolbox developed by SenseTime and The Chinese University of Hong Kong. Built on PyTorch, it implements a wide array of object detection algorithms, encapsulating dataset construction, model architecture, and training strategies into modular components. This modular desi ...
Posted on Thu, 13 Aug 2026 16:22:34 +0000 by Lauj
Understanding PyTorch nn.Embedding for Neural Network Text Processing
Embedding layers serve as fundamental components in neural network architectures that process textual data. These layers transform discrete tokens into continuous vector representations that machines can effectively process.
Concept of Token Embedding
Token embedding represents the transformation of symbolic text into numerical vectors. This co ...
Posted on Wed, 12 Aug 2026 16:02:45 +0000 by Daney11
Implementing Vision Transformers for Image Classification
Understanding Vision Transformers for Image Classification
The Vision Transformer (ViT) represents a groundbreaking approach that merges principles from natural language processing with computer vision. This architecture leverages self-attention mechanisms to achieve impressive results in image classification tasks without relying on traditiona ...
Posted on Thu, 06 Aug 2026 16:38:07 +0000 by jola
Two Approaches for Plotting Loss Curves in Caffe
Introduction
When training deep learning models with Caffe, visualizing the training progress through loss curves is essential for monitoring model convergence. This article presents two practical approaches for generating training visualizations.
Method 1: Custom Python Script for Headless Servers
The following implementation is specifically d ...
Posted on Fri, 31 Jul 2026 16:19:59 +0000 by goldilok
Common TensorFlow 2.x Migration Errors and Fixes
When migrating legacy TensorFlow 1.x code to TensorFlow 2.x, several common attribute errors may occur due to API changes. Below are typical issues and their solutions:
1. module 'tensorflow' has no attribute 'placeholder'
tf.placeholder was removed in TensorFlow 2.x. To retain 1.x behavior:
import tensorflow.compat.v1 as tf
tf.disable_v2_behav ...
Posted on Thu, 30 Jul 2026 16:47:00 +0000 by laurus
PyTorch GPU CUDA Usage and Common Error Solutions
1.1 Approach 1: Using os.environ['CUDA_VISIBLE_DEVICES']
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '2'
model = NeuralNet().cuda()
batch = batch.cuda()
1.2 Approach 2: Using torch.device()
target_device = torch.device('cuda:2')
model = NeuralNet().to(target_device)
batch = batch.to(target_device)
1.3 Errer 1: RuntimeError: CUDA error: inv ...
Posted on Thu, 23 Jul 2026 16:16:24 +0000 by timgetback
Image Augmentation Techniques for Deep Learning Datasets
Color adjustment (brightness, saturation, contrast)
Random scaling
Random cropping
PCA-based color augmentation
Translation shifting
Horizontal/vertical flipping
Rotation and affine transformations
Gaussian noise additoin
Class imbalance correction
Implementation Example (NumPy/PIL)
from PIL import Image, ImageEnhance
import numpy as np
impo ...
Posted on Wed, 15 Jul 2026 16:32:53 +0000 by gareh
Predicting Chemical Reaction Yield Using Recurrent Neural Networks on SMILES Strings
Chemical Informatics Fundamentals
The evolution of artificial intelligence in chemistry involves several stages. Early efforts focused on digitizing chemical knowledge into databases using various representation methods. Mid-stage approaches relied on manual feature engineering to encode existing data, followed by traditional machine learning a ...
Posted on Sat, 11 Jul 2026 16:37:55 +0000 by jdpatrick
Essential PyTorch Code Snippets for Deep Learning
Tensor Creaiton and Initialization
Basic Tensor Operations
import torch
# Create tensor from list
data_tensor = torch.tensor([1, 2, 3], dtype=torch.float32)
# Create tensor with random values (uniform distribution)
rand_tensor = torch.rand(2, 3)
# Create tensor with normal distribution values
normal_tensor = torch.randn(3, 4)
# Create tenso ...
Posted on Wed, 01 Jul 2026 17:53:53 +0000 by blintas