function LayerVariable(val, dtype, name, trainable, constraint) {
	    if (dtype === void 0) {
	      dtype = 'float32';
	    }

	    if (name === void 0) {
	      name = DEFAULT_VARIABLE_NAME_PREFIX;
	    }

	    if (trainable === void 0) {
	      trainable = true;
	    }

	    if (constraint === void 0) {
	      constraint = null;
	    }

	    this.dtype = dtype == null ? 'float32' : dtype;
	    this.shape = val.shape;
	    this.id = getNextUniqueTensorId();
	    name = name == null ? DEFAULT_VARIABLE_NAME_PREFIX : name;
	    this.originalName = getScopedTensorName(name);
	    this.name = getUniqueTensorName(this.originalName);
	    this.trainable_ = trainable;
	    this.constraint = constraint;
	    this.val = variable(val, this.trainable_, this.name, this.dtype);
	  }
Construct Variable from a `tf.Tensor`.

If not explicitly named, the Variable will be given a name with the
prefix 'Variable'. Variable names are unique. In the case of name
collision, suffixies '_<num>' will be added to the name.

@param val Initial value of the Variable.
@param name Name of the variable. If `null` or `undefined` is provided, it
  will default a name with the prefix 'Variable'.
@param constraint Optional, projection function to be applied to the
variable after optimize updates
@throws ValueError if `name` is `null` or `undefined`.