Пример #1
0
    def execute(self, execution_component, input_dictionary, value, output_value_models, mode):
        left = input_dictionary["left"]
        right = input_dictionary["right"]

        op = lambda x,y: x + y

        helper = SoftTensorBinaryOperatorHelper()
        helper.process(left, right, op, output_value_models["output"], language=value.language)

        return output_value_models
Пример #2
0
    def execute(self, execution_component, input_dictionary, value,
                output_value_models, mode):
        left = input_dictionary["left"]
        right = input_dictionary["right"]

        if value.operation == "minus":
            op = tf.subtract
        elif value.operation == "add":
            op = tf.add
        elif value.operation == "mul":
            op = tf.multiply
        elif value.operation == "div":
            op = tf.div

        helper = SoftTensorBinaryOperatorHelper()
        helper.process(left,
                       right,
                       op,
                       output_value_models["output"],
                       language="tensorflow")

        return output_value_models