Variables

variable

variable()

Instantiate a new variable.

  • Args:

    • name: str. A name for this variable.
    • shape: list of int. The variable shape (optional).
    • dtype: type. The variable data type.
    • initializer: str or Tensor. The variable initialization.
    • regularizer: str or Tensor. The variable regularizer.
    • trainable: bool. If True, this variable weights will be trained.
    • collections: str. A collection to add the new variable to (optional).
    • device: str. Device ID to store the variable. Default: '/cpu:0'.
    • restore: bool. Restore or not this variable when loading a pre-trained model.
  • Returns: A Variable.