function oneHot_(indices, depth, onValue, offValue) {
	  if (onValue === void 0) {
	    onValue = 1;
	  }

	  if (offValue === void 0) {
	    offValue = 0;
	  }

	  if (depth < 2) {
	    throw new Error("Error in oneHot: depth must be >=2, but it is " + depth);
	  }

	  var $indices = convertToTensor(indices, 'indices', 'oneHot', 'int32');
	  var inputs = {
	    indices: $indices
	  };
	  var attrs = {
	    depth: depth,
	    onValue: onValue,
	    offValue: offValue
	  };
	  return ENGINE.runKernel(OneHot, inputs, attrs);
	}
Creates a one-hot `tf.Tensor`. The locations represented by `indices` take
value `onValue` (defaults to 1), while all other locations take value
`offValue` (defaults to 0). If `indices` is rank `R`, the output has rank
`R+1` with the last axis of size `depth`.

```js
tf.oneHot(tf.tensor1d([0, 1], 'int32'), 3).print();
```

@param indices `tf.Tensor` of indices with dtype `int32`.
@param depth The depth of the one hot dimension.
@param onValue A number used to fill in the output when the index matches
the location.
@param offValue A number used to fill in the output when the index does
    not match the location.

@doc {heading: 'Tensors', subheading: 'Creation'}