neurosys.com
Pros And Cons Of Using TensorFlow In The Production Environment
Excerpt
### Cons: **#1 Too cluttered code** This is something that TensorFlow developers are working on, and already announced to prevent in 2.0 release. Sadly, the current state of the framework is inconsistent: Which one to use? - tf.nn.conv2d - tf.nn.convolution - tf.layers.conv2d - tf.layers.Conv2d - tf.contrib.layers.conv2d - tf.contrib.layers.convolution2d Even typing “tf conv2d” in google leads to 3 of these options making it really frustrating when you want to just find out which operation to use. **#2 Need for extra code** As you can see in examples above, the amount of code needed for adding functionality is not that big. Nevertheless, naming conventions may be inconsistent, and the complexity of modules can be overwhelming. Every computation needs to be called from a session handler. This creates a situation that using TensorFlow is like using a language within another language. One can forget about writing a clean pythonic code when even something as simple as a for-loop needs to be called using a TensorFlow equivalent. Sometimes the documentation even “forgets” to tell you that you need to include additional instructions in your code to make some things work. This happened to me when I was trying to write my own data loader using the TensorFlow pipeline and provide multiple workers to parallelize computation. However, what was not included in the documentation, is that you need to manually launch these workers. Without this part, the whole script just halted waiting for workers to provide data. With no error or warning, it just stops and waits for data from workers which were never launched. This is an example of how those modules aren’t always seamlessly connected with each other, which leads to the lack of communication between them, and eventually, situations like the one described above. **#3 Frequent releases** For someone, this might sound like an advantage. But in reality, new releases every 1-2 months are better to avoid in the production environment, especially when they tend to break backward compatibility. We find it especially harmful for using bindings in different languages like C# TensorSharp. My team once encountered a problem after new arguments were introduced in one of the commonly used function, which broke compatibility with TensorSharp. The easiest solution we found was to use the older version of TensorFlow to re-export the whole model. … At the same time, I think TensorFlow can be a bit overwhelming for the beginners, as it often provides too many implementation options. This might be confusing for those with no experience or basic understanding of differences among suggested implementations. If this scares you off, it’s better to opt for simpler alternatives. So this is it. I hope you find something useful in this blog post.
Related Pain Points
Non-Pythonic code requirements and boilerplate overhead
7TensorFlow forces non-idiomatic Python patterns, requiring session handlers and TensorFlow-specific equivalents for basic operations like loops. This creates verbose, un-Pythonic code and makes the framework feel like a language within a language.
PyTorch API inconsistency causes breaking changes across versions
7API changes and framework version updates in PyTorch frequently introduce inconsistencies or breaking behavior, accounting for ~25% of all identified bugs. This forces developers to spend significant time tracking down compatibility issues rather than building features.
API documentation and collaboration fragmentation
693% of teams report challenges with inconsistent documentation, duplicated work, and difficulty discovering existing APIs. Specs, conversations, tests, and examples scattered across multiple tools create tribal knowledge dependencies, with 69% spending 10+ hours weekly on API-related tasks.
Insufficient module documentation and code examples
5Developers report that module instructions lack adequate detail and depth, making it difficult to understand how to properly use specific components without extensive troubleshooting.
Complexity and overhead for small or simple ML projects
4TensorFlow's comprehensive feature set and complexity create unnecessary overhead for small projects or beginners. The framework can be overkill for simple use cases, and its steep learning curve makes it inaccessible for novices without significant investment.