Rework seq2seq decoder to be keras layer like and compatible with 2.0.
1. Adding new class for decoderV2, which is a keras layer. All the tensor input has been update to be passed in via call(). The other abstract method has not been updated much, only initialize() is update to take more tensor input. 2. The existing dynamic_decode method has been copied to be the call() body of DecoderV2, with some update of removing deprecated variable_scope. 3. Helper has been rename to Sampler to better describe what it does. 4. Change the Sampler to also take tensor input during initializer(), instead of __init__(). 5. Existing test has been ported to cover DecoderV2, with eager enabled. PiperOrigin-RevId: 231510508
Loading
Please sign in to comment