creates an object derived from net that represents a neural net with additional stored state information that is updated when the net is applied to data.
creates an object in which additional stored state information is initialized using seed.
- NetStateObject[…][data] updates stored state information in the NetStateObject.
- State information is associated with the state ports of recurrent net layers such as LongShortTermMemoryLayer.
- NetStateObject will not store the state of layers whose state ports are initialized from other layers in a NetGraph.
- When a seed is not provided, initial values for recurrent states will consist of arrays of zeros.
- The current value of the stored states is given by NetExtract[NetStateObject[…],"States"].
Examplesopen allclose all
Basic Examples (3)
Properties & Relations (3)
Create a graph that uses a connection to provide the initial value of the state of a BasicRecurrentLayer:
This graph cannot be used inside a NetStateObject, as there are no states left to store:
The current value of the stored states can be obtained using NetExtract.
First create a NetStateObject:
Wolfram Research (2018), NetStateObject, Wolfram Language function, https://reference.wolfram.com/language/ref/NetStateObject.html.
Wolfram Language. 2018. "NetStateObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NetStateObject.html.
Wolfram Language. (2018). NetStateObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NetStateObject.html