MCPcopy Create free account
hub / github.com/google-research/language / create_ict_module

Function create_ict_module

language/orqa/models/ict_model.py:64–80  ·  view source on GitHub ↗

Create hub module.

(params, mode)

Source from the content-addressed store, hash-verified

62
63
64def create_ict_module(params, mode):
65 """Create hub module."""
66 tags_and_args = []
67 for is_training in (True, False):
68 tags = set()
69 if is_training:
70 tags.add("train")
71 tags_and_args.append((tags, dict(is_training=is_training)))
72 ict_module_spec = hub.create_module_spec(
73 functools.partial(module_fn, params=params),
74 tags_and_args=tags_and_args)
75 ict_module = hub.Module(
76 ict_module_spec,
77 tags={"train"} if mode == tf_estimator.ModeKeys.TRAIN else {},
78 trainable=True)
79 hub.register_module_for_export(ict_module, "ict")
80 return ict_module
81
82
83def model_fn(features, labels, mode, params):

Callers 1

model_fnFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…