dmonopoly
dmonopoly

Reputation: 3331

What is a _Head object in Tensorflow?

Looking at the docs for DNNLinearCombinedEstimator, I see the first param is a _Head object:

Args:

head: A _Head object.

I can't find docs about this at all.

What is it?

Upvotes: 3

Views: 1211

Answers (2)

3voC
3voC

Reputation: 697

Looks like it will be included with new Head API in some future official version of Tensorflow, right now it is in contrib module. You can read more about design here: https://github.com/ewilderj/tensorflow/blob/aea71e8ab41dc18478de019a5b82a66ae76f6e81/rfc/estimator-head.md

Also, from one of the creators, here is small demo: https://youtu.be/4oNdaQk0Qv4?t=11m30s

Upvotes: 0

dmonopoly
dmonopoly

Reputation: 3331

I found this: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/learn/python/learn/estimators/head.py#L53

Interface for the head/top of a model.

Given logits (or output of a hidden layer), a Head knows how to compute predictions, loss, default metric and export signature.

Reading on, it looks it's just some object from which you can get the predictions, loss, and more of a model, created to simplify model_fn(). And you typically have one head object per model objective.

Upvotes: 4

Related Questions