Notice: A non well formed numeric value encountered in D:\InetPub\vhosts\orbifold.net\orbifold.net\default\wp-content\plugins\crayon-syntax-highlighter\crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in D:\InetPub\vhosts\orbifold.net\orbifold.net\default\wp-content\plugins\crayon-syntax-highlighter\crayon_formatter.class.php on line 119

Notice: A non well formed numeric value encountered in D:\InetPub\vhosts\orbifold.net\orbifold.net\default\wp-content\plugins\crayon-syntax-highlighter\crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in D:\InetPub\vhosts\orbifold.net\orbifold.net\default\wp-content\plugins\crayon-syntax-highlighter\crayon_formatter.class.php on line 119

Notice: A non well formed numeric value encountered in D:\InetPub\vhosts\orbifold.net\orbifold.net\default\wp-content\plugins\crayon-syntax-highlighter\crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in D:\InetPub\vhosts\orbifold.net\orbifold.net\default\wp-content\plugins\crayon-syntax-highlighter\crayon_formatter.class.php on line 119

The snippets below all perform a standard linear regresson on the same data. It’s a comparison between TensorFlow, TFLearn and sklearn. It takes obviously more code in TensorFlow but one should rather compare the flexibility of the approaches.
TFLearn is just five lines but captures the essence of TensorFlow and clearly makes the development on top of TF more enjoyable.

TensorFlow

This approach is rather verbose but you have control over every detail. It feels like taking the derivative of a function by invoking deltas and limits.


 

TFLearn

This is in essence just five lines and, referring to the derivative analogy above, it’s like using reliable rules of thumb.


 

Sklearn

Here the philosophy is completely different and feels like doing classical mechanics while the neural nets are quantum mechanics.

So, the conclusion is that no approach is better but rather only depends on the question you ask and what you’re after.