Skip to content

Commit bd7079f

Browse files
committed
Add build in ModuleBase
1 parent 7227533 commit bd7079f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

texar/tf/module_base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ def call(self, inputs, *args, **kwargs):
5858
"""
5959
raise NotImplementedError
6060

61+
def build(self, input_shape):
62+
r"""Creates the variables of the layer (optional, for subclass
63+
implementers).
64+
"""
65+
super().build(input_shape)
66+
6167
@staticmethod
6268
def default_hparams():
6369
r"""Returns a `dict` of hyperparameters of the module with default

0 commit comments

Comments
 (0)