code stringlengths 3 6.57k |
|---|
call(self, inputs, states, **kwargs) |
hasattr(cell.state_size, '__len__') |
nested_states.append(states[:len(cell.state_size) |
len(cell.state_size) |
nested_states.append([states[0]]) |
zip(self.cells, nested_states) |
cell.call(inputs, states, **kwargs) |
new_nested_states.append(states) |
build(self, input_shape) |
isinstance(cell, Layer) |
cell.build(input_shape) |
hasattr(cell.state_size, '__len__') |
get_config(self) |
cell.get_config() |
super(StackedRNNCells, self) |
get_config() |
dict(list(base_config.items() |
list(config.items() |
from_config(cls, config, custom_objects=None) |
config.pop('cells') |
cls(cells, **config) |
trainable_weights(self) |
isinstance(cell, Layer) |
non_trainable_weights(self) |
isinstance(cell, Layer) |
isinstance(cell, Layer) |
get_weights(self) |
isinstance(cell, Layer) |
K.batch_get_value(weights) |
set_weights(self, weights) |
model.get_weights() |
isinstance(cell, Layer) |
len(cell.weights) |
zip(cell.weights, weights) |
tuples.append((sw, w) |
K.batch_set_value(tuples) |
losses(self) |
isinstance(cell, Layer) |
get_losses_for(self, inputs=None) |
isinstance(cell, Layer) |
cell.get_losses_for(inputs) |
RNN(Layer) |
call(input_at_t, states_at_t) |
integer
(single state) |
state
(which should be the same as the size of the cell output) |
integers
(one size per state) |
entry
(`state_size[0]`) |
Boolean (default False) |
Boolean (default False) |
Boolean (default False) |
input (integer) |
upstream
(without it, the shape of the dense outputs cannot be computed) |
layer
(e.g. via the `input_shape` argument) |
fit() |
reset_states() |
inputs (not changing over time) |
MinimalRNNCell(keras.layers.Layer) |
__init__(self, units, **kwargs) |
super(MinimalRNNCell, self) |
__init__(**kwargs) |
build(self, input_shape) |
self.add_weight(shape=(input_shape[-1], self.units) |
call(self, inputs, states) |
K.dot(inputs, self.kernel) |
K.dot(prev_output, self.recurrent_kernel) |
MinimalRNNCell(32) |
keras.Input((None, 5) |
RNN(cell) |
layer(x) |
MinimalRNNCell(32) |
MinimalRNNCell(64) |
keras.Input((None, 5) |
RNN(cells) |
layer(x) |
isinstance(cell, (list, tuple) |
StackedRNNCells(cell) |
hasattr(cell, 'call') |
hasattr(cell, 'state_size') |
super(RNN, self) |
__init__(**kwargs) |
InputSpec(ndim=3) |
states(self) |
isinstance(self.cell.state_size, int) |
len(self.cell.state_size) |
range(num_states) |
states(self, states) |
compute_output_shape(self, input_shape) |
isinstance(input_shape, list) |
hasattr(self.cell.state_size, '__len__') |
compute_mask(self, inputs, mask) |
isinstance(mask, list) |
build(self, input_shape) |
isinstance(input_shape, list) |
InputSpec(shape=(batch_size, None, input_dim) |
cell (if layer) |
isinstance(self.cell, Layer) |
self.cell.build([step_input_shape] + constants_shape) |
self.cell.build(step_input_shape) |
hasattr(self.cell.state_size, '__len__') |
list(self.cell.state_size) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.