def __call__(self, x=None):
     """
     Some other modules point to current module
     :param x: upstream module nodes. x is either a Node or list of Node.
     :return: node containing current module
     """
     x = to_list(x if x else [])
     layer = self
     if isinstance(self, Lambda):
         input_shapes = [
             ZooKerasLayer.of(node.element().value).get_output_shape()
             for node in x
         ]
         layer = self.create(remove_batch(input_shapes))
     return Node.of(
         callBigDlFunc(self.bigdl_type, "createNode", layer, to_list(x)))
示例#2
0
 def to_keras(self):
     value = callBigDlFunc(self.bigdl_type, "netToKeras", self.value)
     return ZooKerasLayer.of(value, self.bigdl_type)