DK
Size: a a a
DK
DV
DV
DV
DV
DV
DV
DV
DV
DV
class AddNode(BaseCDAGNode):
"""
Add `x` to `y`
"""
name = "add"
static_inputs = ["x", "y"]
categories = [Category.OPERATION]
def get_value(self) -> Optional[ValueType]:
x, y = self.get_all_inputs()
if x is None or y is None:
return None
return x + y
DV
DV
DV
CATEGORIES = {
Category.MATH: {
"abs",
"acos",
"asin",
"atan",
"cos",
"exp",
"logistic",
"neg",
"relu",
"softplus",
"sin",
"sqrt",
"tan",
},
Category.OPERATION: {"add", "div", "mul", "sub"},
Category.LOGICAL: {},
Category.ACTIVATION: {"indicator", "logistic", "relu", "softplus"},
Category.COMPARE: {"eq", "ne"},
Category.DEBUG: {"state"},
Category.UTIL: {"value"},
Category.STATISTICS: {"mean", "std"},
}
DV
DK
IE
DV
DV
DV
DV