MCPcopy Index your code
hub / github.com/tensorflow/models / get

Method get

official/modeling/hyperparams/oneof.py:47–57  ·  view source on GitHub ↗

Returns selected config based on the value of type. If type is not set (None), None is returned.

(self)

Source from the content-addressed store, hash-verified

45 return {'type': self.type, chosen_type: self._export_config(chosen_value)}
46
47 def get(self):
48 """Returns selected config based on the value of type.
49
50 If type is not set (None), None is returned.
51 """
52 chosen_type = self.type
53 if chosen_type is None:
54 return None
55 if chosen_type not in self.__dict__:
56 raise ValueError('type: {!r} is not a valid key!'.format(self.type))
57 return self.__dict__[chosen_type]

Callers 15

get_activationFunction · 0.45
evaluateMethod · 0.45
__init__Method · 0.45
get_task_samplerFunction · 0.45
_get_lrMethod · 0.45
_resource_apply_denseMethod · 0.45
__init__Method · 0.45
_resource_apply_denseMethod · 0.45
__init__Method · 0.45
test_no_optimizerMethod · 0.45
test_no_lr_scheduleMethod · 0.45

Calls

no outgoing calls

Tested by 5

test_no_optimizerMethod · 0.36
test_no_lr_scheduleMethod · 0.36
test_configMethod · 0.36
test_get_oneofMethod · 0.36