Esempio n. 1
0
 def to_json(self, parent=None):
     props = serialize.all_properties_to_json(self)
     return {
         'type': 'SubgraphTransformation',
         'transformation': type(self).__name__,
         **props
     }
Esempio n. 2
0
 def to_json(self, parent=None) -> Dict[str, Any]:
     props = serialize.all_properties_to_json(self)
     return {
         'type': 'Transformation',
         'transformation': type(self).__name__,
         **props
     }
Esempio n. 3
0
 def to_json(self, parent=None) -> Dict[str, Any]:
     props = serialize.all_properties_to_json(self)
     return {
         'type': 'ExpandTransformation',
         'transformation': type(self).__name__,
         'classpath': nd.full_class_path(self),
         **props
     }
Esempio n. 4
0
    def to_json(self):
        attrs = serialize.all_properties_to_json(self)

        # Take care of symbolic expressions
        attrs['strides'] = list(map(str, attrs['strides']))

        retdict = {"type": type(self).__name__, "attributes": attrs}

        return retdict
Esempio n. 5
0
 def to_json(self):
     return all_properties_to_json(self)
Esempio n. 6
0
    def to_json(self):
        attrs = serialize.all_properties_to_json(self)

        retdict = {"type": type(self).__name__, "attributes": attrs}

        return retdict