help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
pytorch-neuralnetworks
RSK World
pytorch-neuralnetworks
Neural networks with PyTorch
pytorch-neuralnetworks
  • __pycache__
  • data
  • examples
  • models
  • notebooks
  • saved_models
  • training
  • utils
  • .gitignore866 B
  • FEATURES.md4.5 KB
  • GITHUB_RELEASE_INSTRUCTIONS.md1.8 KB
  • LICENSE1.3 KB
  • README.md4.8 KB
  • RELEASE_NOTES_v1.0.0.md3.1 KB
  • deploy.py4.3 KB
  • example.py2.4 KB
  • main.py3.7 KB
  • requirements.txt377 B
requirements.txtRELEASE_NOTES_v1.0.0.mdFEATURES.md
requirements.txt
Raw Download
Find: Go to:
# PyTorch Neural Networks - Requirements
# Project: PyTorch Neural Networks
# Author: RSK World
# Website: https://rskworld.in
# Email: help@rskworld.in
# Phone: +91 93305 39277

torch>=2.0.0
torchvision>=0.15.0
numpy>=1.24.0
matplotlib>=3.7.0
jupyter>=1.0.0
scikit-learn>=1.3.0
pandas>=2.0.0
seaborn>=0.12.0
tqdm>=4.65.0
tensorboard>=2.13.0
Pillow>=10.0.0

20 lines•377 B
text
RELEASE_NOTES_v1.0.0.md
Raw Download

RELEASE_NOTES_v1.0.0.md

# Release v1.0.0 - PyTorch Neural Networks

## 🎉 Initial Release

This is the first release of the PyTorch Neural Networks project - a comprehensive deep learning framework built with PyTorch.

## ✨ Features

### Core Models
- **Basic Neural Network (MLP)**: Feedforward neural networks with configurable layers
- **Convolutional Neural Network (CNN)**: Image classification models
- **Recurrent Neural Network (RNN)**: Sequence modeling with LSTM support
- **Advanced Architectures**: Residual blocks, attention layers, transformer blocks
- **Transfer Learning**: Pre-trained models (ResNet, VGG, DenseNet) with fine-tuning support

### Training Features
- **Basic Trainer**: Simple training loop with progress tracking
- **Advanced Trainer**:
- Gradient clipping
- Mixed precision training (FP16)
- Distributed training support
- **Callbacks**:
- Early stopping
- Model checkpointing
- Learning rate scheduling

### Evaluation & Metrics
- Accuracy calculation
- Confusion matrix visualization
- Classification reports
- Model evaluation utilities

### Data Utilities
- **Data Augmentation**: Image and sequence augmentation
- **Custom Datasets**: ImageDataset, SequenceDataset, TabularDataset
- **MixUp Augmentation**: Advanced augmentation technique

### Hyperparameter Tuning
- Grid search
- Random search
- Parameter optimization utilities

### Visualization
- Training history plots
- TensorBoard integration
- Real-time metric logging

### Deployment
- Model saving and loading
- ONNX export support
- Inference utilities
- Deployment scripts

### Documentation
- Comprehensive README
- Jupyter notebooks for tutorials:
- Tensor operations
- Automatic differentiation
- Basic neural network
- CNN examples
- RNN examples
- Model deployment
- Example scripts for all features

## 📦 Installation

```bash
pip install -r requirements.txt
```

## 🚀 Quick Start

```bash
# Basic neural network
python main.py --model basic --epochs 10

# CNN example
python main.py --model cnn --epochs 20

# RNN example
python main.py --model rnn --epochs 15

# Quick example
python example.py
```

## 📚 Project Structure

```
pytorch-neuralnetworks/
├── models/ # Neural network models
├── training/ # Training utilities
├── data/ # Data handling and augmentation
├── utils/ # Utility functions
├── examples/ # Example scripts
├── notebooks/ # Jupyter tutorials
└── saved_models/ # Model storage
```

## 🔧 Requirements

- Python 3.7+
- PyTorch 2.0.0+
- torchvision 0.15.0+
- NumPy, Matplotlib, scikit-learn
- Jupyter Notebook
- TensorBoard

## 📝 License

MIT License - See [LICENSE](LICENSE) file for details.

## 👥 Author

**RSK World**
- Website: https://rskworld.in
- Email: help@rskworld.in
- Phone: +91 93305 39277

## 🙏 Acknowledgments

Built with PyTorch - Facebook's deep learning framework.

---

**Full Changelog**: This is the initial release with all core features.

FEATURES.md
Raw Download

FEATURES.md

# Advanced Features - PyTorch Neural Networks

