Ejemplo n.º 1
0
 def LayerSetup(self, bottom):
     return _ops.Run(bottom, **self.arguments)
Ejemplo n.º 2
0
    def run(self, inputs, outputs):
        """
        Run implement(i.e. forward-pass).

            Parameters
            ----------
            inputs  : sequence of strs
                Indicating the operator's inputs
            outputs : sequence of strs
                Indicating the operator's outputs

            Returns
            -------
            None

        """
        ws.FeedTensor(outputs[0], self._queue.get())


if __name__ == '__main__':

    # def
    y = ops.Run([], module=__name__, op='DataProcess', nout=1)
    foo = theano.function(outputs=y)

    # run
    foo()

    # fetch
    logger.info('y \n-------------- \n', y.get_value(), '\n')
Ejemplo n.º 3
0
 def Setup(self, bottom):
     super(PythonLayer, self).Setup(bottom)
     return ops.Run(bottom, nout=len(self._top), **self._param)