deepctr.contrib.utils module¶
- class deepctr.contrib.utils.QAAttGRUCell(*args, **kwargs)[source]¶
Bases:
tensorflow.python.keras.layers.legacy_rnn.rnn_cell_impl.RNNCellGated Recurrent Unit cell (cf. http://arxiv.org/abs/1406.1078).
Args:
num_units: int, The number of units in the GRU cell.
activation: Nonlinearity to use. Default: tanh.
reuse: (optional) Python boolean describing whether to reuse variables
in an existing scope. If not True, and the existing scope already has
the given variables, an error is raised.
kernel_initializer: (optional) The initializer to use for the weight and
projection matrices.
bias_initializer: (optional) The initializer to use for the bias.
- property output_size¶
Integer or TensorShape: size of outputs produced by this cell.
- property state_size¶
size(s) of state(s) used by this cell.
It can be represented by an Integer, a TensorShape or a tuple of Integers or TensorShapes.
- class deepctr.contrib.utils.VecAttGRUCell(*args, **kwargs)[source]¶
Bases:
tensorflow.python.keras.layers.legacy_rnn.rnn_cell_impl.RNNCellGated Recurrent Unit cell (cf. http://arxiv.org/abs/1406.1078).
Args:
num_units: int, The number of units in the GRU cell.
activation: Nonlinearity to use. Default: tanh.
reuse: (optional) Python boolean describing whether to reuse variables
in an existing scope. If not True, and the existing scope already has
the given variables, an error is raised.
kernel_initializer: (optional) The initializer to use for the weight and
projection matrices.
bias_initializer: (optional) The initializer to use for the bias.
- property output_size¶
Integer or TensorShape: size of outputs produced by this cell.
- property state_size¶
size(s) of state(s) used by this cell.
It can be represented by an Integer, a TensorShape or a tuple of Integers or TensorShapes.