Build a complete neural network architecture in PyTorch with custom layers, activation functions, and training loops.
Create a complete PyTorch neural network implementation for [TASK TYPE: classification/regression/etc.]. Requirements: - Dataset: [DESCRIBE YOUR DATA] - Input features: [NUMBER OF FEATURES] - Output: [NUMBER OF CLASSES/CONTINUOUS VALUE] - Preferred architecture: [MLP/CNN/RNN/Transformer] Please provide: 1. Complete model class definition with configurable layers 2. Custom weight initialization 3. Forward pass implementation 4. Training loop with validation 5. Learning rate scheduling 6. Early stopping mechanism 7. Model checkpointing 8. Inference function 9. Performance visualization (loss curves, metrics) Include proper device handling (CPU/GPU), gradient clipping, and batch processing.
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[DESCRIBE YOUR DATA][NUMBER OF FEATURES]