示例#1
0
 def __init__(self, name: Optional[str], axis: Axis):
     super().__init__(name)
     self.parameters["axis"] = axis
     self.attributes = {PostAxiswise(self, Axis.C),
                        Axiswise(self, Axis.C),
                        Inplace(self, "x", "y"),
                        HaveWeights(self)}
示例#2
0
 def __init__(self, name: Optional[str], ksize: IntOrTuple,
              stride: IntOrTuple, padding: IntOrTuple):
     super().__init__(name)
     self.parameters["ksize"] = to_tuple(ksize)
     self.parameters["stride"] = to_tuple(stride)
     self.parameters["padding"] = to_tuple(padding)
     self.attributes = {PostAxiswise(self, Axis.C), Axiswise(self, Axis.C)}
示例#3
0
 def __init__(self, name: Optional[str], n: float, k: float, alpha: float,
              beta: float):
     super().__init__(name)
     self.parameters["n"] = n
     self.parameters["k"] = k
     self.parameters["alpha"] = alpha
     self.parameters["beta"] = beta
     self.attributes = {PostAxiswise(self, Axis.C), Axiswise(self, Axis.C)}
示例#4
0
 def __init__(self, name: Optional[str], padding: IntOrTuple):
     super().__init__(name)
     self.parameters["padding"] = to_tuple(padding)
     self.attributes.add(PostAxiswise(self, Axis.C))
     self.attributes.add(Axiswise(self, Axis.C))