MCPcopy Create free account
hub / github.com/LBANN/lbann / inputs

Method inputs

ci_test/common_python/test_util.py:178–188  ·  view source on GitHub ↗

Marks the given tensor as an input of the tested LBANN model, and returns a matching LBANN Input node (or a Slice/Reshape thereof). :param tensor: The input NumPy array to use. :return: An LBANN layer object that will serve as the input.

(self, tensor: Any)

Source from the content-addressed store, hash-verified

176 extra_callbacks: List[lbann.Callback] = field(default_factory=list)
177
178 def inputs(self, tensor: Any) -> lbann.Layer:
179 """
180 Marks the given tensor as an input of the tested LBANN model, and
181 returns a matching LBANN Input node (or a Slice/Reshape thereof).
182
183 :param tensor: The input NumPy array to use.
184 :return: An LBANN layer object that will serve as the input.
185 """
186 self.input_tensor = tensor
187 inp = lbann.Input(data_field='samples')
188 return slice_to_tensors(inp, tensor)
189
190 def inputs_like(self, *tensors) -> List[lbann.Layer]:
191 """

Callers 15

test_inplace_viewFunction · 0.95
setup_testerFunction · 0.95
test_select_all_constantFunction · 0.95
test_self_attentionFunction · 0.95
test_layernorm_basicFunction · 0.95
test_layernorm_scaledFunction · 0.95
test_layernorm_biasonlyFunction · 0.95
test_layernorm_defaultsFunction · 0.95
test_oneFunction · 0.95
test_simpleFunction · 0.95

Calls 1

slice_to_tensorsFunction · 0.85

Tested by

no test coverage detected