<!--
Project: PyTorch Neural Networks
Author: RSK World
Website: https://rskworld.in
Email: help@rskworld.in
Phone: +91 93305 39277
-->

This document describes all the advanced features available in this PyTorch Neural Networks project.

## Training Features

### 1. Advanced Trainer (`training/advanced_trainer.py`)
- **Gradient Clipping**: Prevents exploding gradients
- **Mixed Precision Training**: Faster training with reduced memory usage
- **Distributed Training**: Multi-GPU training support

### 2. Training Callbacks (`training/callbacks.py`)
- **Early Stopping**: Stop training when validation loss stops improving
- **Model Checkpointing**: Save best models automatically
- **Learning Rate Scheduling**: Automatic learning rate adjustment

### 3. Evaluation Metrics (`training/metrics.py`)
- **Confusion Matrix**: Visualize classification performance
- **Classification Report**: Detailed performance metrics
- **Accuracy Calculation**: Various accuracy metrics
- **Model Evaluation**: Comprehensive model evaluation utilities

## Data Features

### 1. Data Augmentation (`data/augmentation.py`)
- **Image Augmentation**:
- Random horizontal flip
- Random rotation
- Color jitter
- Random affine transformations
- **Sequence Augmentation**:
- Noise injection
- Feature dropout
- **MixUp**: Advanced augmentation technique

### 2. Custom Datasets (`data/datasets.py`)
- **ImageDataset**: Custom image dataset loader
- **SequenceDataset**: Custom sequence dataset loader
- **TabularDataset**: Custom tabular data loader

## Model Features

### 1. Transfer Learning (`models/transfer_learning.py`)
- **Pre-trained Models**:
- ResNet18, ResNet50
- VGG16
- DenseNet121
- **Fine-tuning**: Freeze/unfreeze layers for fine-tuning
- **Flexible Architecture**: Easy to adapt to different tasks

### 2. Advanced Architectures (`models/advanced.py`)
- **Residual Blocks**: ResNet-style skip connections
- **Attention Layers**: Self-attention mechanism
- **Transformer Blocks**: Complete transformer architecture

## Utility Features

### 1. Hyperparameter Tuning (`utils/hyperparameter_tuning.py`)
- **Grid Search**: Exhaustive parameter search
- **Random Search**: Efficient random parameter sampling
- **Results Logging**: Save and analyze search results

### 2. TensorBoard Integration (`utils/tensorboard_logger.py`)
- **Metric Logging**: Track training/validation metrics
- **Model Visualization**: Visualize model architecture
- **Image Logging**: Log images during training
- **Learning Rate Tracking**: Monitor learning rate changes

## Usage Examples

### Advanced Training

```python
from training.advanced_trainer import AdvancedTrainer
from training.callbacks import EarlyStopping, ModelCheckpoint

trainer = AdvancedTrainer(
model, criterion, optimizer, device,
gradient_clip=1.0,
use_mixed_precision=True
)

early_stopping = EarlyStopping(patience=5)
checkpoint = ModelCheckpoint('best_model.pth')
```

### Transfer Learning

```python
from models.transfer_learning import TransferLearningModel

model = TransferLearningModel(
model_name='resnet18',
num_classes=10,
pretrained=True,
freeze_backbone=True
)
```

### Hyperparameter Tuning

```python
from utils.hyperparameter_tuning import GridSearch

param_grid = {
'hidden_size': [64, 128, 256],
'num_layers': [1, 2, 3],
'dropout': [0.1, 0.2, 0.3]
}

grid_search = GridSearch(param_grid, model_class, train_loader, val_loader, device)
best_params, best_score, results = grid_search.search(epochs=10)
```

### TensorBoard Logging

```python
from utils.tensorboard_logger import TensorBoardLogger

logger = TensorBoardLogger(log_dir='runs/experiment')
logger.log_training_metrics({'loss': loss, 'accuracy': acc}, epoch)
logger.log_validation_metrics({'loss': val_loss, 'accuracy': val_acc}, epoch)
```

## Running Examples

1. **Advanced Features Example**:
```bash
python examples/advanced_features_example.py
```

2. **Transfer Learning Example**:
```bash
python examples/transfer_learning_example.py
```

3. **Hyperparameter Tuning Example**:
```bash
python examples/hyperparameter_tuning_example.py
```

## TensorBoard Visualization

After running training with TensorBoard logging:

```bash
tensorboard --logdir=runs
```

Then open http://localhost:6006 in your browser.

## Contact

- Website: https://rskworld.in
- Email: help@rskworld.in
- Phone: +91 93305 39277

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer