skillfed

Neural Network Design

Master the fundamentals of constructing neural networks across multiple paradigms—from convolutional layers for image processing to recurrent units for sequences and transformer blocks for attention-based learning. This skill covers architecture selection, layer composition, normalization strategies, and regularization approaches to help you tailor models to your problem domain.

Neural Network Design helps you build and optimize CNN, RNN, Transformer, and ResNet architectures using PyTorch and TensorFlow.

AI-generated summary based on this skill's SKILL.md

299 45 MIT updated by aj-geddes

Install

aj-geddes/useful-ai-prompts/neural-network-design · repository language: Shell

git clone https://github.com/aj-geddes/useful-ai-prompts
cp -r useful-ai-prompts/skills/neural-network-design ~/.claude/skills/neural-network-design
npx skillfed install aj-geddes/useful-ai-prompts/neural-network-design

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I design a CNN architecture for image classification?

Neural Network Design teaches you to construct convolutional architectures by stacking convolutional layers, pooling operations, and fully connected heads. You'll learn to choose filter sizes, depths, and stride patterns based on your image resolution and classification task. The skill covers how to balance model capacity with computational constraints and when to apply regularization like dropout and batch normalization to prevent overfitting on vision datasets.

What are the key differences between CNN, RNN, and transformer architectures?

Neural Network Design covers architecture selection across three major paradigms. CNNs excel at spatial feature extraction for images through weight sharing and local connectivity. RNNs and LSTMs process sequential data by maintaining hidden state across time steps. Transformers use self-attention mechanisms to capture long-range dependencies without recurrence, making them ideal for NLP and sequence modeling. The skill helps you match each architecture type to your problem's structure.

How should I compose layers and apply normalization in deep networks?

Neural Network Design covers layer composition best practices including the ordering of convolutions, normalization, and activation functions. You'll learn batch normalization for stabilizing training across layers, layer normalization for transformer blocks, and how these techniques interact with regularization methods like dropout. The skill explains why normalization reduces internal covariate shift and enables training of deeper architectures more effectively.

How do I build a transformer model with self-attention for NLP?

Neural Network Design teaches transformer architecture construction, including multi-head self-attention blocks, positional encoding, and feed-forward sublayers. You'll understand how attention mechanisms allow models to weigh relationships between all tokens in a sequence, and how to stack these blocks for deeper models. The skill covers implementation patterns in PyTorch and TensorFlow to bring transformer designs to production.

What role do skip connections play in deep neural networks?

Neural Network Design explains how skip connections (residual paths) enable training of very deep networks by allowing gradients to flow directly through layers. You'll learn ResNet-style architectures where identity mappings bypass one or more layers, reducing vanishing gradient problems. The skill covers when to apply skip connections, how they interact with normalization, and their impact on optimization dynamics in networks with 50+ layers.

How do I choose between depth and width when designing a neural network?

Neural Network Design addresses depth versus width tradeoffs: deeper networks can learn hierarchical features but are harder to train, while wider networks increase capacity per layer with lower optimization difficulty. The skill teaches you to consider your dataset size, computational budget, and task complexity when making this choice, and how techniques like skip connections and normalization shift these tradeoffs in favor of deeper architectures.

SKILL.md

rendered from the published skill — quoted content, verbatim

Neural Network Design

Overview

This skill covers designing and implementing neural network architectures including CNNs, RNNs, Transformers, and ResNets using PyTorch and TensorFlow, with focus on architecture selection, layer composition, and optimization techniques.

When to Use

  • Designing custom neural network architectures for computer vision tasks like image classification or object detection
  • Building sequence models for time series forecasting, natural language processing, or video analysis
  • Implementing transformer-based models for language understanding or generation tasks
  • Creating hybrid architectures that combine CNNs, RNNs, and attention mechanisms
  • Optimizing network depth, width, and skip connections for better training and performance
  • Selecting appropriate activation functions, normalization layers, and regularization techniques

Core Architecture Types

  • Feedforward Networks (MLPs): Fully connected layers
  • **Convolutional Networks

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 3 files
skills/neural-network-design/SKILL.md
skills/neural-network-design/scripts/scaffold-analysis.sh
skills/neural-network-design/templates/notebook-template.py

Related skills

Tags

model-architecture deep-learning-design layer-composition attention-mechanisms network-optimization computer-vision-models sequence-processing framework-agnostic architecture-patterns training-stability