function variable(initialValue, trainable = true, name, dtype) {
    return (0, _engine.ENGINE).makeVariable(initialValue, trainable, name, dtype);
}
Creates a new variable with the provided initial value.
```js
const x = tf.variable(tf.tensor([1, 2, 3]));
x.assign(tf.tensor([4, 5, 6]));

x.print();
```

@param initialValue Initial value for the tensor.
@param trainable If true, optimizers are allowed to update it.
@param name Name of the variable. Defaults to a unique id.
@param dtype If set, initialValue will be converted to the given type.

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