diff --git a/compute_operations/loss_function_operations/L1 Loss Function.json b/compute_operations/loss_function_operations/L1 Loss Function.json new file mode 100644 index 00000000..b7ee7900 --- /dev/null +++ b/compute_operations/loss_function_operations/L1 Loss Function.json @@ -0,0 +1 @@ +{"name":"L1 Loss Function","type":"COMPOSITE_OPERATION","inputs":[{"name":"Actual","primitive_name":"Input"},{"name":"Predicted","primitive_name":"Input (1)"}],"outputs":[{"name":"Output","primitive_name":"Output","flow_state":"UNBOUND"}],"operations":[{"name":"parse_decimal","primitive_name":"parse_decimal","type":"PRIMITIVE_OPERATION","position":{"x":256,"y":44},"inputs":[{"name":"input","primitive_name":"input"}],"outputs":[{"name":"output","primitive_name":"output","flow_state":"UNBOUND"}]},{"name":"Flatten","type":"COMPOSITE_OPERATION","position":{"x":746,"y":44},"inputs":[{"name":"Input","primitive_name":"Input"}],"outputs":[{"name":"Output","primitive_name":"Output","flow_state":"UNBOUND"}],"operations":[{"name":"get_shape","primitive_name":"get_shape","type":"PRIMITIVE_OPERATION","position":{"x":280,"y":43},"inputs":[{"name":"input","primitive_name":"input"}],"outputs":[{"name":"shape","primitive_name":"shape","flow_state":"UNBOUND"}]},{"name":"Product","primitive_name":"product","type":"PRIMITIVE_OPERATION","position":{"x":882,"y":47},"inputs":[{"name":"array","primitive_name":"array"},{"name":"dimension_index","data":0,"shape":[],"type":"INTEGER","primitive_name":"dimension_index","flow_state":"BOOT_SOURCE"},{"name":"keep_dimension","data":false,"shape":[],"type":"BOOLEAN","primitive_name":"keep_dimension","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"prod_result","primitive_name":"prod_result","flow_state":"UNBOUND"}]},{"name":"expand_one_dimension","primitive_name":"expand_one_dimension","type":"PRIMITIVE_OPERATION","position":{"x":1428,"y":44},"inputs":[{"name":"input","primitive_name":"input"},{"name":"dimension_index","data":0,"shape":[],"type":"INTEGER","primitive_name":"dimension_index","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"output","primitive_name":"output","flow_state":"UNBOUND"}]},{"name":"Append Scalar to 1D Array","type":"COMPOSITE_OPERATION","position":{"x":1859,"y":43},"inputs":[{"name":"1D Array","primitive_name":"1D Array"},{"name":"Scalar","data":1,"shape":[],"type":"INTEGER","primitive_name":"Scalar","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"Output","primitive_name":"Output","flow_state":"UNBOUND"}],"operations":[{"name":"expand_one_dimension","primitive_name":"expand_one_dimension","type":"PRIMITIVE_OPERATION","position":{"x":563,"y":328},"inputs":[{"name":"input","shape":[],"type":"INTEGER","primitive_name":"input","flow_state":"BOOT_SINK"},{"name":"dimension_index","data":0,"shape":[],"type":"INTEGER","primitive_name":"dimension_index","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"output","primitive_name":"output","flow_state":"UNBOUND"}]},{"name":"concatenate","primitive_name":"concatenate","type":"PRIMITIVE_OPERATION","position":{"x":1241,"y":45},"inputs":[{"name":"array_1","primitive_name":"array_1"},{"name":"array_2","shape":[1],"type":"INTEGER","primitive_name":"array_2","flow_state":"REF_SINK"},{"name":"dimension_index","data":0,"shape":[],"type":"INTEGER","primitive_name":"dimension_index","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"concatenated_array","primitive_name":"concatenated_array","flow_state":"UNBOUND"}]}],"links":[{"source":{"operation":"this","data":"Scalar"},"sink":{"operation":"expand_one_dimension","data":"input"},"control_points":[]},{"source":{"operation":"this","data":"1D Array"},"sink":{"operation":"concatenate","data":"array_1"},"control_points":[]},{"source":{"operation":"expand_one_dimension","data":"output"},"sink":{"operation":"concatenate","data":"array_2"},"control_points":[]},{"source":{"operation":"concatenate","data":"concatenated_array"},"sink":{"operation":"this","data":"Output"},"control_points":[]}]},{"name":"reshape","primitive_name":"reshape","type":"PRIMITIVE_OPERATION","position":{"x":2347,"y":271},"inputs":[{"name":"input","primitive_name":"input"},{"name":"new_shape","primitive_name":"new_shape"}],"input_order":[1,0],"outputs":[{"name":"output","primitive_name":"output","flow_state":"UNBOUND"}]}],"links":[{"source":{"operation":"this","data":"Input"},"sink":{"operation":"get_shape","data":"input"},"control_points":[]},{"source":{"operation":"this","data":"Input"},"sink":{"operation":"reshape","data":"input"},"control_points":[{"x":714,"y":378}]},{"source":{"operation":"Append Scalar to 1D Array","data":"Output"},"sink":{"operation":"reshape","data":"new_shape"},"control_points":[]},{"source":{"operation":"reshape","data":"output"},"sink":{"operation":"this","data":"Output"},"control_points":[]},{"source":{"operation":"get_shape","data":"shape"},"sink":{"operation":"Product","data":"array"},"control_points":[]},{"source":{"operation":"Product","data":"prod_result"},"sink":{"operation":"expand_one_dimension","data":"input"},"control_points":[]},{"source":{"operation":"expand_one_dimension","data":"output"},"sink":{"operation":"Append Scalar to 1D Array","data":"1D Array"},"control_points":[]}]},{"name":"parse_decimal_1","primitive_name":"parse_decimal","type":"PRIMITIVE_OPERATION","position":{"x":276,"y":322},"inputs":[{"name":"input","primitive_name":"input"}],"outputs":[{"name":"output","primitive_name":"output","flow_state":"UNBOUND"}]},{"name":"Flatten (1)","type":"COMPOSITE_OPERATION","position":{"x":716,"y":322},"inputs":[{"name":"Input","primitive_name":"Input"}],"outputs":[{"name":"Output","primitive_name":"Output","flow_state":"UNBOUND"}],"operations":[{"name":"get_shape","primitive_name":"get_shape","type":"PRIMITIVE_OPERATION","position":{"x":280,"y":43},"inputs":[{"name":"input","primitive_name":"input"}],"outputs":[{"name":"shape","primitive_name":"shape","flow_state":"UNBOUND"}]},{"name":"Product","primitive_name":"product","type":"PRIMITIVE_OPERATION","position":{"x":882,"y":47},"inputs":[{"name":"array","primitive_name":"array"},{"name":"dimension_index","data":0,"shape":[],"type":"INTEGER","primitive_name":"dimension_index","flow_state":"BOOT_SOURCE"},{"name":"keep_dimension","data":false,"shape":[],"type":"BOOLEAN","primitive_name":"keep_dimension","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"prod_result","primitive_name":"prod_result","flow_state":"UNBOUND"}]},{"name":"expand_one_dimension","primitive_name":"expand_one_dimension","type":"PRIMITIVE_OPERATION","position":{"x":1428,"y":44},"inputs":[{"name":"input","primitive_name":"input"},{"name":"dimension_index","data":0,"shape":[],"type":"INTEGER","primitive_name":"dimension_index","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"output","primitive_name":"output","flow_state":"UNBOUND"}]},{"name":"Append Scalar to 1D Array","type":"COMPOSITE_OPERATION","position":{"x":1859,"y":43},"inputs":[{"name":"1D Array","primitive_name":"1D Array"},{"name":"Scalar","data":1,"shape":[],"type":"INTEGER","primitive_name":"Scalar","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"Output","primitive_name":"Output","flow_state":"UNBOUND"}],"operations":[{"name":"expand_one_dimension","primitive_name":"expand_one_dimension","type":"PRIMITIVE_OPERATION","position":{"x":563,"y":328},"inputs":[{"name":"input","shape":[],"type":"INTEGER","primitive_name":"input","flow_state":"BOOT_SINK"},{"name":"dimension_index","data":0,"shape":[],"type":"INTEGER","primitive_name":"dimension_index","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"output","primitive_name":"output","flow_state":"UNBOUND"}]},{"name":"concatenate","primitive_name":"concatenate","type":"PRIMITIVE_OPERATION","position":{"x":1241,"y":45},"inputs":[{"name":"array_1","primitive_name":"array_1"},{"name":"array_2","shape":[1],"type":"INTEGER","primitive_name":"array_2","flow_state":"REF_SINK"},{"name":"dimension_index","data":0,"shape":[],"type":"INTEGER","primitive_name":"dimension_index","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"concatenated_array","primitive_name":"concatenated_array","flow_state":"UNBOUND"}]}],"links":[{"source":{"operation":"this","data":"Scalar"},"sink":{"operation":"expand_one_dimension","data":"input"},"control_points":[]},{"source":{"operation":"this","data":"1D Array"},"sink":{"operation":"concatenate","data":"array_1"},"control_points":[]},{"source":{"operation":"expand_one_dimension","data":"output"},"sink":{"operation":"concatenate","data":"array_2"},"control_points":[]},{"source":{"operation":"concatenate","data":"concatenated_array"},"sink":{"operation":"this","data":"Output"},"control_points":[]}]},{"name":"reshape","primitive_name":"reshape","type":"PRIMITIVE_OPERATION","position":{"x":2347,"y":271},"inputs":[{"name":"input","primitive_name":"input"},{"name":"new_shape","primitive_name":"new_shape"}],"input_order":[1,0],"outputs":[{"name":"output","primitive_name":"output","flow_state":"UNBOUND"}]}],"links":[{"source":{"operation":"this","data":"Input"},"sink":{"operation":"get_shape","data":"input"},"control_points":[]},{"source":{"operation":"this","data":"Input"},"sink":{"operation":"reshape","data":"input"},"control_points":[{"x":714,"y":378}]},{"source":{"operation":"Append Scalar to 1D Array","data":"Output"},"sink":{"operation":"reshape","data":"new_shape"},"control_points":[]},{"source":{"operation":"reshape","data":"output"},"sink":{"operation":"this","data":"Output"},"control_points":[]},{"source":{"operation":"get_shape","data":"shape"},"sink":{"operation":"Product","data":"array"},"control_points":[]},{"source":{"operation":"Product","data":"prod_result"},"sink":{"operation":"expand_one_dimension","data":"input"},"control_points":[]},{"source":{"operation":"expand_one_dimension","data":"output"},"sink":{"operation":"Append Scalar to 1D Array","data":"1D Array"},"control_points":[]}]},{"name":"get_dimension_size","primitive_name":"get_dimension_size","type":"PRIMITIVE_OPERATION","position":{"x":1318,"y":422},"inputs":[{"name":"array","primitive_name":"array"},{"name":"dimension_index","data":0,"shape":[],"type":"INTEGER","primitive_name":"dimension_index","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"dimension_size","primitive_name":"dimension_size","flow_state":"UNBOUND"}]},{"name":"subtract","primitive_name":"subtract","type":"PRIMITIVE_OPERATION","position":{"x":1421,"y":44},"inputs":[{"name":"left_operand","primitive_name":"left_operand"},{"name":"right_operand","primitive_name":"right_operand"}],"outputs":[{"name":"subtracted_result","primitive_name":"subtracted_result","flow_state":"UNBOUND"}]},{"name":"parse_decimal_2","primitive_name":"parse_decimal","type":"PRIMITIVE_OPERATION","position":{"x":1694,"y":422},"inputs":[{"name":"input","primitive_name":"input"}],"outputs":[{"name":"output","primitive_name":"output","flow_state":"UNBOUND"}]},{"name":"divide","primitive_name":"divide","type":"PRIMITIVE_OPERATION","position":{"x":2207,"y":376},"inputs":[{"name":"left_operand","data":1.0,"shape":[],"type":"DECIMAL","primitive_name":"left_operand","flow_state":"BOOT_SOURCE"},{"name":"right_operand","primitive_name":"right_operand"}],"outputs":[{"name":"divided_result","primitive_name":"divided_result","flow_state":"UNBOUND"}]},{"name":"absolute_value","primitive_name":"absolute_value","type":"PRIMITIVE_OPERATION","position":{"x":1868,"y":44},"inputs":[{"name":"target","primitive_name":"target"}],"outputs":[{"name":"result","primitive_name":"result","flow_state":"UNBOUND"}]},{"name":"sum","primitive_name":"sum","type":"PRIMITIVE_OPERATION","position":{"x":2321,"y":43},"inputs":[{"name":"array","primitive_name":"array"},{"name":"dimension_index","data":0,"shape":[],"type":"INTEGER","primitive_name":"dimension_index","flow_state":"BOOT_SOURCE"},{"name":"keep_dimension","data":false,"shape":[],"type":"BOOLEAN","primitive_name":"keep_dimension","flow_state":"BOOT_SOURCE"}],"outputs":[{"name":"sum_result","primitive_name":"sum_result","flow_state":"UNBOUND"}]},{"name":"get_shape","primitive_name":"get_shape","type":"PRIMITIVE_OPERATION","position":{"x":3104,"y":272},"inputs":[{"name":"input","primitive_name":"input"}],"outputs":[{"name":"shape","primitive_name":"shape","flow_state":"UNBOUND"}]},{"name":"broadcast_to_shape","primitive_name":"broadcast_to_shape","type":"PRIMITIVE_OPERATION","position":{"x":3550,"y":378},"inputs":[{"name":"target","primitive_name":"target"},{"name":"shape","primitive_name":"shape"}],"outputs":[{"name":"result","primitive_name":"result","flow_state":"UNBOUND"}]},{"name":"multiply","primitive_name":"multiply","type":"PRIMITIVE_OPERATION","position":{"x":4022,"y":129},"inputs":[{"name":"left_operand","primitive_name":"left_operand"},{"name":"right_operand","primitive_name":"right_operand"}],"outputs":[{"name":"multiplied_result","primitive_name":"multiplied_result","flow_state":"UNBOUND"}]}],"links":[{"source":{"operation":"Flatten (1)","data":"Output"},"sink":{"operation":"get_dimension_size","data":"array"},"control_points":[{"x":1176,"y":488}]},{"source":{"operation":"this","data":"Actual"},"sink":{"operation":"parse_decimal","data":"input"},"control_points":[]},{"source":{"operation":"this","data":"Predicted"},"sink":{"operation":"parse_decimal_1","data":"input"},"control_points":[{"x":212,"y":387}]},{"source":{"operation":"parse_decimal","data":"output"},"sink":{"operation":"Flatten","data":"Input"},"control_points":[]},{"source":{"operation":"parse_decimal_1","data":"output"},"sink":{"operation":"Flatten (1)","data":"Input"},"control_points":[]},{"source":{"operation":"Flatten","data":"Output"},"sink":{"operation":"subtract","data":"left_operand"},"control_points":[]},{"source":{"operation":"Flatten (1)","data":"Output"},"sink":{"operation":"subtract","data":"right_operand"},"control_points":[{"x":1228,"y":155}]},{"source":{"operation":"get_dimension_size","data":"dimension_size"},"sink":{"operation":"parse_decimal_2","data":"input"},"control_points":[]},{"source":{"operation":"parse_decimal_2","data":"output"},"sink":{"operation":"divide","data":"right_operand"},"control_points":[]},{"source":{"operation":"sum","data":"sum_result"},"sink":{"operation":"get_shape","data":"input"},"control_points":[{"x":2765,"y":338}]},{"source":{"operation":"divide","data":"divided_result"},"sink":{"operation":"broadcast_to_shape","data":"target"},"control_points":[]},{"source":{"operation":"get_shape","data":"shape"},"sink":{"operation":"broadcast_to_shape","data":"shape"},"control_points":[{"x":3450,"y":489}]},{"source":{"operation":"broadcast_to_shape","data":"result"},"sink":{"operation":"multiply","data":"right_operand"},"control_points":[{"x":3933,"y":444}]},{"source":{"operation":"sum","data":"sum_result"},"sink":{"operation":"multiply","data":"left_operand"},"control_points":[{"x":2970,"y":195}]},{"source":{"operation":"multiply","data":"multiplied_result"},"sink":{"operation":"this","data":"Output"},"control_points":[]},{"source":{"operation":"subtract","data":"subtracted_result"},"sink":{"operation":"absolute_value","data":"target"},"control_points":[]},{"source":{"operation":"absolute_value","data":"result"},"sink":{"operation":"sum","data":"array"},"control_points":[]}],"global_constants":[]} \ No newline at end of file