tf_agents.keras_layers.RNNWrapper
Stay organized with collections
Save and categorize content based on your preferences.
Wraps a Keras RNN/LSTM/GRU layer to make network state more consistent.
tf_agents.keras_layers.RNNWrapper(
layer: tf.keras.layers.RNN, **kwargs
)
Args |
layer
|
An instance of tf.keras.layers.RNN or subclasses (including
tf.keras.layers.{LSTM,GRU,...} .
|
**kwargs
|
Extra args to Layer parent class.
|
Raises |
TypeError
|
If layer is not a subclass of tf.keras.layers.RNN .
|
NotImplementedError
|
If layer was created with return_state == False .
|
NotImplementederror
|
If layer was created with
return_sequences == False .
|
Attributes |
cell
|
Return the cell underlying the RNN layer.
|
state_size
|
Return the state_size of the cell underlying the RNN layer.
|
wrapped_layer
|
Return the wrapped RNN layer.
|
Methods
get_initial_state
View source
get_initial_state(
inputs=None
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"lastModified": "Last updated 2024-04-26 UTC.",
"confidential": False
}