Add a build method to DropoutWrapperBase that passes through to the wrapped cell.
This enables building of cells that have been wrapped with a dropout wrapper. PiperOrigin-RevId: 265986982
This commit is contained in:
parent
fee62e2186
commit
804eb6e03f
@ -194,6 +194,10 @@ class DropoutWrapperBase(object):
|
||||
def output_size(self):
|
||||
return self.cell.output_size
|
||||
|
||||
def build(self, inputs_shape):
|
||||
self.cell.build(inputs_shape)
|
||||
self.built = True
|
||||
|
||||
def zero_state(self, batch_size, dtype):
|
||||
with ops.name_scope(type(self).__name__ + "ZeroState", values=[batch_size]):
|
||||
return self.cell.zero_state(batch_size, dtype)
|
||||
|
@ -160,7 +160,7 @@ tf_class {
|
||||
}
|
||||
member_method {
|
||||
name: "build"
|
||||
argspec: "args=[\'self\', \'_\'], varargs=None, keywords=None, defaults=None"
|
||||
argspec: "args=[\'self\', \'inputs_shape\'], varargs=None, keywords=None, defaults=None"
|
||||
}
|
||||
member_method {
|
||||
name: "call"
|
||||
|
Loading…
x
Reference in New Issue
Block a user