[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MB8K0VSWWHQ0FHRWDGJRWB":3,"skill-same:01M6MB8K0VSWWHQ0FHRWDGJRWB":101},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6MB8K0VSWWHQ0FHRWDGJRWB","tensorboard",null,"Logs and views ML training data in TensorBoard using PyTorch SummaryWriter and TensorFlow\u002FKeras callbacks: scalars, images, text, histograms, model graphs, embedding projector, hyperparameter tables, PR curves, and TensorFlow or PyTorch profiler traces. Use when plotting loss and accuracy curves during training, comparing multiple runs in one dashboard, inspecting weight and gradient distributions, projecting embeddings with PCA or t-SNE, tracking hyperparameter experiments, or finding performance bottlenecks in a training loop. Not for hosted experiment tracking with team collaboration; use a dedicated tracking service for that.","hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1554,"MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftensorboard\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000013","分析与可视化","SCENARIO","使用场景",[5,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"team","when","Callbacks","Experiment Tracking","embedding","distributions","images","model","text","loop","performance","performance profiling","data","logs","embeddings","visualization","debugging","training","pytorch","dashboard","2026-11-10 10:12:30",false,"---\nname: tensorboard\ndescription: 'Logs and views ML training data in TensorBoard using PyTorch SummaryWriter and TensorFlow\u002FKeras callbacks: scalars, images, text, histograms, model graphs, embedding projector, hyperparameter tables, PR curves, and TensorFlow or PyTorch profiler traces. Use when plotting loss and accuracy curves during training, comparing multiple runs in one dashboard, inspecting weight and gradient distributions, projecting embeddings with PCA or t-SNE, tracking hyperparameter experiments, or finding performance bottlenecks in a training loop. Not for hosted experiment tracking with team collaboration; use a dedicated tracking service for that.'\nlicense: MIT\nmetadata:\n  version: 1.0.0\n  category: ml-inference-and-ops\n  maintainer: Kalaris Labs\n  tags: MLOps, TensorBoard, Visualization, Training Metrics, Model Debugging, PyTorch, TensorFlow, Experiment Tracking, Performance Profiling\n  dependencies: tensorboard, torch, tensorflow\n---\n\n# TensorBoard: Visualization Toolkit for ML\n\n## When to Use This Skill\n\nUse TensorBoard when you need to:\n- **Visualize training metrics** like loss and accuracy over time\n- **Debug models** with histograms and distributions\n- **Compare experiments** across multiple runs\n- **Visualize model graphs** and architecture\n- **Project embeddings** to lower dimensions (t-SNE, PCA)\n- **Track hyperparameter** experiments\n- **Profile performance** and identify bottlenecks\n- **Visualize images and text** during training\n\n\n## Installation\n\n```bash\n# Install TensorBoard\npip install tensorboard\n\n# PyTorch integration\npip install torch torchvision tensorboard\n\n# TensorFlow integration (TensorBoard included)\npip install tensorflow\n\n# Launch TensorBoard\ntensorboard --logdir=runs\n# Access at http:\u002F\u002Flocalhost:6006\n```\n\n## Quick Start\n\n### PyTorch\n\n```python\nfrom torch.utils.tensorboard import SummaryWriter\n\n# Create writer\nwriter = SummaryWriter('runs\u002Fexperiment_1')\n\n# Training loop\nfor epoch in range(10):\n    train_loss = train_epoch()\n    val_acc = validate()\n\n    # Log metrics\n    writer.add_scalar('Loss\u002Ftrain', train_loss, epoch)\n    writer.add_scalar('Accuracy\u002Fval', val_acc, epoch)\n\n# Close writer\nwriter.close()\n\n# Launch: tensorboard --logdir=runs\n```\n\n### TensorFlow\u002FKeras\n\n```python\nimport tensorflow as tf\n\n# Create callback\ntensorboard_callback = tf.keras.callbacks.TensorBoard(\n    log_dir='logs\u002Ffit',\n    histogram_freq=1\n)\n\n# Train model\nmodel.fit(\n    x_train, y_train,\n    epochs=10,\n    validation_data=(x_val, y_val),\n    callbacks=[tensorboard_callback]\n)\n\n# Launch: tensorboard --logdir=logs\n```\n\n## Core Concepts\n\n### 1. SummaryWriter (PyTorch)\n\n```python\nfrom torch.utils.tensorboard import SummaryWriter\n\n# Default directory: runs\u002FCURRENT_DATETIME\nwriter = SummaryWriter()\n\n# Custom directory\nwriter = SummaryWriter('runs\u002Fexperiment_1')\n\n# Custom comment (appended to default directory)\nwriter = SummaryWriter(comment='baseline')\n\n# Log data\nwriter.add_scalar('Loss\u002Ftrain', 0.5, step=0)\nwriter.add_scalar('Loss\u002Ftrain', 0.3, step=1)\n\n# Flush and close\nwriter.flush()\nwriter.close()\n```\n\n### 2. Logging Scalars\n\n```python\n# PyTorch\nfrom torch.utils.tensorboard import SummaryWriter\nwriter = SummaryWriter()\n\nfor epoch in range(100):\n    train_loss = train()\n    val_loss = validate()\n\n    # Log individual metrics\n    writer.add_scalar('Loss\u002Ftrain', train_loss, epoch)\n    writer.add_scalar('Loss\u002Fval', val_loss, epoch)\n    writer.add_scalar('Accuracy\u002Ftrain', train_acc, epoch)\n    writer.add_scalar('Accuracy\u002Fval', val_acc, epoch)\n\n    # Learning rate\n    lr = optimizer.param_groups[0]['lr']\n    writer.add_scalar('Learning_rate', lr, epoch)\n\nwriter.close()\n```\n\n```python\n# TensorFlow\nimport tensorflow as tf\n\ntrain_summary_writer = tf.summary.create_file_writer('logs\u002Ftrain')\nval_summary_writer = tf.summary.create_file_writer('logs\u002Fval')\n\nfor epoch in range(100):\n    with train_summary_writer.as_default():\n        tf.summary.scalar('loss', train_loss, step=epoch)\n        tf.summary.scalar('accuracy', train_acc, step=epoch)\n\n    with val_summary_writer.as_default():\n        tf.summary.scalar('loss', val_loss, step=epoch)\n        tf.summary.scalar('accuracy', val_acc, step=epoch)\n```\n\n### 3. Logging Multiple Scalars\n\n```python\n# PyTorch: Group related metrics\nwriter.add_scalars('Loss', {\n    'train': train_loss,\n    'validation': val_loss,\n    'test': test_loss\n}, epoch)\n\nwriter.add_scalars('Metrics', {\n    'accuracy': accuracy,\n    'precision': precision,\n    'recall': recall,\n    'f1': f1_score\n}, epoch)\n```\n\n### 4. Logging Images\n\n```python\n# PyTorch\nimport torch\nfrom torchvision.utils import make_grid\n\n# Single image\nwriter.add_image('Input\u002Fsample', img_tensor, epoch)\n\n# Multiple images as grid\nimg_grid = make_grid(images[:64], nrow=8)\nwriter.add_image('Batch\u002Finputs', img_grid, epoch)\n\n# Predictions visualization\npred_grid = make_grid(predictions[:16], nrow=4)\nwriter.add_image('Predictions', pred_grid, epoch)\n```\n\n```python\n# TensorFlow\nimport tensorflow as tf\n\nwith file_writer.as_default():\n    # Encode images as PNG\n    tf.summary.image('Training samples', images, step=epoch, max_outputs=25)\n```\n\n### 5. Logging Histograms\n\n```python\n# PyTorch: Track weight distributions\nfor name, param in model.named_parameters():\n    writer.add_histogram(name, param, epoch)\n\n    # Track gradients\n    if param.grad is not None:\n        writer.add_histogram(f'{name}.grad', param.grad, epoch)\n\n# Track activations\nwriter.add_histogram('Activations\u002Frelu1', activations, epoch)\n```\n\n```python\n# TensorFlow\nwith file_writer.as_default():\n    tf.summary.histogram('weights\u002Flayer1', layer1.kernel, step=epoch)\n    tf.summary.histogram('activations\u002Frelu1', activations, step=epoch)\n```\n\n### 6. Logging Model Graph\n\n```python\n# PyTorch\nimport torch\n\nmodel = MyModel()\ndummy_input = torch.randn(1, 3, 224, 224)\n\nwriter.add_graph(model, dummy_input)\nwriter.close()\n```\n\n```python\n# TensorFlow (automatic with Keras)\ntensorboard_callback = tf.keras.callbacks.TensorBoard(\n    log_dir='logs',\n    write_graph=True\n)\n\nmodel.fit(x, y, callbacks=[tensorboard_callback])\n```\n\n## Advanced Features\n\nDetails, code examples and parameter tables: [references\u002Fadvanced-features.md](references\u002Fadvanced-features.md). Read it when this step applies.\n\n## Integration Examples\n\nDetails, code examples and parameter tables: [references\u002Fintegration-examples.md](references\u002Fintegration-examples.md). Read it when this step applies.\n\n## Comparing Experiments\n\n### Multiple Runs\n\n```bash\n# Run experiments with different configs\npython train.py --lr 0.001 --logdir runs\u002Fexp1\npython train.py --lr 0.01 --logdir runs\u002Fexp2\npython train.py --lr 0.1 --logdir runs\u002Fexp3\n\n# View all runs together\ntensorboard --logdir=runs\n```\n\n**In TensorBoard:**\n- All runs appear in the same dashboard\n- Toggle runs on\u002Foff for comparison\n- Use regex to filter run names\n- Overlay charts to compare metrics\n\n### Organizing Experiments\n\n```python\n# Hierarchical organization\nruns\u002F\n├── baseline\u002F\n│   ├── run_1\u002F\n│   └── run_2\u002F\n├── improved\u002F\n│   ├── run_1\u002F\n│   └── run_2\u002F\n└── final\u002F\n    └── run_1\u002F\n\n# Log with hierarchy\nwriter = SummaryWriter('runs\u002Fbaseline\u002Frun_1')\n```\n\n## Best Practices\n\n### 1. Use Descriptive Run Names\n\n```python\n# ✅ Good: Descriptive names\nfrom datetime import datetime\ntimestamp = datetime.now().strftime('%Y%m%d_%H%M%S')\nwriter = SummaryWriter(f'runs\u002Fresnet50_lr0.001_bs32_{timestamp}')\n\n# ❌ Bad: Auto-generated names\nwriter = SummaryWriter()  # Creates runs\u002FJan01_12-34-56_hostname\n```\n\n### 2. Group Related Metrics\n\n```python\n# ✅ Good: Grouped metrics\nwriter.add_scalar('Loss\u002Ftrain', train_loss, step)\nwriter.add_scalar('Loss\u002Fval', val_loss, step)\nwriter.add_scalar('Accuracy\u002Ftrain', train_acc, step)\nwriter.add_scalar('Accuracy\u002Fval', val_acc, step)\n\n# ❌ Bad: Flat namespace\nwriter.add_scalar('train_loss', train_loss, step)\nwriter.add_scalar('val_loss', val_loss, step)\n```\n\n### 3. Log Regularly but Not Too Often\n\n```python\n# ✅ Good: Log epoch metrics always, batch metrics occasionally\nfor epoch in range(100):\n    for batch_idx, (data, target) in enumerate(train_loader):\n        loss = train_step(data, target)\n\n        # Log every 100 batches\n        if batch_idx % 100 == 0:\n            writer.add_scalar('Loss\u002Fbatch', loss, global_step)\n\n    # Always log epoch metrics\n    writer.add_scalar('Loss\u002Fepoch', epoch_loss, epoch)\n\n# ❌ Bad: Log every batch (creates huge log files)\nfor batch in train_loader:\n    writer.add_scalar('Loss', loss, step)  # Too frequent\n```\n\n### 4. Close Writer When Done\n\n```python\n# ✅ Good: Use context manager\nwith SummaryWriter('runs\u002Fexp1') as writer:\n    for epoch in range(10):\n        writer.add_scalar('Loss', loss, epoch)\n# Automatically closes\n\n# Or manually\nwriter = SummaryWriter('runs\u002Fexp1')\n# ... logging ...\nwriter.close()\n```\n\n### 5. Use Separate Writers for Train\u002FVal\n\n```python\n# ✅ Good: Separate log directories\ntrain_writer = SummaryWriter('runs\u002Fexp1\u002Ftrain')\nval_writer = SummaryWriter('runs\u002Fexp1\u002Fval')\n\ntrain_writer.add_scalar('loss', train_loss, epoch)\nval_writer.add_scalar('loss', val_loss, epoch)\n```\n\n## Performance Profiling\n\n### TensorFlow Profiler\n\n```python\n# Enable profiling\ntensorboard_callback = tf.keras.callbacks.TensorBoard(\n    log_dir='logs',\n    profile_batch='10,20'  # Profile batches 10-20\n)\n\nmodel.fit(x, y, callbacks=[tensorboard_callback])\n\n# View in TensorBoard Profile tab\n# Shows: GPU utilization, kernel stats, memory usage, bottlenecks\n```\n\n### PyTorch Profiler\n\n```python\nimport torch.profiler as profiler\n\nwith profiler.profile(\n    activities=[\n        profiler.ProfilerActivity.CPU,\n        profiler.ProfilerActivity.CUDA\n    ],\n    on_trace_ready=torch.profiler.tensorboard_trace_handler('.\u002Fruns\u002Fprofiler'),\n    record_shapes=True,\n    with_stack=True\n) as prof:\n    for batch in train_loader:\n        loss = train_step(batch)\n        prof.step()\n\n# View in TensorBoard Profile tab\n```\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fwww.tensorflow.org\u002Ftensorboard\n- **PyTorch Integration**: https:\u002F\u002Fpytorch.org\u002Fdocs\u002Fstable\u002Ftensorboard.html\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Ftensorboard\n- **TensorBoard.dev**: https:\u002F\u002Ftensorboard.dev (share experiments publicly)\n\n## See Also\n\n- `references\u002Fvisualization.md` - Comprehensive visualization guide\n- `references\u002Fprofiling.md` - Performance profiling patterns\n- `references\u002Fintegrations.md` - Framework-specific integration examples\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm hardware, framework and server versions, model format, and expected load.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Serve or log a single request or run end to end before scaling.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Measure latency, throughput and output correctness against a reference; check resource usage and costs.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| The server fails to start or OOMs | Check model size versus memory, quantization and parallelism settings. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Do not expose services or credentials publicly; confirm cloud costs before provisioning.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n","# TensorBoard: Visualization Toolkit for ML\n\n## When to Use This Skill\n\nUse TensorBoard when you need to:\n- **Visualize training metrics** like loss and accuracy over time\n- **Debug models** with histograms and distributions\n- **Compare experiments** across multiple runs\n- **Visualize model graphs** and architecture\n- **Project embeddings** to lower dimensions (t-SNE, PCA)\n- **Track hyperparameter** experiments\n- **Profile performance** and identify bottlenecks\n- **Visualize images and text** during training\n\n\n## Installation\n\n```bash\n# Install TensorBoard\npip install tensorboard\n\n# PyTorch integration\npip install torch torchvision tensorboard\n\n# TensorFlow integration (TensorBoard included)\npip install tensorflow\n\n# Launch TensorBoard\ntensorboard --logdir=runs\n# Access at http:\u002F\u002Flocalhost:6006\n```\n\n## Quick Start\n\n### PyTorch\n\n```python\nfrom torch.utils.tensorboard import SummaryWriter\n\n# Create writer\nwriter = SummaryWriter('runs\u002Fexperiment_1')\n\n# Training loop\nfor epoch in range(10):\n    train_loss = train_epoch()\n    val_acc = validate()\n\n    # Log metrics\n    writer.add_scalar('Loss\u002Ftrain', train_loss, epoch)\n    writer.add_scalar('Accuracy\u002Fval', val_acc, epoch)\n\n# Close writer\nwriter.close()\n\n# Launch: tensorboard --logdir=runs\n```\n\n### TensorFlow\u002FKeras\n\n```python\nimport tensorflow as tf\n\n# Create callback\ntensorboard_callback = tf.keras.callbacks.TensorBoard(\n    log_dir='logs\u002Ffit',\n    histogram_freq=1\n)\n\n# Train model\nmodel.fit(\n    x_train, y_train,\n    epochs=10,\n    validation_data=(x_val, y_val),\n    callbacks=[tensorboard_callback]\n)\n\n# Launch: tensorboard --logdir=logs\n```\n\n## Core Concepts\n\n### 1. SummaryWriter (PyTorch)\n\n```python\nfrom torch.utils.tensorboard import SummaryWriter\n\n# Default directory: runs\u002FCURRENT_DATETIME\nwriter = SummaryWriter()\n\n# Custom directory\nwriter = SummaryWriter('runs\u002Fexperiment_1')\n\n# Custom comment (appended to default directory)\nwriter = SummaryWriter(comment='baseline')\n\n# Log data\nwriter.add_scalar('Loss\u002Ftrain', 0.5, step=0)\nwriter.add_scalar('Loss\u002Ftrain', 0.3, step=1)\n\n# Flush and close\nwriter.flush()\nwriter.close()\n```\n\n### 2. Logging Scalars\n\n```python\n# PyTorch\nfrom torch.utils.tensorboard import SummaryWriter\nwriter = SummaryWriter()\n\nfor epoch in range(100):\n    train_loss = train()\n    val_loss = validate()\n\n    # Log individual metrics\n    writer.add_scalar('Loss\u002Ftrain', train_loss, epoch)\n    writer.add_scalar('Loss\u002Fval', val_loss, epoch)\n    writer.add_scalar('Accuracy\u002Ftrain', train_acc, epoch)\n    writer.add_scalar('Accuracy\u002Fval', val_acc, epoch)\n\n    # Learning rate\n    lr = optimizer.param_groups[0]['lr']\n    writer.add_scalar('Learning_rate', lr, epoch)\n\nwriter.close()\n```\n\n```python\n# TensorFlow\nimport tensorflow as tf\n\ntrain_summary_writer = tf.summary.create_file_writer('logs\u002Ftrain')\nval_summary_writer = tf.summary.create_file_writer('logs\u002Fval')\n\nfor epoch in range(100):\n    with train_summary_writer.as_default():\n        tf.summary.scalar('loss', train_loss, step=epoch)\n        tf.summary.scalar('accuracy', train_acc, step=epoch)\n\n    with val_summary_writer.as_default():\n        tf.summary.scalar('loss', val_loss, step=epoch)\n        tf.summary.scalar('accuracy', val_acc, step=epoch)\n```\n\n### 3. Logging Multiple Scalars\n\n```python\n# PyTorch: Group related metrics\nwriter.add_scalars('Loss', {\n    'train': train_loss,\n    'validation': val_loss,\n    'test': test_loss\n}, epoch)\n\nwriter.add_scalars('Metrics', {\n    'accuracy': accuracy,\n    'precision': precision,\n    'recall': recall,\n    'f1': f1_score\n}, epoch)\n```\n\n### 4. Logging Images\n\n```python\n# PyTorch\nimport torch\nfrom torchvision.utils import make_grid\n\n# Single image\nwriter.add_image('Input\u002Fsample', img_tensor, epoch)\n\n# Multiple images as grid\nimg_grid = make_grid(images[:64], nrow=8)\nwriter.add_image('Batch\u002Finputs', img_grid, epoch)\n\n# Predictions visualization\npred_grid = make_grid(predictions[:16], nrow=4)\nwriter.add_image('Predictions', pred_grid, epoch)\n```\n\n```python\n# TensorFlow\nimport tensorflow as tf\n\nwith file_writer.as_default():\n    # Encode images as PNG\n    tf.summary.image('Training samples', images, step=epoch, max_outputs=25)\n```\n\n### 5. Logging Histograms\n\n```python\n# PyTorch: Track weight distributions\nfor name, param in model.named_parameters():\n    writer.add_histogram(name, param, epoch)\n\n    # Track gradients\n    if param.grad is not None:\n        writer.add_histogram(f'{name}.grad', param.grad, epoch)\n\n# Track activations\nwriter.add_histogram('Activations\u002Frelu1', activations, epoch)\n```\n\n```python\n# TensorFlow\nwith file_writer.as_default():\n    tf.summary.histogram('weights\u002Flayer1', layer1.kernel, step=epoch)\n    tf.summary.histogram('activations\u002Frelu1', activations, step=epoch)\n```\n\n### 6. Logging Model Graph\n\n```python\n# PyTorch\nimport torch\n\nmodel = MyModel()\ndummy_input = torch.randn(1, 3, 224, 224)\n\nwriter.add_graph(model, dummy_input)\nwriter.close()\n```\n\n```python\n# TensorFlow (automatic with Keras)\ntensorboard_callback = tf.keras.callbacks.TensorBoard(\n    log_dir='logs',\n    write_graph=True\n)\n\nmodel.fit(x, y, callbacks=[tensorboard_callback])\n```\n\n## Advanced Features\n\nDetails, code examples and parameter tables: [references\u002Fadvanced-features.md](references\u002Fadvanced-features.md). Read it when this step applies.\n\n## Integration Examples\n\nDetails, code examples and parameter tables: [references\u002Fintegration-examples.md](references\u002Fintegration-examples.md). Read it when this step applies.\n\n## Comparing Experiments\n\n### Multiple Runs\n\n```bash\n# Run experiments with different configs\npython train.py --lr 0.001 --logdir runs\u002Fexp1\npython train.py --lr 0.01 --logdir runs\u002Fexp2\npython train.py --lr 0.1 --logdir runs\u002Fexp3\n\n# View all runs together\ntensorboard --logdir=runs\n```\n\n**In TensorBoard:**\n- All runs appear in the same dashboard\n- Toggle runs on\u002Foff for comparison\n- Use regex to filter run names\n- Overlay charts to compare metrics\n\n### Organizing Experiments\n\n```python\n# Hierarchical organization\nruns\u002F\n├── baseline\u002F\n│   ├── run_1\u002F\n│   └── run_2\u002F\n├── improved\u002F\n│   ├── run_1\u002F\n│   └── run_2\u002F\n└── final\u002F\n    └── run_1\u002F\n\n# Log with hierarchy\nwriter = SummaryWriter('runs\u002Fbaseline\u002Frun_1')\n```\n\n## Best Practices\n\n### 1. Use Descriptive Run Names\n\n```python\n# ✅ Good: Descriptive names\nfrom datetime import datetime\ntimestamp = datetime.now().strftime('%Y%m%d_%H%M%S')\nwriter = SummaryWriter(f'runs\u002Fresnet50_lr0.001_bs32_{timestamp}')\n\n# ❌ Bad: Auto-generated names\nwriter = SummaryWriter()  # Creates runs\u002FJan01_12-34-56_hostname\n```\n\n### 2. Group Related Metrics\n\n```python\n# ✅ Good: Grouped metrics\nwriter.add_scalar('Loss\u002Ftrain', train_loss, step)\nwriter.add_scalar('Loss\u002Fval', val_loss, step)\nwriter.add_scalar('Accuracy\u002Ftrain', train_acc, step)\nwriter.add_scalar('Accuracy\u002Fval', val_acc, step)\n\n# ❌ Bad: Flat namespace\nwriter.add_scalar('train_loss', train_loss, step)\nwriter.add_scalar('val_loss', val_loss, step)\n```\n\n### 3. Log Regularly but Not Too Often\n\n```python\n# ✅ Good: Log epoch metrics always, batch metrics occasionally\nfor epoch in range(100):\n    for batch_idx, (data, target) in enumerate(train_loader):\n        loss = train_step(data, target)\n\n        # Log every 100 batches\n        if batch_idx % 100 == 0:\n            writer.add_scalar('Loss\u002Fbatch', loss, global_step)\n\n    # Always log epoch metrics\n    writer.add_scalar('Loss\u002Fepoch', epoch_loss, epoch)\n\n# ❌ Bad: Log every batch (creates huge log files)\nfor batch in train_loader:\n    writer.add_scalar('Loss', loss, step)  # Too frequent\n```\n\n### 4. Close Writer When Done\n\n```python\n# ✅ Good: Use context manager\nwith SummaryWriter('runs\u002Fexp1') as writer:\n    for epoch in range(10):\n        writer.add_scalar('Loss', loss, epoch)\n# Automatically closes\n\n# Or manually\nwriter = SummaryWriter('runs\u002Fexp1')\n# ... logging ...\nwriter.close()\n```\n\n### 5. Use Separate Writers for Train\u002FVal\n\n```python\n# ✅ Good: Separate log directories\ntrain_writer = SummaryWriter('runs\u002Fexp1\u002Ftrain')\nval_writer = SummaryWriter('runs\u002Fexp1\u002Fval')\n\ntrain_writer.add_scalar('loss', train_loss, epoch)\nval_writer.add_scalar('loss', val_loss, epoch)\n```\n\n## Performance Profiling\n\n### TensorFlow Profiler\n\n```python\n# Enable profiling\ntensorboard_callback = tf.keras.callbacks.TensorBoard(\n    log_dir='logs',\n    profile_batch='10,20'  # Profile batches 10-20\n)\n\nmodel.fit(x, y, callbacks=[tensorboard_callback])\n\n# View in TensorBoard Profile tab\n# Shows: GPU utilization, kernel stats, memory usage, bottlenecks\n```\n\n### PyTorch Profiler\n\n```python\nimport torch.profiler as profiler\n\nwith profiler.profile(\n    activities=[\n        profiler.ProfilerActivity.CPU,\n        profiler.ProfilerActivity.CUDA\n    ],\n    on_trace_ready=torch.profiler.tensorboard_trace_handler('.\u002Fruns\u002Fprofiler'),\n    record_shapes=True,\n    with_stack=True\n) as prof:\n    for batch in train_loader:\n        loss = train_step(batch)\n        prof.step()\n\n# View in TensorBoard Profile tab\n```\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fwww.tensorflow.org\u002Ftensorboard\n- **PyTorch Integration**: https:\u002F\u002Fpytorch.org\u002Fdocs\u002Fstable\u002Ftensorboard.html\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Ftensorflow\u002Ftensorboard\n- **TensorBoard.dev**: https:\u002F\u002Ftensorboard.dev (share experiments publicly)\n\n## See Also\n\n- `references\u002Fvisualization.md` - Comprehensive visualization guide\n- `references\u002Fprofiling.md` - Performance profiling patterns\n- `references\u002Fintegrations.md` - Framework-specific integration examples\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm hardware, framework and server versions, model format, and expected load.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Serve or log a single request or run end to end before scaling.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Measure latency, throughput and output correctness against a reference; check resource usage and costs.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| The server fails to start or OOMs | Check model size versus memory, quantization and parallelism settings. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Do not expose services or credentials publicly; confirm cloud costs before provisioning.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n",{"name":5,"license":15,"metadata":49,"description":7},{"tags":50,"version":51,"category":52,"maintainer":53,"dependencies":54},"MLOps, TensorBoard, Visualization, Training Metrics, Model Debugging, PyTorch, TensorFlow, Experiment Tracking, Performance Profiling","1.0.0","ml-inference-and-ops","Kalaris Labs","tensorboard, torch, tensorflow","main","2b63f856ce19c2a797929cacabd9e0fc936812fa","plugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftensorboard",468,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-11 02:22:54",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill tensorboard",{"tool":71,"command":72},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill tensorboard",{"tool":74,"command":75},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill tensorboard","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftensorboard\u002FSKILL.md",true,[79,85,89,93,97],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fadvanced-features.md","REFERENCE","参考文档",2290,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftensorboard\u002Freferences\u002Fadvanced-features.md",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fintegration-examples.md",3310,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftensorboard\u002Freferences\u002Fintegration-examples.md",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fintegrations.md",16205,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftensorboard\u002Freferences\u002Fintegrations.md",{"path":94,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fprofiling.md",13337,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftensorboard\u002Freferences\u002Fprofiling.md",{"path":98,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fvisualization.md",14897,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fskills\u002Ftensorboard\u002Freferences\u002Fvisualization.md",[102,128,153,185,206,220],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":106,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":44},"01M716A6ETNB9B1SQ3GXZC75VR","deja-search","deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fvshulcz\u002Fdeja-vu\u002Fskills\u002Fdeja-search\u002FSKILL.md",[],[110,111,112,113,114,115,116,117,118,119,40,25,120,121,122,123,124,125,126,127],"search","deja search","error","ready","never","memory","re","decide","fix","design","you","done","reviewer","io","change","cli","merge","past",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":106,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":44},"01M716A3J2W5SENSE9VGMXB375","deja-reflect","End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fvshulcz\u002Fdeja-vu\u002Fskills\u002Fdeja-reflect\u002FSKILL.md",[],[135,136,137,138,115,139,140,141,142,143,144,145,146,123,147,148,149,150,151,152],"reflect","deja reflect","brew","remember","project rules","project","session","end","reflection","Rules","decisions","review","with","record","github","next","https","node",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":106,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":168,"publishedAt":44},"01M715T3RR4BAYSR57HPPTJ0PF","revid","Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Ftmakersas\u002Frevid-skills\u002Fskills\u002Frevid\u002FSKILL.md",[159,162,165],{"categoryNo":160,"categoryName":161,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":163,"categoryName":164,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":166,"categoryName":167,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[155,169,170,171,172,173,140,174,116,175,176,177,178,25,179,180,181,182,183,184],"Video","short-form","standalone","PDF","viral","tiktok","short","social","MCP","song","URL","image","mcp server","schedule","api","publish",{"skillNo":186,"name":187,"nameZh":6,"description":188,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":106,"licenseFileUrl":6,"sourceHtmlUrl":189,"categories":190,"keywords":191,"publishedAt":44},"01M71569ZM2X3H5RBFK8PVKMK2","review-study","Review a QuestionPunk survey before launch for wording, answer choices, branching, and missing settings. Use for check my survey or review this draft before publishing.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fquestionpunk\u002Fcodex-plugin\u002Fskills\u002Freview-study\u002FSKILL.md",[],[192,193,146,194,195,196,197,198,199,200,201,202,203,204,205],"study","review study","for","answer","missing","survey","publishing","use","check","draft","settings","launch","my","branching",{"skillNo":207,"name":208,"nameZh":6,"description":209,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":106,"licenseFileUrl":6,"sourceHtmlUrl":210,"categories":211,"keywords":212,"publishedAt":44},"01M71567GV0C35YQBY0DPGR86B","manage-study","Find QuestionPunk studies, check status, publish an explicitly requested draft, or retrieve its participant link. Use for find my survey, publish this study, or how many people responded.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fquestionpunk\u002Fcodex-plugin\u002Fskills\u002Fmanage-study\u002FSKILL.md",[],[213,192,214,194,197,199,215,200,201,184,216,217,218,219,204],"manage study","manage","people","how","find","link","status",{"skillNo":221,"name":222,"nameZh":6,"description":223,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":106,"licenseFileUrl":6,"sourceHtmlUrl":224,"categories":225,"keywords":226,"publishedAt":44},"01M71565A8TCA01AZQZRGRYMFZ","create-study","Create a saved QuestionPunk survey draft from a research brief or edit specified questions. Use for requests such as make a customer feedback survey or shorten my onboarding study.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fquestionpunk\u002Fcodex-plugin\u002Fskills\u002Fcreate-study\u002FSKILL.md",[],[227,192,228,229,230,231,194,232,197,233,199,234,235,201,236,237,238,239,240,204],"create study","create","brief","as","feedback","customer feedback","research brief","shorten","saved","research","requests","customer","questions","edit"]