Help protect the Great Barrier Reef with TensorFlow on Kaggle

# tf.function

Compiles a function into a callable TensorFlow graph. (deprecated arguments)

### Used in the notebooks

`tf.function` constructs a `tf.types.experimental.GenericFunction` that executes a TensorFlow graph (`tf.Graph`) created by trace-compiling the TensorFlow operations in `func`. More information on the topic can be found in Introduction to Graphs and tf.function.

See Better Performance with tf.function for tips on performance and known limitations.

#### Example usage:

````@tf.function`
`def f(x, y):`
`  return x ** 2 + y`
`x = tf.constant([2, 3])`
`y = tf.constant([3, -2])`
`f(x, y)`
`<tf.Tensor: ... numpy=array([7, 7], ...)>`
```

The trace-compilation allows non-TensorFlow operations to execute, but under special conditions. In general, only TensorFlow operations are guaranteed to run and create fresh results whenever the `GenericFunction` is called.

## Features

`func` may use data-dependent control flow, including `if`, `for`, `while` `break`, `continue` and `return` statements:

````@tf.function`
`def f(x):`
`  if tf.reduce_sum(x) > 0:`
`    return x * x`
`  else:`
`    return -x // 2`
`f(tf.constant(-2))`
`<tf.Tensor: ... numpy=1>`
```

`func`'s closure may include `tf.Tensor` and `tf.Variable` objects:

````@tf.function`
`def f():`
`  return x ** 2 + y`
`x = tf.constant([-2, -3])`
`y = tf.Variable([3, -2])`
`f()`
`<tf.T````