(self)
return prefix + caller + shapes_str + self._traceback
Assembles current layer context into an error message.
Assembles current layer context into an error message.
Assembles current layer context into an error message .
def message(self):
    """Assembles current layer context into an error message."""
    prefix = 'Exception passing through layer '
    prefix += '%s (in %s):\n' % (self._layer_name, self._function_name)
    short_path = '[...]/' + '/'.join(
        self._caller['filename'].split('/')[-3:])
    caller = '  layer created in file %s, line %d\n' % (short_path,
                                                        self._caller['lineno'])
    shapes_str = '  layer input shapes: %s\n\n' % str(self._input_signature)
    return prefix + caller + shapes_str + self._traceback
def message ( self ) : prefix = 'Exception passing through layer ' prefix += '%s (in %s):\n' % ( self . _layer_name , self . _function_name ) short_path = '[...]/' + '/' . join ( self . _caller [ 'filename' ] . split ( '/' ) [ - 3 : ] ) caller = '  layer created in file %s, line %d\n' % ( short_path , self . _caller [ 'lineno' ] ) shapes_str = '  layer input shapes: %s\n\n' % str ( self . _input_signature ) return prefix + caller + shapes_str + self . _traceback