def build(self, *args, **kwargs):
"""Builds the module and sets the scope.
This function will get called automatically when the module gets called.
"""
if self._is_built:
logging.info('Current Module name: `{}` is already built.'.format(self.name))
return
self._is_built = True
self._template = tf.make_template(self.name, self._build, create_scope_now_=True)
self._unique_name = self._template.variable_scope.name.split('/')[-1]
评论列表
文章目录