tools/utilities/pythonlibs/audio/training/model_editor.py
def add_sink_node(self, node, functionName):
        """
        Add a SinkNode so you can get a callback with the output of the given node id.
        """
        if self.find_sink_node(node):
            print("node '{}' already has a SinkNode".format(node.GetRuntimeTypeName()))
            return False
        output_port = node.GetOutputPort("output")
        size = list(output_port.GetMemoryLayout().size)
        while len(size) < 3:
            size = [1] + size
        shape = ell.math.TensorShape(size[0], size[1], size[2])
        sink = self.builder.AddSinkNode(self.model, ell.nodes.PortElements(output_port), shape, functionName)
        return True

        Add a SinkNode so you can get a callback with the output of the given node id.
        
Add a SinkNode so you can get a callback with the output of the given node id.
Add a SinkNode so you can get a callback with the output of the given node id .
def add_sink_node(self, node, functionName):
        if self.find_sink_node(node):
            print("node '{}' already has a SinkNode".format(node.GetRuntimeTypeName()))
            return False
        output_port = node.GetOutputPort("output")
        size = list(output_port.GetMemoryLayout().size)
        while len(size) < 3:
            size = [1] + size
        shape = ell.math.TensorShape(size[0], size[1], size[2])
        sink = self.builder.AddSinkNode(self.model, ell.nodes.PortElements(output_port), shape, functionName)
        return True
def add_sink_node ( self , node , functionName ) : if self . find_sink_node ( node ) : print ( "node '{}' already has a SinkNode" . format ( node . GetRuntimeTypeName ( ) ) ) return False output_port = node . GetOutputPort ( "output" ) size = list ( output_port . GetMemoryLayout ( ) . size ) while len ( size ) < 3 : size = [ 1 ] + size shape = ell . math . TensorShape ( size [ 0 ] , size [ 1 ] , size [ 2 ] ) sink = self . builder . AddSinkNode ( self . model , ell . nodes . PortElements ( output_port ) , shape , functionName ) return True
Add a SinkNode so you can get a callback with the output of the given node id.
Add a SinkNode so you can get a callback with the output of the given node id .
"""
        Add a SinkNode so you can get a callback with the output of the given node id.
        """
self
node
functionName