Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Advantage of using experiments in TensorFlow

Many of TensorFlow's example applications create Experiments and run one of the Experiment's methods by calling tf.contrib.data.learn_runner.run. It looks like an Experiment is essentially a wrapper for an Estimator.

The code needed to create and run an Experiment looks more complex than the code needed to create, train, and evaluate an Estimator. I'm sure there's an advantage to using Experiments, but I can't figure out what it is. Could someone fill me in?

like image 513
MatthewScarpino Avatar asked Nov 14 '17 03:11

MatthewScarpino


People also ask

What are the disadvantages of TensorFlow?

Noe when we have seen advantages of TensorFlow, let us see some disadvantages of it. 1. Frequent updates TensorFlow releases different updates every 2-3 month, increasing the overhead for a user to install it and bind it with the existing system.

What is TensorFlow in machine learning?

TensorFlow is an open-source machine learning concept which is designed and developed by Google. It offers a very high level and abstract approach to organizing low-level numerical programming. And supporting libraries that can allow our software to run without changes on regular CPU.

Why should I use TensorFlow for graph visualization?

This library is designed and updated by Google, so needless to say, and it has come a far way since its initial release. TensorFlow has better computational graph visualizations. Which are inherent when compared to other libraries like Torch and Theano. Google backs it.

How does TensorFlow compare with other libraries?

When comparing TensorFlow with other libraries like Torch, SciKit, Theano, Neon, there are drawbacks in several features that the library lets us manipulate. This library is designed and updated by Google, so needless to say, and it has come a far way since its initial release.


1 Answers

tf.contrib.learn.Experiment is a high-level API for distributed training. Here's from its doc:

Experiment is a class containing all information needed to train a model.

After an experiment is created (by passing an Estimator and inputs for training and evaluation), an Experiment instance knows how to invoke training and eval loops in a sensible fashion for distributed training.

Just like tf.estimator.Estimator (and the derived classes) is a high-level API that hides matrix multiplications, saving checkpoints and so on, tf.contrib.learn.Experiment tries to hide the boilerplate you'd need to do for distributed computation, namely tf.train.ClusterSpec, tf.train.Server, jobs, tasks, etc.

You can train and evaluate the tf.estimator.Estimator on a single machine without an Experiment. See the examples in this tutorial.

like image 91
Maxim Avatar answered Sep 25 '22 01:09

Maxim