TensorFlow
Avoid common TensorFlow mistakes — tf.function retracing, GPU memory, data pipeline bottlenecks, and gradient traps.
Why use this skill?
Optimize your TensorFlow models with OpenClaw. Resolve GPU memory issues, fix tf.function retracing, and accelerate data pipelines.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ivangdavila/tensorflowWhat This Skill Does
The TensorFlow skill for OpenClaw acts as an expert-level debugger and architect for TensorFlow-based machine learning projects. It provides deep technical insights into the most common pitfalls of the TensorFlow ecosystem, including computational graph optimization, GPU memory management, pipeline efficiency, and gradient tape nuances. This skill helps developers resolve performance bottlenecks and runtime errors before they reach production.
Installation
To integrate this skill into your environment, run the following command in your terminal:
clawhub install openclaw/skills/skills/ivangdavila/tensorflow
Use Cases
- Graph Optimization: Troubleshooting
tf.functionretracing to ensure your model runs at maximum compiled speed rather than falling back to eager execution. - Performance Tuning: Identifying data pipeline stalls by implementing
tf.data.AUTOTUNEand optimizing prefetching patterns. - Memory Management: Resolving Out-Of-Memory (OOM) errors by configuring GPU memory growth correctly and applying gradient checkpointing for large architectures.
- Gradient Debugging: Tracing disconnected gradient flows and implementing custom backward passes using
tf.custom_gradient. - Production Readiness: Navigating the differences between SavedModel formats and H5 to ensure model portability and serving integrity.
Example Prompts
- "I'm getting OOM errors when training my Transformer model on a single GPU. How do I configure TensorFlow to handle memory growth and optimize my batch size?"
- "My model is triggering constant retracing warnings in
tf.function. Can you review my code and show me how to useinput_signatureto fix this?" - "My training loop seems slow, and I suspect the data pipeline is starving the GPU. How can I optimize my
tf.data.Datasetusingprefetchand parallel mapping?"
Tips & Limitations
- Trace Awareness: Always remember that
tf.functionexecutes Python side effects only once during the tracing phase. Avoid using non-TensorFlow operations (like standard Python logging or print statements) inside decorated functions. - Hardware Configuration: Ensure
set_memory_growthis invoked at the very start of your program, as it cannot be modified after the GPU has been initialized. - Broadcasting: While broadcasting is powerful, be cautious of silent shape errors; utilize
tf.debugging.assert_shapes()liberally in your custom training loops to catch dimension mismatches early. - Versioning: This skill is optimized for TensorFlow 2.x paradigms. While it addresses foundational concepts, always verify specific API changes against the latest stable documentation.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ivangdavila-tensorflow": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: code-execution
Related Skills
Animations
Create performant web animations with proper accessibility and timing.
Arduino
Develop Arduino projects avoiding common wiring, power, and code pitfalls.
Bulgarian
Write Bulgarian that sounds human. Not formal, not robotic, not AI-generated.
Arabic
Write Arabic that sounds human. Not formal, not robotic, not AI-generated.
Assistant
Manage tasks, communications, and scheduling with proactive and organized support.