Adds __repr__ method to HParams.
PiperOrigin-RevId: 192184000
This commit is contained in:
parent
a4a74a3c24
commit
b3bf896907
@ -630,6 +630,9 @@ class HParams(object):
|
||||
def __str__(self):
|
||||
return str(sorted(self.values().items()))
|
||||
|
||||
def __repr__(self):
|
||||
return '%s(%s)' % (type(self).__name__, self.__str__())
|
||||
|
||||
@staticmethod
|
||||
def _get_kind_name(param_type, is_list):
|
||||
"""Returns the field name given parameter type and is_list.
|
||||
|
Loading…
Reference in New Issue
Block a user