6 Star 10 Fork 3

铁成/plpgsql_pg4ml

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
AGPL-3.0

readme 目录

一、pg4ml 机器学习框架安装指引
   1. 安装条件与前置工作
   2. 安装步骤
二、mnist 手写体数字数据集的加工、lenet-5 模型的构建、训练
   1. mnist 手写体数字数据集的加工
   2. lenet-5 模型的构建
   3. lenet-5 模型的训练
   4. 若干说明
三、基于数据库的机器学习框架设计基本原理
   1. schema、广播运算、切片/切块的分组、组播运算、多态伪类型等规约说明
   2. 提升运行效率的建议
   3. 运算库函数规划分类
     1). 矩阵基础运算 
     2). 分类、回归、神经网络
     3). 聚类
     4). 科学计算
     5). 其他函数
   4. 增加算子类型的方法
   5. 增加损失函数类型的方法
四、附录
 (一)、项目目录结构说明
 (二)、数据库对象命名惯常缩写或解释
 (三)、附表
   1. 函数列表
   2. 运算符列表
   3. 存储过程介绍
   4. 神经网络节点支持运算类型

一、pg4ml 机器学习框架安装指引

pg4ml机器学习框架是PostgreSQL的一个扩展,因此在PostgreSQL上安装使用pg4ml非常容易。

1. 安装条件与前置工作

1). linux 环境;

2). 已安装 PostgreSQL v14 (需支持python);

2. 安装步骤

1). 解压项目工程

假定解压至目录 /var/lib/pgsql/pg4ml。

├─/var/lib/pgsql/pg4ml/
│  ├─sql
│  ├─README.md
│  ├─README_en.md
│  ├─pg4ml.control
│  ├─gen_sql_files.sh
│  ├─Makefile
│  ├─...

2). 安装前准备工作:

a. 查找 postgresql 安装目录,假定安装在 /usr/pgsql-14/bin/postgres

find / -name postgres

b. 确认系统变量 PATH 包含 postgresql 安装目录,且包含 pg_config 目录:

which postgres which pg_config export PATH=$PATH:/usr/pgsql-14/bin #如果不包含要添加

c. 如果通过包安装,也有必要安装开发工具包

yum install postgresql14-devel

yum install postgresql14-contrib

3). 编译安装,如下例:

export USE_PGXS=1

make && make install

4). 创建pg4ml扩展

CREATE EXTENSION pg4ml CASCADE;

二、mnist 手写体数字数据集的加工、lenet-5 模型的构建、训练

1. mnist 手写体数字数据集的加工

1). 该模型案例,在项目工程中的如下目录:

./02_nn_model/000000002_mnist_lenet5_batchnorm

2). 在数据库中,创建表 sm_sc.tb_tmp_mnist_0201,用于接收数据集;sql 建表脚本如下:

./02_nn_model/000000002_mnist_lenet5_batchnorm/01_mnist_dataset/01_create_source_data_table.sql

3). 在数据库中,向 sm_sc.tb_tmp_mnist_0201 中插入数据集,sql 脚本如下:

在项目工程中的如下目录 ./02_nn_model/000000002_mnist_lenet5_batchnorm/02_import_source_data/ 中的 .sql 文件: a. mnist_train_part_00001_09992.sql b. mnist_train_part_09993_19992.sql c. mnist_train_part_19993_29992.sql d. mnist_train_part_29993_39992.sql e. mnist_train_part_39993_49992.sql f. mnist_train_part_49993_60000.sql

4). 在数据库中,将数据集编码后,插入 sm_sc.tb_nn_train_input_buff 表 ,sql 脚本如下:

在项目工程中的如下目录 ./02_nn_model/000000002_mnist_lenet5_batchnorm/02_import_to_buffer_table/ 中的 .sql 文件: a. 01_import_dataset.sql

2. lenet-5 模型的构建

1). 在数据库中,创建 lenet-5 神经网络训练任务和模型设计、配置节点的超参数,sql 脚本如下:

在项目工程中的如下目录 ./02_nn_model/000000002_mnist_lenet5_batchnorm/03_create_train_nn_task/ 中的 .sql 文件: a. 01_create_task.sql b. 02_create_nn.sql

3. lenet-5 模型的训练

1). 在数据库中,训练任务的准备工作,设置每组类别的小批量随机数量、规划训练次数,sql 脚本如下:

在项目工程中的如下目录 ./02_nn_model/000000002_mnist_lenet5_batchnorm/04_train/ 中的 .sql 文件: a. 01_prepare.sql

2). 在数据库中,执行训练任务,设置初始学习率、损失函数梯度阈值等任务超参数,sql 脚本如下:

在项目工程中的如下目录 ./02_nn_model/000000002_mnist_lenet5_batchnorm/04_train/ 中的 .sql 文件: a. 02_exec_train.sql

4. 若干说明

1). 步骤6,步骤7,可以交替循环执行,用于中途逐步递增规划次数、调整任务超参数; 2). 训练过程中,查看节点明细情况,sql 脚本举例如下:

./02_nn_model/000000002_mnist_lenet5_batchnorm/04_train/03_track_data_in_nn_node.sql 3). 测试集、验证集验证正确预测结果,sql 脚本举例如下: ./02_nn_model/000000002_mnist_lenet5_batchnorm/05_validation/01_predict.sql

4). 本项目中已经上传了一个训练过的模型:

在项目工程中的如下目录 ./02_nn_model/000000002_mnist_lenet5_batchnorm/06_model_backup/ 即,导出如下两表: a. sm_sc.tb_nn_node,用于继续训练; b. sm_sc.__vt_nn_node,用于测试集、验证集做预测;

三、基于数据库的机器学习框架设计基本原理

1. schema、广播运算、切片/切块的分组、组播运算、多态伪类型等规约说明

pg4ml 定义了名称为 sm_sc 的 schema,用于装载框架对象,避免 postgresql 原生对象名或其他扩展对象名称的冲突;


数组运算函数设计与运算库的规划,考虑到运算粒度因素。运算操作对象可能是以下其中的一种或多种:

1). 矩阵每个元素的内部结构。比如:复矩阵取各元素实部;

2). 两个或多个入参矩阵的一一对应元素。比如:元素、点(广播)四则运算;

3). 入参矩阵的切片。比如:切片聚合;

4). 入参矩阵。比如:转置;

5). 多个入参矩阵聚合。比如:多个矩阵每个对应位置求平均;

6). 三维或四维数组的二维矩阵切片运算后,再堆叠聚合为三维或四维数组。比如:二维图像的多通道运算;

7). 三维或四维数组的运算。比如三维或四维点加、三维卷积;


大部分切片、切块粒度的聚合运算支持分组;

     示例一:矩阵纵向切片的分组求平均,每两个元素一组:

 select 
   sm_sc.fv_aggr_y_avg
   (
     array[[1.5, 11.5]
          ,[2.1, 12.1]
          ,[3.3, 13.3]
          ,[4.3, 14.3]
          ,[5.5, 15.5]
          ,[6.1, 16.1]]
     , 2
   )
 返回:
   array[[1.8, 11.8]
        ,[3.8, 13.8]
        ,[5.8, 15.8]]
 其中,返回结果矩阵的元素 1.8 来自入参矩阵的 (1.5 + 2.1) / 2。

     示例二:矩阵横向切片的分组合计,每三个元素一组:

 select 
   sm_sc.fv_aggr_x_sum
   (
     array[[1.5, 11.5, 4.3, 14.3, 24.3, 34.3]
          ,[2.1, 12.1, 5.5, 15.5, 25.5, 35.5]
          ,[3.3, 13.3, 6.1, 16.1, 26.1, 36.1]]
     , 3
   )
 返回:
   array[[17.3, 72.9]
        ,[19.7, 76.5]
        ,[22.7, 78.3]]
 其中,返回结果矩阵的元素 17.3 来自入参矩阵的 1.5 + 11.5 + 4.3。

     示例三:矩阵切块的分组求平均,每高宽规格为 2*3 的矩阵切块为一组;

 select 
   sm_sc.fv_aggr_slice_max
   (
     array[[2.3, 5.1, 8.2, 2.56, 3.33, -1.9]
          ,[3.25, 6.4, 6.6, 6.9, -2.65, -4.6]
          ,[-2.3, 5.1, -8.2, 2.56, -3.33, -1.9]
          ,[3.25, -6.4, -6.6, 6.9, -2.65, -4.6]
          ]
     , array[2, 3]
   )
 返回:
   array[[8.2, 6.9]
        ,[5.1, 6.9]]
 其中,返回结果矩阵的元素 8.2 来自入参矩阵的 greatest(2.3, 5.1, 8.2, 3.25, 6.4, 6.6)。

矩阵双目运算的入参矩阵组播,适用于加减乘除、幂运算、对数运算和矩阵乘法等,即将背景矩阵在滑动窗口内的子矩阵与窗口矩阵运算。其滑动窗口原理与卷积的滑动窗口类似。

     示例一:卷减 sm_sc.fv_conv_sub

 select 
   sm_sc.fv_conv_sub
   (
     array[[1.0,2.0,3.0,4.0,5.0,6.0,7.0]
          ,[10.0,20.0,30.0,40.0,50.0,60.0,70.0]
          ,[100.0,200.0,300.0,400.0,500.0,600.0,700.0]
          ,[-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
          ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
          ]
    , array[[1.0, 2.0, 3.0]
           ,[-1.0, -2.0, -3.0]
           ,[3.0, -2.0, 1.0]]
    , array[2, 2]
   )
 返回:
   array[[0.0, 0.0, 0.0, 2.0, 2.0, 2.0, 4.0, 4.0, 4.0]
        ,[11.0, 22.0, 33.0, 31.0, 42.0, 53.0, 51.0, 62.0, 73.0]
        ,[97.0, 202.0, 299.0, 297.0, 402.0, 499.0, 497.0, 602.0, 699.0]
        ,[99.0, 198.0, 297.0, 299.0, 398.0, 497.0, 499.0, 598.0, 697.0]
        ,[0.0, 0.0, 0.0, -2.0, -2.0, -2.0, -4.0, -4.0, -4.0]
        ,[-13.0, -18.0, -31.0, -33.0, -38.0, -51.0, -53.0, -58.0, -71.0]]
 其中,入参一为背景矩阵,入参二为窗口矩阵,入参三为纵向与横向的滑动步长。

对于不服从交换律的某类二元运算,比如矩阵组播减法,组播运算存在卷减与反卷减两种运算。其中卷减运算的第一入参为背景矩阵,第二入参为窗口矩阵;而反卷减运算的第一入参为窗口矩阵,第二入参为背景矩阵;

     示例二:反卷减 sm_sc.fv_conv_de_sub

 select 
   sm_sc.fv_conv_de_sub
   (
     array[[1.0, 2.0, 3.0]
          ,[-1.0, -2.0, -3.0]
          ,[3.0, -2.0, 1.0]]
     , array[[1.0,2.0,3.0,4.0,5.0,6.0,7.0]
            ,[10.0,20.0,30.0,40.0,50.0,60.0,70.0]
            ,[100.0,200.0,300.0,400.0,500.0,600.0,700.0]
            ,[-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
            ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
            ]
    , array[2, 2]
   )
 返回:
   array[[0.0, 0.0, 0.0, -2.0, -2.0, -2.0, -4.0, -4.0, -4.0]
        ,[-11.0, -22.0, -33.0, -31.0, -42.0, -53.0, -51.0, -62.0, -73.0]
        ,[-97.0, -202.0, -299.0, -297.0, -402.0, -499.0, -497.0, -602.0, -699.0]
        ,[-99.0, -198.0, -297.0, -299.0, -398.0, -497.0, -499.0, -598.0, -697.0]
        ,[0.0, 0.0, 0.0, 2.0, 2.0, 2.0, 4.0, 4.0, 4.0]
        ,[13.0, 18.0, 31.0, 33.0, 38.0, 51.0, 53.0, 58.0, 71.0]]
 其中,入参一为窗口矩阵,入参二为背景矩阵,入参三为纵向与横向的滑动步长。

本套矩阵基础运算函数库,带有“元素、点(广播)”说明的函数,通常支持广播功能。包括如下场景:

1). 单元素值与一维数组(入参顺序不分先后);

2). 单元素值与二维数组(入参顺序不分先后);

3). 一维数组与二维数组(入参顺序不分先后);

4). 二维数组单行与二维数组(入参顺序不分先后);

5). 二维数组单列与二维数组(入参顺序不分先后);

6). 单元素值与三维数组(入参顺序不分先后);

7). 单元素值与四维数组(入参顺序不分先后);

8). 三维切片与三维数组(入参顺序不分先后);

9). 四维切片与四维数组(入参顺序不分先后);

其中3)、4)结果等价。

对于构建神经网络的算子而言,通常也支持双目入参中,其中一个入参的若干维度长度为 1 的广播功能,但不支持维度数不同的广播功能。即以上第 4), 5), 8), 9) 所述入参规格。


pg4ml 矩阵运算函数库的很多函数,利用 postgresql 的伪类型特性,使用 anyarray 为入参和出参类型,类似 java 泛型或 c++ 类模板,以支持这些函数对任何元素类型的矩阵的多态。


2. 提升运行效率的建议

1). 关闭调试审查开关

pg4ml 矩阵运算函数库的很多函数,对数组类型参数的维度、各维度长度做审查。

该审查可以通过设置 session 变量 pg4ml._v_is_debug_check 来开启。该审查默认为不生效。

set session pg4ml._v_is_debug_check = '1';   -- 开启
set session pg4ml._v_is_debug_check = '0';   -- 关闭
select current_setting('pg4ml._v_is_debug_check', true)   -- 查看变量值

2). 矩阵运算库优化:

在当前版本,矩阵乘法通过 pg 的扩展 pgplpython3 调用 numpy 实现。

建议也可以使用运行效率更高的其他编程语言矩阵运算库,比如 openblas;

3). 训练过程多线程:

a. 调整系统内核参数 /etc/sysctl.conf, /etc/security/limits.conf, 为 pg 数据库分配更多系统资源;

b. 设置 pg 并行参数

min_parallel_table_scan_size
min_parallel_index_scan_size
force_parallel_mode
max_parallel_workers_per_gather
parallel_setup_cost
parallel_tuple_cost

4). 分布式计算改造:

建议可以对神经网络节点的 lambda 调用改造为 rdd 或 mpp;

5). 使用 GPU:

建议可以创建 pg_strom 扩展,引入 GPU 计算;


3. 运算库函数规划分类

1). 矩阵基础运算

具体运算库函数分类规划:

fn_a. 矩阵元素的算数、比较、进位、拼接、布尔、位运算、复运算、广播运算:

fn_b. 矩阵乘法、转置、翻转、旋转、拼接:

fn_c. 矩阵的构造、采样、替换、填充、字符匹配、随机生成、去壳(缘于pg13版本暂不支持 array 高维切片):

fn_d. 矩阵的三角函数广播运算:

fn_f. 矩阵的切片粒度聚合、矩阵粒度聚合、以某切片值排序、切片粒度定位极值位置:


2). 分类、回归、神经网络

1). table - sm_sc.tb_nn_node / sm_sc.__vt_nn_node(前者用于训练,后者用于测试和验证)、sm_sc.tb_nn_path 表,用于承载深度神经网络的 node 和 path 结构;

2). table - sm_sc.tb_nn_train_input_buff ,用于公共接收训练集;

3). table - sm_sc.tb_classify_task ,用于部署和管理训练任务;

4). 定义了机器学习、矩阵运算的相关函数,用于实时执行简单运算或原子运算;

具体运算函数库分类规划:

fn_g. 机器学习的重分布函数,包括标准化、规范化、归一化、中心化等等:

fn_h. 机器学习的激活函数:

fn_j. 机器学习的卷积、池化、矩阵组播:

fn_k. 机器学习的 lambda:

fn_l. 机器学习的神经网络专用:

fn_m. 机器学习的编码、解码:

fn_n. 机器学习的损失函数:

fn_q. 导数公式推导:

fn_r. 复杂函数求导:

5). procedure - sm_sc.prc_nn_prepare / sm_sc.prc_nn_train,用于深度神经网络训练任务的准备和执行;

a. 执行 sm_sc.prc_nn_prepare 之前,可以通过更新 input buff_slice_rand_pick 节点的 node_fn_asso_value,调整随机小批量的每个类别采样数量; b. sm_sc.prc_nn_train 采用了 adam 梯度下降算法

6). procedure - sm_sc.prc_linear_regression / sm_sc.prc_logistic_regression,用于线性回归、逻辑分类的浅层训练任务的准备和执行;

当一轮准备和执行完成,可以调高 sm_sc.prc_nn_prepare 的次数参数,接续准备和执行;

7). function - sm_sc.ft_nn_in_out,用于输入测试集或验证集的单条数据,输出测试或验证结果;


3). 聚类

1). 硬聚类 - kmeans++

a. table - sm_sc.tb_cluster_task ,用于部署和管理训练任务; b. procedure - sm_sc.prc_kmeans_pp,用于执行 kmeans++ 任务;

2). 软聚类 - dbscan

a. table - sm_sc.tb_cluster_task ,用于部署和管理训练任务; b. procedure - sm_sc.prc_dbscan_pp,用于执行 dbscan 任务;


4). 科学计算

1). 定义了科学计算的相关函数,用于实时执行简单运算或原子运算;

具体运算函数库分类规划:

fn_e. 波形处理:

fn_i. 计算图的 json 序列化、反序列化:

fn_o. 复数运算:

fn_s. 线性代数:


5). 其他函数

fn_p. 对 postgresql 补充的 udf 公共函数: fn_q. (二次开发)用户自定义算子函数:

该类函数由用户自行定义、扩展求导、注册算子,被统一的 lambda 扩展接口调用。

fn_r. (二次开发)用户自定义复合算子函数:

该类函数由用户自行定义,仅以 json 配置的形式,辅助模型的设计构建,不参与模型训练与部署。

4. 增加算子类型的方法

以下是框架内定义算子的指引:

1). 编写算子函数及其导数,规划存放在(如果有求导)源码所属的目录;

以卷积为例, 函数源码存放路径:

plpgsql_pg4ml/sql/03_function/04_machine_learn/06_conv_pool/sm_sc.fv_conv_2d_v_im2col.sql

函数导数源码存放路径:

plpgsql_pg4ml/sql/03_function/04_machine_learn/06_conv_pool/01_delta/sm_sc.fv_d_conv_2d_dloss_dindepdt_1_ex.sql
plpgsql_pg4ml/sql/03_function/04_machine_learn/06_conv_pool/01_delta/sm_sc.fv_d_conv_2d_dloss_dindepdt_2.sql
plpgsql_pg4ml/sql/03_function/04_machine_learn/06_conv_pool/01_delta/sm_sc.fv_d_conv_2d_dloss_dindepdt_3.sql

2). 定义该新增算子的 lambda 名称;

以卷积为例,卷积的 lambda 名称为 '05_conv_prod_mx'。

3). 在字典表中,设定该算子的超参数数组字段各个元素的配置结构与含义;

字典表位置:

plpgsql_pg4ml/sql/06_data_initial/table_data_initial.sql
  sm_sc.tb_dic_enum 表的 enum_name = 'node_fn_asso_value' 的记录

以卷积为例,函数超参数的配置结构与含义:

select trim('window_len_heigh__1d         '), trim('滑动窗口高度规格                   '), trim('05_conv_prod_mx        '),  1, numrange(2.0, 2.0, '[]') union all
select trim('stride__1d                   '), trim('纵向和横向步长                     '), trim('05_conv_prod_mx        '),  2, numrange(4.0, 5.0, '[]') union all
select trim('padding__1d                  '), trim('上下左右补齐行数/列数              '), trim('05_conv_prod_mx        '),  3, numrange(6.0, 9.0, '[]') union all
select trim('padding_value__1d            '), trim('补齐填充元素值                     '), trim('05_conv_prod_mx        '),  4, numrange(10.0, 10.0, '[]') union all

4). 在字典表中,设定该算子的其他特征配置;

以卷积为例,

plpgsql_pg4ml/sql/06_data_initial/table_data_initial.sql
  sm_sc.tb_dic_enum 表的 enum_name = 'node_fn_type' 的记录
  sm_sc.tb_dic_enum 表的 enum_name = 'node_fn_type_delta' 的记录
  sm_sc.tb_dic_enum 表的 enum_name = 'node_fn_type_delta_method' 的记录

5). 在神经网络有关的 lambda 函数中,注册该算子以及其导数的匿名调用;

lamdda 函数的路径:

plpgsql_pg4ml/sql/03_function/04_machine_learn/07_lambda/sm_sc.fv_lambda_arr_len.sql
plpgsql_pg4ml/sql/03_function/04_machine_learn/07_lambda/sm_sc.fv_lambda_arr.sql
plpgsql_pg4ml/sql/03_function/04_machine_learn/07_lambda/sm_sc.fv_lambda_arr_ddepdt_dindepdt.sql
plpgsql_pg4ml/sql/03_function/04_machine_learn/07_lambda/sm_sc.fv_lambda_arr_dloss_dindepdt.sql

其中, a. 求导 lambda,根据新增算子的求导方法,选取 fv_lambda_arr_ddepdt_dindepdt 和 fv_lambda_arr_dloss_dindepdt 其中之一; b. fv_lambda_arr_len 中,可能不必要配置新增算子类型。对单目运算有缺省的审计策略,即因变量数组规格等于唯一自变量数组的规格;

6). 如果为该算子函数制定运算符,在以下源码文件中创建;

数组运算符源码路径:

plpgsql_pg4ml/sql/09_operator/operator_mx.sql

7). 在 readme.md 文档以及多语言版本中,添加该新增算子的相关说明;

a. 算子函数列表:

四、附录 -> (三)、附表 -> 1. 函数列表; b. 算子的求导函数列表: 四、附录 -> (三)、附表 -> 1. 函数列表 -> r. 一些矩阵运算求导; c. 如果制定了运算符列表: 四、附录 -> (三)、附表 -> 2. 运算符列表; d. 神经网络节点类型列表: 四、附录 -> (三)、附表 -> 4. 神经网络节点支持运算类型;

8). 将上述代码改动和配置数据初始化部分,增量部署在 pg4ml 框架所在数据库;

以下是自定义算子的指引:

9). pg4ml 深度学习框架中,规约自定义算子以"81_"为命名前缀,建议存放在以下路径中:

plpgsql_pg4ml/sql/03_function/81_ufv/81_xxxxx/sm_sc.ufv_xxxx.sql

10). 在字典表中,设定该算子的其他特征配置;

以卷积为例,

plpgsql_pg4ml/sql/06_data_initial/01_ufv_data_initial_81_xxxxx.sql
  sm_sc.tb_dic_enum 表的 enum_name = 'node_fn_asso_value' 的记录
  sm_sc.tb_dic_enum 表的 enum_name = 'node_fn_type' 的记录
  sm_sc.tb_dic_enum 表的 enum_name = 'node_fn_type_delta' 的记录
  sm_sc.tb_dic_enum 表的 enum_name = 'node_fn_type_delta_method' 的记录

11). 该命名前缀的算子可被以下路径的 lambda 函数识别并匿名调用;

plpgsql_pg4ml/sql/03_function/81_ufv/sm_sc.ufv_lambda_...

12). 与框架内算子类似,自定义算子也需要配套的求导函数、配置和文档说明,建议独立存放在同一路径中:

plpgsql_pg4ml/sql/03_function/81_ufv/readme_udf_lambda.md

5. 增加损失函数类型的方法

1). 编写损失函数及其导数,规划存放在损失函数源码所属的目录;

以最小二乘法损失函数为例, 函数源码存放路径:

plpgsql_pg4ml/sql/03_function/04_machine_learn/10_loss_fn/sm_sc.fv_loss_least_square.sql

函数导数源码存放路径:

plpgsql_pg4ml/sql/03_function/04_machine_learn/10_loss_fn/01_delta/sm_sc.fv_dloss_dz_least_square.sql

2). 定义该新增损失函数类型的 lambda 名称;

以最小二乘法损失函数为例,其 lambda 名称代号为 '101'。

3). 在字典表中,设定该算子的损失函数解释说明;

字典表位置:

plpgsql_pg4ml/sql/06_data_initial/table_data_initial.sql
  sm_sc.tb_dic_enum 表的 enum_name = 'loss_fn_type' 的记录

以最小二乘法损失函数为例,函数超参数的配置结构与含义:

select 
  'loss_fn_type'      as enum_name, 
  '101'               as enum_key, 
  '最小二乘法'        as enum_value, 
  row_number() over() as enum_order

4). 在神经网络有关的 lambda 函数中,注册该算子以及其导数的匿名调用;

lamdda 函数的路径:

plpgsql_pg4ml/sql/03_function/04_machine_learn/07_lambda/sm_sc.fv_lambda_loss.sql
plpgsql_pg4ml/sql/03_function/04_machine_learn/07_lambda/sm_sc.fv_lambda_dloss_dz.sql

5). 将上述代码改动和配置数据初始化部分,增量部署在 pg4ml 框架所在数据库;

四、附录

(一)、项目目录结构说明

├─plpgsql_pg4ml
│  ├─sql
│  │  ├─01_type_schema_extension                       : 创建 schema 和 extension
│  │  │  └─04_create_type                              : 创建类型
│  │  │     ├─01                                       : 此处序号仅为了控制部署执行顺序
│  │  │     │  ├─01_typ                                : 创建普通类型
│  │  │     │  └─02___type                             : 创建全局内部使用类型
│  │  │     └─02                                       : 此处序号仅为了控制部署执行顺序
│  │  ├─02_table_view                                  : 创建 table 和 view
│  │  ├─03_function                                    : 创建 function
│  │  │  ├─03_matrix                                   : 矩阵相关函数
│  │  │  │  ├─01_calcu_bit_concat_compare              : 算数运算、位运算、拼接、比较
│  │  │  │  │  └─01_delta                              : 对应的求导函数
│  │  │  │  ├─03_prod_trans_turn_mirror                : 矩阵乘法、变换、转换、翻转
│  │  │  │  │  └─01_delta                              : 对应的求导函数
│  │  │  │  ├─04_construct_sample_match_replace        : 构建、采样、匹配、替换
│  │  │  │  │  └─01_delta                              : 对应的求导函数
│  │  │  │  ├─05_trigono                               : 三角运算
│  │  │  │  │  └─01_delta                              : 对应的求导函数
│  │  │  │  ├─06_wave                                  : 波形变换
│  │  │  │  └─09_slice_aggr_ord                        : 切片、聚合、排序
│  │  │  │     │─01_fv                                 : 返回类型的函数
│  │  │  │     │  └─01_delta                           : 对应的求导函数
│  │  │  │     └─02_fa                                 : 聚合函数
│  │  │  │        └─01_delta                           : 对应的求导函数
│  │  │  ├─04_machine_learn                            : 机器学习相关函数
│  │  │  │  ├─01_udf_calcu                             : 自定义简单类型函数
│  │  │  │  │  └─01_delta                              : 对应的求导函数
│  │  │  │  ├─02_redistribute                          : 标准化函数
│  │  │  │  │  └─01_delta                              : 对应的求导函数
│  │  │  │  ├─03_grad_reduction                        : 导数推导
│  │  │  │  ├─04_activate                              : 激活函数
│  │  │  │  │  └─01_delta                              : 对应的求导函数
│  │  │  │  ├─05_computational_graph_json              : json 类型的计算图
│  │  │  │  ├─06_conv_pool                             : 卷积、池化、矩阵组播
│  │  │  │  │  └─01_delta                              : 对应的求导函数
│  │  │  │  ├─07_lambda                                : lambda 函数
│  │  │  │  ├─08_nn                                    : 神经网络
│  │  │  │  ├─09_encode_decode                         : 编码、解码
│  │  │  │  └─10_loss_fn                               : 损失函数
│  │  │  ├─05_complex                                  : 复数
│  │  │  │  ├─01_calcu                                 : 复数初等运算函数
│  │  │  │  ├─02_alian                                 : 复数初等运算函数别名
│  │  │  │  └─03_aggr                                  : 复数聚合运算
│  │  │  ├─06_common                                   : 通用性函数
│  │  │  ├─07_math_array                               : 线性代数
│  │  │  ├─81_ufv                                      : 自定义算子
│  │  │  └─83_ufv_conbine                              : 自定义复合算子
│  │  ├─04_procedure                                   : 创建存储过程
│  │  │  └─01_machine_learn                            : 机器学习
│  │  │     ├─01_classify_regress                      : 分类、回归
│  │  │     ├─02_neural_network                        : 神经网络
│  │  │     └─03_cluster                               : 聚类
│  │  ├─06_data_initial                                : 初始化数据
│  │  ├─09_operator                                    : 创建运算符
│  │  └─10_install                                     : 安装部署
│  └─02_nn_model                                       : 模型
│     ├─000000002_mnist_lenet5_batchnorm               : mnist 数据集,lenet-5神经网络、BN 标准化
│     │  ├─01_mnist_dataset                            : mnist 数据集
│     │  ├─02_import_to_buffer_table                   : 导入 buff 表
│     │  ├─03_create_train_nn_task                     : 创建神经网络结构和训练任务
│     │  ├─04_train                                    : 执行训练
│     │  ├─05_validation                               : 验证
│     │  └─06_model_backup                             : 导出训练模型
│     ├─00xxxxxxx_xxxx                                 : 其他模型
│     │  ├─01_xxx_dataset                              : xxx 数据集
│     │  ├─...                                         : 模型其他目录...
│     ├─...                                            : 其他模型...

(二)、数据库对象命名惯常缩写或解释

  • _ : 做为命名前缀,意味着执行体(包括代码块,函数,存储过程)内部使用的临时对象
  • __ : 做为命名前缀,意味着全局内部使用对象
  • typ_ : type,类型对象
  • sm_ : schema,模式,类似于逻辑概念的 database 或 tablespace
  • seq_ : sequence,序列
  • tb_ : table,表
  • idx_ : index,索引
  • vw_ : view,普通视图
  • xv_ : x_view,带有关联、复杂运算的视图
  • fv_ : function_value,返回数据类型数值的函数
  • ft_ : function_table,返回表的函数
  • fa_ : function_aggregate,聚合函数
  • prc_ : procedure,存储过程
  • m_ : member,(类型)成员
  • is_ : bool 判断
  • i_ : input,输入变量
  • o_ : output,输出变量
  • v_ : val,变量
  • cte_ : common_table_expression,公共表达式
  • enum_ : enum,枚举
  • sess_ : session,会话
  • _no : number,编号
  • _id : id,标识
  • _a_ : alias,别名
  • _cur_ : cursor,游标、迭代器、下标访问遍历
  • _co_ : cooperative,合作的,配套的
  • _asso_ : associate,协作的,副的
  • _ex_ : extra,额外的
  • _2_ : to,"指向"关系
  • _4_ : for,"用于"关系
  • _l_ : long,长类型
  • _s_ : short,短类型
  • _tmp_ : temp,临时对象
  • _ord_ : order,排序的
  • _aggr_ : aggregate,聚合的
  • _idx_ : position,定位的,检索的
  • _dic_ : dictionary,字典的
  • _opr_ : operator,运算符的
  • _sum_ : summary,汇总的
  • _lsum_ : low_summary,低粒度汇总的
  • _hsum_ : high_summary,高粒度汇总的
  • _cfg_ : configure,配置的
  • _fn_ : function,函数的
  • _time_ : time,时间有关的
  • _lang_ : language,语言有关的
  • _gis_ : geographic_information_system,地理有关的,地点有关的,地图有关的
  • _sys_ : system,系统配套的
  • _map_ : map,映射关系
  • _snap_ : snapshot,快照,不随时间线性变化的清单
  • _trs_ : transaction,流水,随时间线性变化的清单
  • _ods_ : operational_data_store,(业务系统)主数据
  • _dw_ : data_warehouse,数据仓库,数据加工,数据分析处理过程
  • _dm_ : data_market,数据集市,成品分析数据
  • _sour_ : source,源
  • _tar_ : target,目标
  • _his_ : history,历史(数据)
  • _slice_ : slice,(数组)切片粒度
  • _chunk_ : chunk,(数组)切块粒度
  • _mx_ : matrix,(数组)粒度
  • _arr_ : array,数组
  • _y_ : y 轴,数组的第一维度。如果是二维数组,也即纵向方向
  • _x_ : x 轴,数组的第二维度。如果是二维数组,也即横向方向
  • _x3_ : 数组的第三维度。
  • _x4_ : 数组的第四维度。
  • _heith_ : 数组的倒数第二维度,通常是视觉操作平面切片的高度维度
  • _width_ : 数组的倒数第一维度,通常是视觉操作平面切片的宽度维度
  • _mx_ : matrix,矩阵,也即多维数组
  • _1d_ : 1st_dimension,一维(数组)
  • _2d_ : 2nd_dimension,二维(数组)
  • _3d_ : 3rd_dimension,三维(数组)
  • _4d_ : 4th_dimension,四维(数组)
  • _ele_ : element,(数组)元素
  • _area_ : area,指定区域
  • _pos_ : position,指定位置
  • _nn_ : neural_network,神经网络
  • _fore_ : fore,(神经网络)前向
  • _back_ : back,(神经网络)反向
  • _loss_ : loss,损失函数相关的
  • _d_ : delta,求导
  • _de_ : de,否、非、相反的
  • _ne_ : negative,负数的
  • _nega_ : negative,负数的
  • _posi_ : positive,正数的
  • _bi_ : bis,两个的,成双的
  • _tri_ : triangular,三个的,三角的
  • _depdt_ : dependent,因变量的,函数结果
  • _indepdt_ : independent,自变量的,函数入参的
  • _redistr_ : redistribution,重分布,包括标准换、规范化、归一化、中心化有关的
  • _45_ : degree of angle 45,(旋转)角度 45°
  • _90_ : degree of angle 90,(旋转)角度 90°
  • _180_ : degree of angle 180,(旋转)角度 180°
  • _dddi_ : delta dependent / delta independent,因变量对自变量的导数
  • _dldi_ : delta loss / delta independent,损失函数对自变量的导数

(三)、附表

1. 函数列表

a. 矩阵元素的算数、比较、进位、拼接、布尔、位运算、复运算、广播运算:

函数名 函数说明 调用举例
sm_sc.fv_opr_add 元素、点(广播)加。
入参:
  1. 加数1;
  2. 加数2;
select
  sm_sc.fv_opr_add
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 5.1]]
  );

返回:
  array[[-1.3, 2.5],[-2.4, 2.1]]
sm_sc.fv_opr_sub 元素、点(广播)减。
入参:
  1. 被减数;
  2. 减数;
select
  sm_sc.fv_opr_sub
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 5.1]]
  );

返回:
  array[[3.9, -20.1],[6.8, -8.1]]
sm_sc.fv_opr_sub 元素、点(广播)相反数。
入参:
  1. 原数组;
select
  sm_sc.fv_opr_sub
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  );

返回:
  array[[-1.3,8.8],[-2.2,3.0]]
sm_sc.fv_opr_mul 元素、点(广播)乘。
入参:
  1. 乘数1;
  2. 乘数2;
select
  sm_sc.fv_opr_mul
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 5.1]]
  );

返回:
  array[[-3.38, -99.44],[-10.12, -15.30]]
sm_sc.fv_opr_div 元素、点(广播)除。
入参:
  1. 被除数;
  2. 除数;
select
  sm_sc.fv_opr_div
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 5.1]]
  );

返回:
  array[[-0.5, -0.77876],[-0.47826, -0.58824]]
sm_sc.fv_opr_div 元素、点(广播)倒数。
入参:
  1. 原数组;
select
  sm_sc.fv_opr_div
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  );

返回:
  array[[0.76923, -0.11364],[0.45455, -0.33333]]
sm_sc.fv_opr_mod 元素、点(广播)求余。
入参:
  1. 被除数;
  2. 除数;
select
  sm_sc.fv_opr_mod
  (
    array[[10, -29],[12, -33]]
  , array[[-3, 11],[-5, 5]]
  );

返回:
  array[[1, -7],[2, -3]]
sm_sc.fv_opr_pow 元素、点(广播)幂。
入参:
  1. 底数;
  2. 指数;
select
  sm_sc.fv_opr_pow
  (
    array[[1.3, 8.8],[2.2, 3.0]]
  , array[[-2.6, 1.3],[-4.6, 5.1]]
  );

返回:
  array[[0.50553, 16.89770],[0.02660, 271.21793]]
sm_sc.fv_opr_exp 元素、点(广播)自然常数幂。
入参:
  1. 指数;
select
  sm_sc.fv_opr_exp
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  );

返回:
  array[[3.66930, 0.00015],[9.02501, 0.04979]]
sm_sc.fv_opr_log 元素、点(广播)对数。
入参:
  1. 底数;
  2. 真数;
select
  sm_sc.fv_opr_log
  (
    array[[1.3, 8.8],[2.2, 3.0]]
  , array[[2.6, 11.3],[4.6, 5.1]]
  );

返回:
  array[[3.64193, 1.11498],[1.93550, 1.48300]]
sm_sc.fv_opr_ln 元素、点(广播)自然对数。
入参:
  1. 真数;
select
  sm_sc.fv_opr_ln
  (
    array[[1.3, 8.8],[2.2, 3.0]]
  );

返回:
  array[[0.26236, 2.17475],[0.78846, 1.09861]]
sm_sc.fv_opr_or 元素、点(广播)位或、逻辑或操作。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_or
  (
    array[[true, false],[true, false]]
  , array[[false, true],[false, true]]
  );

返回:
  array[[true, true],[true, true]]
--------------------------
select
  sm_sc.fv_opr_or
  (
    array[[B'010', B'011'],[B'101', B'011']]
  , array[[B'011', B'101'],[B'011', B'101']]
  );

返回:
  array[[B'011', B'111'],[B'111', B'111']]
sm_sc.fv_opr_and 元素、点(广播)位与、逻辑且操作。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_and
  (
    array[[true, false],[true, false]]
  , array[[false, true],[false, true]]
  );

返回:
  array[[false, false],[false, false]]
--------------------------
select
  sm_sc.fv_opr_and
  (
    array[[B'010', B'011'],[B'101', B'011']]
  , array[[B'011', B'101'],[B'011', B'101']]
  );

返回:
  array[[B'010', B'001'],[B'001', B'001']]
sm_sc.fv_opr_not 元素、点(广播)位非、逻辑否操作。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_not
  (
    array[[true, false],[true, false]]
  );

返回:
  array[[false, true],[false, true]]
--------------------------
select
  sm_sc.fv_opr_not
  (
    array[[B'010', B'011'],[B'101', B'011']]
  );

返回:
  array[[B'101', B'100'],[B'010', B'100']]
sm_sc.fv_opr_is_regexp_match 元素、点(广播)文本正则是否匹配。
入参:
  1. 原文本矩阵;
  2. 正则表达式矩阵;
select
  sm_sc.fv_opr_is_regexp_match
  (
    array[['abbbbbc122223', 'abc123'],['abc123', 'ac13']]
  , array[['a.c', '1.*?3'],['1.3', 'a.*?c']]
  );

返回:
  array[[false, true],[true, true]]
sm_sc.fv_opr_conjugate 元素、点(广播)复元素共轭。
入参:
  1. 原数组;
select
  sm_sc.fv_opr_conjugate
  (
    array[[(12.3, -25.1), (-2.56, 3.25)]
             ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[]
  );

返回:
  array[[(12.3, 25.1), (-2.56, -3.25)]
           ,[(12.3, 0.0), (0.0, -3.25)]] :: sm_sc.typ_l_complex[]
sm_sc.fv_opr_conjugate_i 复矩阵共轭。
入参:
  1. 原数组;
select
  sm_sc.fv_opr_conjugate_i
  (
    array[[(12.3, -25.1), (-2.56, 3.25)]
             ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[]
  );

返回:
  array[[(12.3, 25.1), (12.3, 0.0)]
           ,[(-2.56, -3.25), (0.0, -3.25)]] :: sm_sc.typ_l_complex[]
sm_sc.fv_opr_real 元素、点(广播)复元素实部。
入参:
  1. 原数组;
select
  sm_sc.fv_opr_real
  (
    array[[(12.3, -25.1), (-2.56, 3.25)]
             ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[]
  );

返回:
  array[[12.3, -2.56],[12.3, 0.0]]
sm_sc.fv_opr_imaginary 元素、点(广播)复元素虚部。
入参:
  1. 原数组;
select
  sm_sc.fv_opr_imaginary
  (
    array[[(12.3, -25.1), (-2.56, 3.25)]
             ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[]
  );

返回:
  array[[-25.1, 3.25],[0.0, 3.25]]
sm_sc.fv_opr_conjugate_45 元素、点(广播)复元素实虚对换。
入参:
  1. 原数组;
select
  sm_sc.fv_opr_conjugate_45
  (
    array[[(12.3, -25.1), (-2.56, 3.25)]
             ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[]
  );

返回:
  array[[(-25.1, 12.3), (3.25, -2.56)]
           ,[(0.0, 12.3), (3.25, 0.0)]] :: sm_sc.typ_l_complex[]
sm_sc.fv_opr_xor 元素、点(广播)位异或、逻辑异或操作。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_xor
  (
    array[[true, true],[true, true]]
  , array[[false, true],[false, true]]
  );

返回:
  array[[true, true],[true, true]]
--------------------------
select
  sm_sc.fv_opr_xor
  (
    array[[B'010', B'011'],[B'101', B'011']]
  , array[[B'011', B'101'],[B'011', B'101']]
  );

返回:
  array[[B'001', B'110'],[B'110', B'110']]
sm_sc.fv_opr_xnor 元素、点(广播)位同或、逻辑同或操作。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_xnor
  (
    array[[true, false],[true, false]]
  , array[[false, true],[false, true]]
  );

返回:
  array[[false, false],[false, false]]
--------------------------
select
  sm_sc.fv_opr_xnor
  (
    array[[B'010', B'011'],[B'101', B'011']]
  , array[[B'011', B'101'],[B'011', B'101']]
  );

返回:
  array[[B'110', B'001'],[B'001', B'001']]
sm_sc.fv_opr_concat 元素、点(广播)拼接。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_concat
  (
    array[['abc', 'efgh'],['hijk', 'lm']]
  , array[['no', 'pqr'],['stu', 'vwxyz']]
  );

返回:
  array[['abcno', 'efghpqr'],['hijkstu', 'lmvwxyz']]
sm_sc.fv_opr_shift_left 元素、点(广播)位左移。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_shift_left
  (
    array[[B'010', B'011'],[B'101', B'011']]
  , array[[1, 2],[-1, -2]]
  );

返回:
  array[[B'100', B'100'],[B'010', B'000']]
sm_sc.fv_opr_shift_right 元素、点(广播)位右移。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_shift_right
  (
    array[[B'010', B'011'],[B'101', B'011']]
  , array[[1, 2],[-1, -2]]
  );

返回:
  array[[B'001', B'000'],[B'010', B'100']]
sm_sc.fv_opr_is_equal 元素、点(广播)相等判断。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_is_equal
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, -8.8],[2.2, 5.1]]
  );

返回:
  array[[false, true],[true, false]]
sm_sc.fv_opr_is_less 元素、点(广播)小于判断。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_is_less
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 5.1]]
  );

返回:
  array[[false, true],[false, true]]
sm_sc.fv_opr_is_greater 元素、点(广播)大于判断。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_is_greater
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 3.0]]
  );

返回:
  array[[true, false],[true, false]]
sm_sc.fv_opr_is_less_ex 元素、点(广播)小于等于判断。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_is_less_ex
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[1.3, -8.8],[-4.6, 5.1]]
  );

返回:
  array[[true, true],[false, true]]
sm_sc.fv_opr_is_greater_ex 元素、点(广播)大于等于判断。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_is_greater_ex
  (
    array[[1.3, 11.3],[2.2, -3.0]]
  , array[[-2.6, 11.3],[2.2, 5.1]]
  );

返回:
  array[[true, true],[true, false]]
sm_sc.fv_opr_compare 元素、点(广播)比较大小。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_compare
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 5.1]]
  );

返回:
  array[[1, -1],[1, -1]]
sm_sc.fv_opr_sign 元素、点(广播)正负判断。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_sign
  (
    array[[1.3, -8.8],[2.2, -3.0],[-2.6, 11.3]]
  );

返回:
  array[[1, -1],[1, -1],[-1, 1]]
sm_sc.fv_opr_least 元素、点(广播)取小。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_least
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 5.1]]
  );

返回:
  array[[-2.6, -8.8],[-4.6, -3.0]]
sm_sc.fv_opr_greatest 元素、点(广播)取大。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_greatest
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 5.1]]
  );

返回:
  array[[1.3, 11.3],[2.2, 5.1]]
sm_sc.fv_opr_abs 元素、点(广播)绝对值。
入参:
  1. 原数组;
select
  sm_sc.fv_opr_abs
  (
    array[[1.3, -8.8],[2.2, -3.0],[-2.6, 11.3]]
  );

返回:
  array[[1.3, 8.8],[2.2, 3.0],[2.6, 11.3]]
sm_sc.fv_opr_round 元素、点(广播)四舍五入。
入参:
  1. 原数组;
  2. 保留小数点后位数;
select
  sm_sc.fv_opr_round
  (
    array[[1244.3753, -8.8443],[225.2153, -30.03821]]
  , 2
  );

返回:
  array[[1240, -10],[230, -30]]
--------------------------
select
  sm_sc.fv_opr_round
  (
    array[[1244.3753, -8.8443],[225.2153, -30.03821]]
  );

返回:
  array[[1244, -9],[225, -30]]
sm_sc.fv_opr_floor 元素、点(广播)数位地板值。
入参:
  1. 原数组;
  2. 保留小数点后位数;
select
  sm_sc.fv_opr_floor
  (
    array[[1244.3753, -8.8443],[225.2153, -30.03821]]
  , 2
  );

返回:
  array[[1244.37, -8.85],[225.21, -30.04]]
--------------------------
select
  sm_sc.fv_opr_floor
  (
    array[[1244.3753, -8.8443],[225.2153, -30.03821]]
  );

返回:
  array[[1244, -9],[225, -31]]
sm_sc.fv_opr_ceil 元素、点(广播)数位天花板值。
入参:
  1. 原数组;
  2. 保留小数点后位数;
select
  sm_sc.fv_opr_ceil
  (
    array[[1244.3753, -8.8443],[225.2153, -30.03821]]
  , 2
  );

返回:
  array[[1244.38, -8.84],[225.22, -30.03]]
--------------------------
select
  sm_sc.fv_opr_ceil
  (
    array[[1244.3753, -8.8443],[225.2153, -30.03821]]
  );

返回:
  array[[1245, -8],[226, -30]]
sm_sc.fv_opr_trunc 元素、点(广播)数位截取值。
入参:
  1. 原数组;
  2. 保留小数点后位数;
select
  sm_sc.fv_opr_trunc
  (
    array[[1244.3753, -8.8443],[225.2153, -30.03821]]
  , 2
  );

返回:
  array[[1244.37, -8.84],[225.21, -30.03]]
--------------------------
select
  sm_sc.fv_opr_trunc
  (
    array[[1244.3753, -8.8443],[225.2153, -30.03821]]
  );

返回:
  array[[1244, -8],[225, -30]]

b. 矩阵乘法、转置、翻转、旋转、拼接:

函数名 函数说明 调用举例
sm_sc.fv_concat_y 二维数组上下拼接,多维数组第一维度的拼接。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_concat_y
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 5.1],[2.6, 5.8]]
  );

返回:
  array[[1.3, -8.8]
          ,[2.2, -3.0]
          ,[-2.6, 11.3]
          ,[-4.6, 5.1]
          ,[2.6, 5.8]]
sm_sc.fv_concat_x 二维数组左右拼接,多维数组第二维度的拼接。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_concat_x
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3, 1.1],[-4.6, 5.1, 0.4]]
  );

返回:
  array[[1.3, -8.8, -2.6, 11.3, 1.1]
          ,[2.2, -3.0, -4.6, 5.1, 0.4]]
sm_sc.fv_concat_x3 多维数组第三维度的拼接。
入参:
  1. 操作数1;
  2. 操作数2;
select 
  sm_sc.fv_concat_x3
  (
    array
    [
      [[1,2,3,4],[11,12,13,14],[111,112,113,114]]
    , [[5,6,7,8],[15,16,17,18],[115,116,117,118]]
    ]
  , array
    [
      [[1,2,3],[11,12,13],[111,112,113]]
    , [[5,6,7],[15,16,17],[115,116,117]]
    ]
  )
  
返回:
  array
  [
    [
      [1,2,3,4,1,2,3]
    , [11,12,13,14,11,12,13]
    , [111,112,113,114,111,112,113]
    ]
  , [
      [5,6,7,8,5,6,7]
    , [15,16,17,18,15,16,17]
    , [115,116,117,118,115,116,117]
    ]
  ]
sm_sc.fv_concat_x4 多维数组第四维度的拼接。
入参:
  1. 操作数1;
  2. 操作数2;
select 
  sm_sc.fv_concat_x4
  (
    array
    [
      [
        [[1,2,3],[11,12,13],[111,112,113]]
      , [[5,6,7],[15,16,17],[115,116,117]]
      ]
    , [
        [[21,22,23],[31,32,33],[131,132,133]]
      , [[25,26,27],[35,36,37],[135,136,137]]
      ]
    ]
  , array
    [
      [
        [[-1,-2,-3,-4],[-11,-12,-13,-14],[-111,-112,-113,-114]]
      , [[-5,-6,-7,-8],[-15,-16,-17,-18],[-115,-116,-117,-118]]
      ]
    , [
        [[-21,-22,-23,-24],[-31,-32,-33,-34],[-121,-122,-123,-124]]
      , [[-25,-26,-27,-28],[-35,-36,-37,-38],[-125,-126,-127,-128]]
      ]
    ]
  )
  
返回:
  array
  [
    [
      [
        [1,2,3,-1,-2,-3,-4]
      , [11,12,13,-11,-12,-13,-14]
      , [111,112,113,-111,-112,-113,-114]
      ]
    , [
        [5,6,7,-5,-6,-7,-8]
      , [15,16,17,-15,-16,-17,-18]
      , [115,116,117,-115,-116,-117,-118]
      ]
    ]
  , [
      [
        [21,22,23,-21,-22,-23,-24]
      , [31,32,33,-31,-32,-33,-34]
      , [131,132,133,-121,-122,-123,-124]
      ]
    , [
        [25,26,27,-25,-26,-27,-28]
      , [35,36,37,-35,-36,-37,-38]
      , [135,136,137,-125,-126,-127,-128]
      ]
    ]
  ]
sm_sc.fv_opr_concat_heigh 二维背景平面上下(高度方向)拼接,多维数组倒数第二维度的拼接。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_concat_heigh
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3],[-4.6, 5.1],[2.6, 5.8]]
  );

返回:
  array[[1.3, -8.8]
          ,[2.2, -3.0]
          ,[-2.6, 11.3]
          ,[-4.6, 5.1]
          ,[2.6, 5.8]]
sm_sc.fv_opr_concat_width 二维背景平面左右(宽度方向)拼接,多维数组倒数第一维度的拼接。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_concat_width
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  , array[[-2.6, 11.3, 1.1],[-4.6, 5.1, 0.4]]
  );

返回:
  array[[1.3, -8.8, -2.6, 11.3, 1.1]
          ,[2.2, -3.0, -4.6, 5.1, 0.4]]
sm_sc.fv_opr_mirror_heigh 二维数组上下翻转,多维数组倒数第二维度翻转。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_mirror_heigh
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  );

返回:
  array[[2.2, -3.0, -0.95],[1.3, -8.8, 2.25]]
sm_sc.fv_opr_mirror_width 二维数组左右翻转,多维数组倒数第一维度翻转。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_mirror_width
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  );

返回:
  array[[2.25, -8.8, 1.3],[-0.95, -3.0, 2.2]]
sm_sc.fv_opr_mirror 多维数组指定维度倒序排列。
入参:
  1. 操作数1;
  2. 指定维度。最高四维;
select 
  sm_sc.fv_opr_mirror
  (
    array
    [
      [
        [[1,2,3,4],[11,12,13,14]]
      , [[5,6,7,8],[15,16,17,18]]
      ]
    , [
        [[21,22,23,24],[31,32,33,34]]
      , [[25,26,27,28],[35,36,37,38]]
      ]
    ]
  , 3
  )
  
返回:
  array
  [
    [
      [[11,12,13,14],[1,2,3,4]]
    , [[15,16,17,18],[5,6,7,8]]
    ]
  , [
      [[31,32,33,34],[21,22,23,24]]
    , [[35,36,37,38],[25,26,27,28]]
    ]
  ]
sm_sc.fv_opr_transpose 二维数组转置。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_transpose
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  );

返回:
  array[[1.3, 2.2],[-8.8,-3.0],[2.25,-0.95]]
sm_sc.fv_opr_transpose_3d 3d 矩阵转置。
入参:
  1. 操作数1;
  2. 转置的两个维度;
select
  sm_sc.fv_opr_transpose_3d
  (
    array[[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]],[[-1.3, 8.8, -2.25],[-2.2, 3.0, 0.95]]]
  , array[2, 3]
  );

返回:
  array[[[1.3,2.2],[-8.8,-3.0],[2.25,-0.95]],[[-1.3,-2.2],[8.8,3.0],[-2.25,0.95]]]
sm_sc.fv_opr_transpose_i 矩阵反转置,等价于左右翻转后再转置。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_transpose_i
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  );

返回:
  array[[-0.95,2.25],[-3.0,-8.8],[2.2,1.3]]
sm_sc.fv_opr_turn_heigh_width_180 数组第一、第二维度切面旋转180°,矩阵旋转180°,或等价于左右翻转再上下翻转。
等价于转置后再反转置,
或等价于左右维度、上下维度依次翻转。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_turn_heigh_width_180
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  );

返回:
  array[[2.25, -8.8, 1.3],[-0.95, -3.0, 2.2]]
sm_sc.fv_opr_turn_width_heigh_90 数组左右维度正方向旋转90°至上下维度正方向。
矩阵逆时针旋转90°。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_turn_width_heigh_90
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  );

返回:
  array[[2.2, 1.3],[-3.0, -8.8],[-0.95, 2.25]]
sm_sc.fv_opr_turn_heigh_width_90 矩阵顺时针旋转90°。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_turn_heigh_width_90
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  );

返回:
  array[[2.25, -0.95],[-8.8, -3.0],[1.3, 2.2]]
sm_sc.fv_opr_prod_inner 矩阵内积;对应元素乘积合计。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_prod_inner
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  , array[[-2.6, 11.3, 3.3],[-4.6, 5.1, -6.1]]
  );

返回:
  -115.020
sm_sc.fv_opr_prod_inner_pow 矩阵幂积;对应元素幂合计。
入参:
  1. 幂积的底数;
  2. 幂积的指数;
select
  sm_sc.fv_opr_prod_inner_pow
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  , 3.0
  );

返回:
  -685.09375
sm_sc.fv_opr_prod_kronecker Kronecker 积,外积。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_prod_kronecker
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  , array[[-2.6, 11.3],[-4.6, 5.1]]
  );

返回:
  array[[-3.38, 14.69, 22.88, -99.44, -5.850, 25.425]
          ,[-5.98, 6.63, 40.48, -44.88, -10.350, 11.475]
          ,[-5.72, 24.86, 7.80, -33.90, 2.470, -10.735]
          ,[-10.12, 11.22, 13.80, -15.30, 4.370, -4.845]]
sm_sc.fv_opr_prod_mx_py python 实现的矩阵乘法:乘、点积、数量积。
入参:
  1. 操作数1;
  2. 操作数2;
select
  sm_sc.fv_opr_prod_mx_py
  (
    array[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]]
  , array[[-2.6, 11.3],[-4.6, 5.1],[4.1, -3.1]]
  );

返回:
  array[[46.3250, -37.1650],[4.1850, 12.5050]]
sm_sc.fv_chunk_prod_mx 块儿分组矩阵乘法。
入参:
  1. 操作数1;
  2. 操作数2;
  3. 矩阵乘法块儿的两个入参高宽规格;分别为:
      a. i_chunk_len[1]: 分块矩阵乘法入参一的高;
      b. i_chunk_len[2]: 分块矩阵乘法入参一的宽,也即分块矩阵乘法入参二的高;
      c. i_chunk_len[3]: 分块矩阵乘法入参二的宽;
select  
    array_dims
    (
        sm_sc.fv_chunk_prod_mx
        (
            array_fill(random(),  array[2    7,  3    11])
        ,  array_fill(random(),  array[3    7,  5    11])
        ,  array[2,  3,  5]
        )    --  期望规格:array[2    7,  5    11]
    )
    
返回:
    [1:14][1:55]
sm_sc.fv_opr_prod_mx_pow 矩阵方阵乘法幂。
入参:
  1. 矩阵乘法的底数;
  2.矩阵乘法的指数;
select
  sm_sc.fv_opr_prod_mx_pow
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  , 3
  );

返回:
  array[[1.3000, 2.25],[2.2000, -3.0]]
sm_sc.fv_opr_prod_mx_left 矩阵方阵乘以其转置。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_prod_mx_left
  (
    array[[-8.8, 2.25],[2.2, -0.95]]
  );

返回:
  array[[82.5025, -21.4975],[-21.4975, 5.7425]]
sm_sc.fv_opr_prod_mx_right 矩阵方阵的转置乘以该矩阵。
入参:
  1. 操作数1;
select
  sm_sc.fv_opr_prod_mx_right
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  array[[6.5300, -3.6750],[-3.6750, 14.0625]]

c. 矩阵的构造、采样、替换、填充、字符匹配、随机生成、去壳(缘于pg13版本暂不支持 array 高维切片):

函数名 函数说明 调用举例
sm_sc.fv_mx_ele_2d_2_1d 二维数组扁平化为一维数组。
入参:
  1. 操作数1;
select
  sm_sc.fv_mx_ele_2d_2_1d
  (
    array[[1.3, -8.8],[2.2, -3.0]]
  );

返回:
  array[1.3, -8.8, 2.2, -3.0]
sm_sc.fv_mx_ele_1d_2_2d 一维数组按照指定宽度堆砌为二维数组。
入参:
  1. 原一维数组;
  2. 指定宽度;
select
  sm_sc.fv_mx_ele_1d_2_2d
  (
    array[[1.3, -8.8, 2.2, -3.0, 6.1, 0.23]]
  , 3
  );

返回:
  array[[1.3, -8.8, 2.2]
          ,[-3.0, 6.1, 0.23]]
sm_sc.fv_mx_ele_3d_2_2d 三维数组对指定的两个维度,扁平化为二维数组。
入参:
  1. 原三维数组;
  2. 待合并的两个维度。
      合并后的新维度在 to 的顺序位置;
  3. 被定住元素顺序的旧维度。
      该旧维度下的元素顺序,将保留至新维度;
select 
  sm_sc.fv_mx_ele_3d_2_2d
  (
    array
    [
      [
        [1, 2, 3, 4], 
        [5, 6, 7, 8], 
        [9, 10, 11, 12]
      ], 
      [
        [21, 22, 23, 24], 
        [25, 26, 27, 28], 
        [29, 30, 31, 32]
      ]
    ], 
    array[1, 2], 
    2
  )

返回:
  array
  [
    [1, 2, 3, 4]
  , [5, 6, 7, 8]
  , [9, 10, 11, 12]
  , [21, 22, 23, 24]
  , [25, 26, 27, 28]
  , [29, 30, 31, 32]
  ]
sm_sc.fv_mx_ele_2d_2_3d 二维数组对指定的维度、按照指定宽度堆砌为三维数组。
入参:
  1. 原二维数组;
  2. 升维的新增维度的维度长度。
      如果第三个入参为 1 则,新增维度为3。
      如果第三个入参为 2 则,新增维度为2;
  3. 定住的维度,1 或 2;
select 
  sm_sc.fv_mx_ele_2d_2_3d
  (
    array
    [
      [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
    , [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]
    ]
    , 3
    , 1
  )

返回:
  array
  [
    [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]
  , [[21, 22, 23], [24, 25, 26], [27, 28, 29], [30, 31, 32]]
  ]
sm_sc.fv_mx_slice_4d_2_3d 四维切片去壳为三维。
入参:
  1. 原四维数组;
  2. 被切片维度;
  3. 被切片位置序号。缺省为 1;
select  
    array_dims
    (
        sm_sc.fv_mx_slice_4d_2_3d
        (
            array_fill(random(),  array[3,  2,  4,  5])
        ,  3
        ,  2
        )    --  期望规格:array[3,  2,  5]
    )
    
返回:
    [1:3][1:2][1:5]
sm_sc.fv_mx_slice_3d_2_2d 三维切片去壳为二维。
入参:
  1. 原三维数组;
  2. 被切片维度;
  3. 被切片位置序号。缺省为 1;
select  
    array_dims
    (
        sm_sc.fv_mx_slice_3d_2_2d
        (
            array_fill(random(),  array[3,  2,  5])
        ,  3
        ,  2
        )    --  期望规格:array[3,  2]
    )
    
返回:
    [1:3][1:2]
sm_sc.fv_mx_slice_4d_2_2d 四维切片去壳为二维。
入参:
  1. 原四维数组;
  2. 被切片的两个维度;
  3. 被切片位置序号。缺省为 array[1, 1];
select  
    array_dims
    (
        sm_sc.fv_mx_slice_4d_2_2d
        (
            array_fill(random(),  array[4,  3,  2,  5])
        ,  array[2,  3]
        ,  array[2,  1]
        )    --  期望规格:array[4,  5]
    )
    
返回:
    [1:4][1:5]
sm_sc.fv_mx_ascend_dim 加壳升维。
入参:
  1. 原数组;
  2. 加壳次数;
select  
    array_dims
    (
        sm_sc.fv_mx_ascend_dim
        (
            array_fill(random(),  array[2,  5])
        ,  2
        )
    )
    
返回:
    [1:1][1:1][1:2][1:5]
sm_sc.fv_mx_descend_dim 去壳降维。
入参:
  1. 原数组;
  2. 去壳次数;
select  
    array_dims
    (
        sm_sc.fv_mx_descend_dim
        (
            array_fill(random(),  array[1,  1,  2,  5])
        ,  2
        )
    )
    
返回:
    [1:2][1:5]
sm_sc.fv_new 给定元素值构造数组。
入参:
  1. 元素值;
  2. 数组维度长度规格;
---------------------
给定数组单元构造新数组。
入参:
  1. 数组单元;
  2. 数组单元重复次数;
select
  sm_sc.fv_new
  (
    3.6
  , array[3, 4]
  );

返回:
  array[[3.6, 3.6, 3.6, 3.6]
          ,[3.6, 3.6, 3.6, 3.6]
          ,[3.6, 3.6, 3.6, 3.6]]
---------------------
select
    sm_sc.fv_new
    (
        array[[2,  4],  [1,  3]]
    ,  array[3,  2]
    )
    
返回:
    array[[2,  4,  2,  4]
            ,[1,  3,  1,  3]
            ,[2,  4,  2,  4]
            ,[1,  3,  1,  3]
            ,[2,  4,  2,  4]
            ,[1,  3,  1,  3]]
sm_sc.fv_new_rand 0.0 至给定值范围内,构造随机数组。
入参:
  1. 随机值上限;
  2. 数组规格;
---------------------
0.0 至 1.0 范围内,构造随机数组。
入参:
  1. 数组规格;
select
  sm_sc.fv_new_rand
  (
    2.0
  , array[3, 2]
  );

返回:
  array[[0.070740982239343, 0.0899943754998205]
          ,[0.629551500745066, 0.369479334510409]
          ,[0.159237183526308, 1.29839220669395]]
--------------------------
select
  sm_sc.fv_new_rand
  (
    array[3, 2]
  );

返回:
  array[[0.070740982239343, 0.0899943754998205]
          ,[0.629551500745066, 0.369479334510409]
          ,[0.159237183526308, 0.29839220669395]]
sm_sc.fv_new_rand_enum 构造枚举随机矩阵。
入参:
  1. 原枚举值一维数组;
  2. 新数组规格;
select
  sm_sc.fv_new_rand_enum
  (
    array['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  , array[2, 3]
  );

返回:
  array[['Sun', 'Sat', 'Sun ],['Sun', 'Tue', 'Wed']]
sm_sc.fv_new_randn 构造正态分布随机矩阵。
入参:
  1. 正态分布均值(期望值);
  2. 正态分布标准差;
  3. 新数组规格;
select
  sm_sc.fv_new_randn
  (
    3.6
    , 0.2
    , array[3, 2]
  );

返回:
  array[[3.66170684, 3.40963440]
          ,[3.60093244, 3.51437251]
          ,[3.30444215, 3.35682136]]
sm_sc.fv_eye 构造给定序列、背景元素的对角矩阵。
入参:
  1. 背景元素值;
  2. 生成矩阵维数;
  3...n. 按序排列的对角元素值,可以是 variadic array;
select
  sm_sc.fv_eye
  (
    1.0
  , 2
  , variadic array[1.5, 2.3, 5.6]
  );

返回:
  array[[1.5, 1.0, 1.0],[1.0, 2.3, 1.0],[1.0, 1.0, 5.6]]
sm_sc.fv_eye_arr_dense 给定对角块的构造稠密矩阵。
入参:
  1...n. 对角块矩阵队列;
--------------------------
给定对角块、背景元素值的构造稠密矩阵。
入参:
  1. 背景元素值(缺省为 0.0);
  2...n. 对角块矩阵队列;
select
  sm_sc.fv_eye_arr_dense
  (
    array[[1.2, 2.4], [11.2, 12.4]] :: float[]
  , array[[1.3, 2.6, 1.4, 2.8], [11.3, 12.6, 11.4, 12.8]] :: float[]
  , array[[1.1, 2.2], [11.1, 12.2], [21.1, 22.2]] :: float[]
  );

返回:
  array[[1.2, 2.4, 0.0, 0.0, 0.0, 0.0]
          ,[11.2, 12.4, 0.0, 0.0, 0.0, 0.0]
          ,[0.0, 0.0, 1.3, 2.6, 1.4, 2.8]
          ,[0.0, 0.0, 11.3, 12.6, 11.4, 12.8]
          ,[0.0, 0.0, 0.0, 0.0, 1.1, 2.2]
          ,[0.0, 0.0, 0.0, 0.0, 11.1, 12.2]
          ,[0.0, 0.0, 0.0, 0.0, 21.1, 22.2]]
--------------------------
select
  sm_sc.fv_eye_arr_dense
  (
    1.0,
    array[[1.2, 2.4], [11.2, 12.4]] :: float[]
  , array[[1.3, 2.6, 1.4, 2.8], [11.3, 12.6, 11.4, 12.8]] :: float[]
  , array[[1.1, 2.2], [11.1, 12.2], [21.1, 22.2]] :: float[]
  );

返回:
  array[[1.2, 2.4, 1.0, 1.0, 1.0, 1.0]
          ,[11.2, 12.4, 1.0, 1.0, 1.0, 1.0]
          ,[1.0, 1.0, 1.3, 2.6, 1.4, 2.8]
          ,[1.0, 1.0, 11.3, 12.6, 11.4, 12.8]
          ,[1.0, 1.0, 1.0, 1.0, 1.1, 2.2]
          ,[1.0, 1.0, 1.0, 1.0, 11.1, 12.2]
          ,[1.0, 1.0, 1.0, 1.0, 21.1, 22.2]]
sm_sc.fv_eye_arr_sparse 给定对角块的构造稀疏矩阵。
入参:
  1...n. 对角块矩阵队列;
--------------------------
给定对角块、背景元素值的构造稀疏矩阵。
入参:
  1. 背景元素值(缺省为 0.0);
  2...n. 对角块矩阵队列;
select
    sm_sc.fv_eye_arr_sparse
    (
        array[[1.2,  2.4],  [11.2,  12.4]]  ::  float[]
    ,  array[[1.3,  2.6,  1.4,  2.8],  [11.3,  12.6,  11.4,  12.8]]  ::  float[]
    ,  array[[1.1,  2.2],  [11.1,  12.2],  [21.1,  22.2]]  ::  float[]
    );  

返回:  
    array[[1.2,2.4,0,0,0,0,0,0,0]
              ,[11.2,12.4,0,0,0,0,0,0,0]
              ,[0,0,1.3,2.6,1.4,2.8,0,0,0]
              ,[0,0,11.3,12.6,11.4,12.8,0,0,0]
              ,[0,0,0,0,0,0,0,0,0]
              ,[0,0,0,0,0,0,0,0,0]
              ,[0,0,0,0,0,0,1.1,2.2,0]
              ,[0,0,0,0,0,0,11.1,12.2,0]
              ,[0,0,0,0,0,0,21.1,22.2,0]]
--------------------------
select
    sm_sc.fv_eye_arr_sparse
    (
        1.0,  
        array[[1.2,  2.4],  [11.2,  12.4]]  ::  float[]
    ,  array[[1.3,  2.6,  1.4,  2.8],  [11.3,  12.6,  11.4,  12.8]]  ::  float[]
    ,  array[[1.1,  2.2],  [11.1,  12.2],  [21.1,  22.2]]  ::  float[]
    );  

返回:  
    array[[1.2,2.4,1,1,1,1,1,1,1]
              ,[11.2,12.4,1,1,1,1,1,1,1]
              ,[1,1,1.3,2.6,1.4,2.8,1,1,1]
              ,[1,1,11.3,12.6,11.4,12.8,1,1,1]
              ,[1,1,1,1,1,1,1,1,1]
              ,[1,1,1,1,1,1,1,1,1]
              ,[1,1,1,1,1,1,1.1,2.2,1]
              ,[1,1,1,1,1,1,11.1,12.2,1]
              ,[1,1,1,1,1,1,21.1,22.2,1]]
sm_sc.fv_eye_unit 构造给定值的对角矩阵。
入参:
  1. 对角矩阵高宽规格;
  2. 对角元素值;
  3. 三维或四维堆叠时,指定第一或第一与第二维维长;
--------------------------
构造单位(左对角线元素的值为 1.0)对角矩阵。
入参:
  1. 对角矩阵高宽规格;
select
  sm_sc.fv_eye_unit
  (
    3
  , 3.6
  );

返回:
  array[[3.6, 0, 0],[0, 3.6, 0],[0, 0, 3.6]]
--------------------------
select
  sm_sc.fv_eye_unit
  (
    3
  );

返回:
  array[[1.0, 0, 0],[0, 1.0, 0],[0, 0, 1.0]]
sm_sc.fv_augmented 高宽数组填值增广或切块。
入参:
  1. 原高宽数组;
  2. 增广或切块的左上角在原矩阵的坐标;
  3. 增广或切块的高宽规格;
  4. 增广区域背景元素填值;
select
  sm_sc.fv_augmented
  (
    array[[1, 2, 3, 4, 5]
            ,[6, 7, 8, 9, 10]
            ,[11, 12, 13, 14, 15]
            ,[16, 17, 18, 19, 20]
            ,[21, 22, 23, 24, 25]]
  , array[2, -1]
  , array[8, 4]
  , 0
  );

返回:
  array[[0, 0, 6, 7, 8, 9]
          ,[0, 0, 11, 12, 13, 14]
          ,[0, 0, 16, 17, 18, 19]
          ,[0, 0, 21, 22, 23, 24]
          ,[0, 0, 0, 0, 0, 0]
          ,[0, 0, 0, 0, 0, 0]
          ,[0, 0, 0, 0, 0, 0]]
sm_sc.fv_array_1d_set_ele 对一维数组定位赋值,
支持指定负数或零的位置编号。
入参:
  1. 原一维数组;
  2. 一个位置编号或位置编号范围;
  3. 赋值或赋为给定数组;
select
  sm_sc.fv_array_1d_set_ele
  (
    array[1, 2, 3, 4]
  , -2
  , 5
  );

返回:
  array[1, 2, 5, 4]
--------------------------
select
  sm_sc.fv_array_1d_set_ele
  (
    array[1, 2, 3, 4]
  , 4
  , array[5, 6, 7]
  );

返回:
  array[1, 2, 3, 5, 6, 7]
--------------------------
select
  sm_sc.fv_array_1d_set_ele
  (
    array[1, 2, 3, 4]
  , int4range(1, 2, '[]')
  , array[5, 6, 7]
  );

返回:
  array[5, 6, 7, 3, 4]
--------------------------
select
  sm_sc.fv_array_1d_set_ele
  (
    array[1, 2, 3, 4]
  , -2
  , 5
  );

返回:
  array[1, 2, 5, 4]
sm_sc.fv_arr_remove_1d 一维数组移除给定若干值的元素。
入参:
  1. 原数组;
  2. 要移除的若干元素值;
select
  sm_sc.fv_arr_remove_1d
  (
    [1, 2, 3, 4, 5, 3, 4, 5, 6, 7]
  , array[3, 5]
  );

返回:
  array[1, 2, 4, 4, 6, 7]
sm_sc.fv_rand_1d_ele 随机组合,序号可重复。
入参:
  1. 总体数量;
  2. 抽样数量;
select
  sm_sc.fv_rand_1d_ele
  (
    8
  , 5
  );

返回:
  array[1, 1, 7, 3, 7]
sm_sc.fv_rand_1d_ele_pick 随机组合,序号不重复。
入参:
  1. 总体数量;
  2. 抽样数量;
select
  sm_sc.fv_rand_1d_ele_pick
  (
    8
  , 5
  );

返回:
  array[3, 6, 1, 7, 5]
sm_sc.ft_rand_slice_y 数组y方向随机获取切片行,
元素序号可重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
出参列:
  1. 抽到的样本编号;
  2. 抽样切片组成的新矩阵;
select
  o_ord_nos, o_slices
from
  sm_sc.ft_rand_slice_y
  (
    array[[1.0, 2.0],[3.0, 4.0],[5.0, 6.0]
            ,[7.0, 8.0],[9.0, 10.0],[11.0, 12.0]]
  , 3
  );

返回:
  o_ord_nos:
    array[6, 2, 6]
  o_slices:
    array[[11.0, 12.0],[3.0, 4.0],[11.0, 12.0]]
sm_sc.ft_rand_slice_y_pick 数组y方向随机拣取切片行,
元素序号不重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
出参列:
  1. 抽到的样本编号;
  2. 抽样切片组成的新矩阵;
select
  o_ord_nos, o_slices
from
  sm_sc.ft_rand_slice_y_pick
  (
    array[[1.0, 2.0],[3.0, 4.0],[5.0, 6.0]
            ,[7.0, 8.0],[9.0, 10.0],[11.0, 12.0]]
  , 3
  );

返回:
  o_ord_nos:
    array[6, 2, 6]
  o_slices:
    array[[5.0, 6.0],[3.0, 4.0],[11.0, 12.0]]
sm_sc.ft_rand_slice_x 数组x方向随机获取切片列,
元素序号可重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
出参列:
  1. 抽到的样本编号;
  2. 抽样切片组成的新矩阵;
select
  o_ord_nos, o_slices
from
  sm_sc.ft_rand_slice_x
  (
    array[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
            ,[7.0, 8.0, 9.0, 10.0, 11.0, 12.0]]
  , 3
  );

返回:
  o_ord_nos:
    array[1, 4, 1]
  o_slices:
    array[[1.0, 4.0, 1.0],[7.0, 10.0, 7.0]]
sm_sc.ft_rand_slice_x_pick 数组x方向随机拣取切片列,
元素序号不重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
出参列:
  1. 抽到的样本编号;
  2. 抽样切片组成的新矩阵;
select
  o_ord_nos, o_slices
from
  sm_sc.ft_rand_slice_x_pick
  (
    array[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
            ,[7.0, 8.0, 9.0, 10.0, 11.0, 12.0]]
  , 3
  );

返回:
  o_ord_nos:
    array[4, 5, 3]
  o_slices:
    array[[4.0, 5.0, 3.0],[10.0, 11.0, 9.0]]
sm_sc.ft_rand_slice_x3 数组x3方向随机获取切片行,
元素序号可重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
出参列:
  1. 抽到的样本编号;
  2. 抽样切片组成的新矩阵;
select 
  o_ord_nos,
  o_slices
from sm_sc.ft_rand_slice_x3
  (
    array
    [
      [
        [1, 2, 3]
      , [11, 21, 31]
      , [12, 22, 32]
      , [13, 23, 33]
      , [14, 24, 34]
      , [15, 25, 35]
      ]
    , [
        [16, 26, 36]
      , [17, 27, 37]
      , [18, 28, 38]
      , [19, 29, 39]
      , [61, 62, 63]
      , [81, 82, 83]
      ]
    ]
  , 2
  );

返回:
  o_ord_nos:
    array[2, 1]
  o_slices:
    array
    [
      [[2, 1],[21, 11],[22, 12],[23, 13],[24, 14],[25, 15]]
    , [[26, 16],[27, 17],[28, 18],[29, 19],[62, 61],[82, 81]]
    ]
sm_sc.ft_rand_slice_x3_pick 数组x3方向随机拣取切片行,
元素序号不重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
出参列:
  1. 抽到的样本编号;
  2. 抽样切片组成的新矩阵;
select 
  o_ord_nos,
  o_slices
from sm_sc.ft_rand_slice_x3_pick
  (
    array
    [
      [
        [[1, -1], [2, -2], [3, -3]]
      , [[11, -11], [21, -21], [31, -31]]
      , [[12, -12], [22, -22], [32, -32]]
      , [[13, -13], [23, -23], [33, -33]]
      , [[14, -14], [24, -24], [34, -34]]
      , [[15, -15], [25, -25], [35, -35]]
      ]
    , [
        [[16, -16], [26, -26], [36, -36]]
      , [[27, -27], [27, -27], [37, -37]]
      , [[18, -18], [28, -28], [38, -38]]
      , [[19, -19], [29, -29], [39, -39]]
      , [[61, -61], [62, -62], [63, -63]]
      , [[81, -81], [82, -82], [83, -83]]
      ]
    ]
    , 2
  )

返回:
  o_ord_nos:
    array[1, 3]
  o_slices:
    array
    [
      [
        [[1, -1], [3, -3]]
      , [[11, -11], [31, -31]]
      , [[12, -12], [32, -32]]
      , [[13, -13], [33, -33]]
      , [[14, -14], [34, -34]]
      , [[15, -15], [35, -35]]
      ]
    , [
        [[16, -16], [36, -36]]
      , [[27, -27], [37, -37]]
      , [[18, -18], [38, -38]]
      , [[19, -19], [39, -39]]
      , [[61, -61], [63, -63]]
      , [[81, -81], [83, -83]]
      ]
    ]
sm_sc.ft_rand_slice_x4 数组x4方向随机获取切片列,
元素序号可重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
出参列:
  1. 抽到的样本编号;
  2. 抽样切片组成的新矩阵;
select  
    o_ord_nos,
    o_slices
from  sm_sc.ft_rand_slice_x4
    (
        array
        [
            [
                [[1,  -1],  [2,  -2],  [3,  -3]]
            ,  [[11,  -11],  [21,  -21],  [31,  -31]]
            ,  [[12,  -12],  [22,  -22],  [32,  -32]]
            ,  [[13,  -13],  [23,  -23],  [33,  -33]]
            ,  [[14,  -14],  [24,  -24],  [34,  -34]]
            ,  [[15,  -15],  [25,  -25],  [35,  -35]]
            ]
        ,  [
                [[16,  -16],  [26,  -26],  [36,  -36]]
            ,  [[17,  -17],  [27,  -27],  [37,  -37]]
            ,  [[18,  -18],  [28,  -28],  [38,  -38]]
            ,  [[19,  -19],  [29,  -29],  [39,  -39]]
            ,  [[61,  -61],  [62,  -62],  [63,  -63]]
            ,  [[81,  -81],  [82,  -82],  [83,  -83]]
            ]
        ]
    ,  2
    )

返回:
    o_ord_nos:
        array[2,  2]
    o_slices:
        array
        [
            [
                [[-1,  -1],  [-2,  -2],  [-3,  -3]]
            ,  [[-11,  -11],  [-21,  -21],  [-31,  -31]]
            ,  [[-12,  -12],  [-22,  -22],  [-32,  -32]]
            ,  [[-13,  -13],  [-23,  -23],  [-33,  -33]]
            ,  [[-14,  -14],  [-24,  -24],  [-34,  -34]]
            ,  [[-15,  -15],  [-25,  -25],  [-35,  -35]]
            ]
        ,  [
                [[-16,  -16],  [-26,  -26],  [-36,  -36]]
            ,  [[-17,  -17],  [-27,  -27],  [-37,  -37]]
            ,  [[-18,  -18],  [-28,  -28],  [-38,  -38]]
            ,  [[-19,  -19],  [-29,  -29],  [-39,  -39]]
            ,  [[-61,  -61],  [-62,  -62],  [-63,  -63]]
            ,  [[-81,  -81],  [-82,  -82],  [-83,  -83]]
            ]
        ]
sm_sc.ft_rand_slice_x4_pick 数组x4方向随机拣取切片列,
元素序号不重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
出参列:
  1. 抽到的样本编号;
  2. 抽样切片组成的新矩阵;
select  
    o_ord_nos,
    o_slices
from  sm_sc.ft_rand_slice_x4_pick
    (
        array
        [
            [
                [[1,  -1],  [2,  -2],  [3,  -3]]
            ,  [[11,  -11],  [21,  -21],  [31,  -31]]
            ,  [[12,  -12],  [22,  -22],  [32,  -32]]
            ,  [[13,  -13],  [23,  -23],  [33,  -33]]
            ,  [[14,  -14],  [24,  -24],  [34,  -34]]
            ,  [[15,  -15],  [25,  -25],  [35,  -35]]
            ]
        ,  [
                [[16,  -16],  [26,  -26],  [36,  -36]]
            ,  [[27,  -27],  [27,  -27],  [37,  -37]]
            ,  [[18,  -18],  [28,  -28],  [38,  -38]]
            ,  [[19,  -19],  [29,  -29],  [39,  -39]]
            ,  [[61,  -61],  [62,  -62],  [63,  -63]]
            ,  [[81,  -81],  [82,  -82],  [83,  -83]]
            ]
        ]
        ,  2
    )

返回:
    o_ord_nos:
        array[2,  1]
    o_slices:
        array
        [
            [
                [[-1  ,  1  ],  [-2  ,  2  ],  [-3  ,  3  ]]
            ,  [[-11,  11],  [-21,  21],  [-31,  31]]
            ,  [[-12,  12],  [-22,  22],  [-32,  32]]
            ,  [[-13,  13],  [-23,  23],  [-33,  33]]
            ,  [[-14,  14],  [-24,  24],  [-34,  34]]
            ,  [[-15,  15],  [-25,  25],  [-35,  35]]
            ]
        ,  [
                [[-16,  16],  [-26,  26],  [-36,  36]]
            ,  [[-27,  27],  [-27,  27],  [-37,  37]]
            ,  [[-18,  18],  [-28,  28],  [-38,  38]]
            ,  [[-19,  19],  [-29,  29],  [-39,  39]]
            ,  [[-61,  61],  [-62,  62],  [-63,  63]]
            ,  [[-81,  81],  [-82,  82],  [-83,  83]]
            ]
        ]
sm_sc.fv_rand_slice_y 数组y方向随机获取切片行,
元素序号可重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
select  
    sm_sc.fv_rand_slice_y
    (
        array
        [
            [[1,  2,  3],  [11,  21,  31]]
        ,  [[16,  26,  36],  [17,  27,  37]]
        ]
    ,  5
    )

返回:
    array
    [
        [[1,  2,  3],  [11,  21,  31]]
    ,  [[1,  2,  3],  [11,  21,  31]]
    ,  [[16,  26,  36],[17,  27,  37]]
    ,  [[1,  2,  3],  [11,  21,  31]]
    ,  [[1,  2,  3],  [11,  21,  31]]
    ]
sm_sc.fv_rand_slice_y_pick 数组y方向随机拣取切片行,
元素序号不重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
select  
    sm_sc.fv_rand_slice_y_pick
    (
        array
        [
            [1,  2,  3]
        ,  [11,  21,  31]
        ,  [16,  26,  36]
        ,  [17,  27,  37]
        ]
    ,  3
    )

返回:
    array
    [
        [16,  26,  36]
    ,  [11,  21,  31]
    ,  [17,  27,  37]
    ]
sm_sc.fv_rand_slice_x 数组x方向随机获取切片列,
元素序号可重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
select  
    sm_sc.fv_rand_slice_x
    (
        array
        [
            [1.0,  2.0,  3.0,  4.0,  5.0,  6.0]
        ,  [7.0,  8.0,  9.0,  10.0,  11.0,  12.0]
        ]
    ,  3
    )

返回:
    array
    [
        [4.0,  5.0,  4.0]
    ,  [10.0,  11.0,  10.0]
    ]
sm_sc.fv_rand_slice_x_pick 数组x方向随机拣取切片列,
元素序号不重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
select  
    sm_sc.fv_rand_slice_x_pick
    (
        array
        [
            [1.0,  2.0,  3.0,  4.0,  5.0,  6.0]
        ,  [7.0,  8.0,  9.0,  10.0,  11.0,  12.0]
        ]
    ,  4
    )

返回:
    array
    [
        [5.0,  3.0,  2.0,  1.0]
    ,  [11.0,  9.0,  8.0,  7.0]
    ]
sm_sc.fv_rand_slice_x3 数组x3方向随机获取切片行,
元素序号可重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
select  
    sm_sc.fv_rand_slice_x3
    (
        array
        [[
            [1.0,  2.0,  3.0,  4.0,  5.0,  6.0]
        ,  [7.0,  8.0,  9.0,  10.0,  11.0,  12.0]
        ]]
    ,  4
    )

返回:
    array
    [[
        [6.0,  5.0,  1.0,  6.0]
    ,  [12.0,  11.0,  7.0,  12.0]
    ]]
sm_sc.fv_rand_slice_x3_pick 数组x3方向随机拣取切片行,
元素序号不重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
select  
    sm_sc.fv_rand_slice_x3_pick
    (
        array
        [[
            [1.0,  2.0,  3.0,  4.0,  5.0,  6.0]
        ,  [7.0,  8.0,  9.0,  10.0,  11.0,  12.0]
        ]]
    ,  4
    )

返回:
    array
    [[
        [5.0,  6.0,  1.0,  4.0]
    ,  [11.0,  12.0,  7.0,  10.0]
    ]]
sm_sc.fv_rand_slice_x4 数组x4方向随机获取切片列,
元素序号可重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
select  
    sm_sc.fv_rand_slice_x4
    (
        array
        [[[
            [1.0,  2.0,  3.0,  4.0,  5.0,  6.0]
        ,  [7.0,  8.0,  9.0,  10.0,  11.0,  12.0]
        ]]]
    ,  4
    )

返回:
    array
    [[[
        [6.0,  6.0,  3.0,  1.0]
    ,  [12.0,  12.0,  9.0,  7.0]
    ]]]
sm_sc.fv_rand_slice_x4_pick 数组x4方向随机拣取切片列,
元素序号不重复。
入参:
  1. 原矩阵;
  2. 抽样数量;
select  
    sm_sc.fv_rand_slice_x4_pick
    (
        array
        [[[
            [1.0,  2.0,  3.0,  4.0,  5.0,  6.0]
        ,  [7.0,  8.0,  9.0,  10.0,  11.0,  12.0]
        ]]]
    ,  4
    )

返回:
    array
    [[[
        [3.0,  1.0,  2.0,  4.0]
    ,  [9.0,  7.0,  8.0,  10.0]
    ]]]
sm_sc.fv_chunk 多维单切片(单切块)。
入参:
  1. 原矩阵;
  2. 切片位置下标各维度范围上下界;
select  
    sm_sc.fv_chunk
    (
        array[[1,2,3,4],[5,6,7,8]]
    ,  array[[2,1],[3,2]]
    )

返回:  
    array[[5,6]]
sm_sc.fv_slice_y 第一维度切片(切块)。
入参:
  1. 原矩阵;
  2. 切片位置下标范围集合;
select 
  sm_sc.fv_slice_y
  (
    array[[1, 2],[3, 4],[5, 6],[7, 8]]
  , array[int4range(1, 3, '[]'), int4range(2, 3, '[]')]
  )
  
返回:
  array
  [[1, 2],[3, 4],[5, 6],[3, 4],[5, 6]]
sm_sc.fv_slice_x 第二维度切片(切块)。
入参:
  1. 原矩阵;
  2. 切片位置下标范围集合;
select 
  sm_sc.fv_slice_x
  (
    array[[1, 2, 3, 4],[5, 6, 7, 8]]
  , array[int4range(1, 3, '[]'), int4range(2, 3, '[]')]
  )
  
返回:
  array
  [[1, 2, 3, 2, 3],[5, 6, 7, 6, 7]]
sm_sc.fv_slice_x3 第三维度切片(切块)。
入参:
  1. 原矩阵;
  2. 切片位置下标范围集合;
select 
  sm_sc.fv_slice_x3
  (
    array
    [
      [[11, 12, 13, 14],[21, 22, 23, 24]]
    , [[31, 32, 33, 34],[41, 42, 43, 44]]
    ]
  , array[int4range(1, 3, '[]'), int4range(2, 3, '[]')]
  )
  
返回:
  array
  [
    [[11, 12, 13, 12, 13],[21, 22, 23, 22, 23]]
  , [[31, 32, 33, 32, 33],[41, 42, 43, 42, 43]]
  ]
sm_sc.fv_slice_x4 第四维度切片(切块)。
入参:
  1. 原矩阵;
  2. 切片位置下标范围集合;
select 
  sm_sc.fv_slice_x4
  (
    array
    [
      [
        [[11, 12, 13, 14],[21, 22, 23, 24]]
      , [[31, 32, 33, 34],[41, 42, 43, 44]]
      ]
    , [
        [[51, 52, 53, 54],[61, 62, 63, 64]]
      , [[71, 72, 73, 74],[81, 82, 83, 84]]
      ]
    ]
  , array[int4range(1, 3, '[]'), int4range(2, 3, '[]')]
  )
  
返回:
  array
  [
    [
      [[11, 12, 13, 12, 13],[21, 22, 23, 22, 23]]
    , [[31, 32, 33, 32, 33],[41, 42, 43, 42, 43]]
    ]
  , [
      [[51, 52, 53, 52, 53],[61, 62, 63, 62, 63]]
    , [[71, 72, 73, 72, 73],[81, 82, 83, 82, 83]]
    ]
  ]
sm_sc.fv_sample_y 第一维度间隔采样。
入参:
  1. 原矩阵;
  2. 采样周期;
  3. 采样窗口约束。
      null 值表示不约束;
  4. 采样范围。
      队列支持多个范围;
  5. 升采样填充值阵。缺省为 null;
      超过窗口约束的采样范围,填充该值阵;
select
  sm_sc.fv_sample_y
  (
    array[[1, 2],[3, 4],[5, 6],[7, 8],[9, 10],[11, 12]]
  , 3
  , 3
  , array[int4range(1,2, '[]'), int4range(2,4, '[]')]
  , array[[13, 14], [15, 16]]
  );

返回:
  array[[1, 2],[3, 4],[3, 4],[5, 6],[13, 14],[15, 16]
          ,[7, 8],[9, 10],[9, 10],[11, 12],[13, 14],[15, 16]]
sm_sc.fv_sample_x 第二维度间隔采样。
入参:
  1. 原矩阵;
  2. 采样周期;
  3. 采样窗口约束。
      null 值表示不约束;
  4. 采样范围。
      队列支持多个范围;
  5. 升采样填充值阵。缺省为 null;
      超过窗口约束的采样范围,填充该值阵;
select
  sm_sc.fv_sample_x
  (
    array[[1, 2, 3, 4, 5, 6],[7, 8, 9, 10, 11, 12]]
  , 3
  , 2
  , array[int4range(1,2, '[]'), int4range(2,4, '[]')]
  , array[[13, 14], [15, 16]]
  );

返回:
  array[[1, 2, 2, 13, 14, 13, 14, 4, 5, 5, 13, 14, 13, 14]
          ,[7, 8, 8, 15, 16, 15, 16, 10, 11, 11, 15, 16, 15, 16]]
sm_sc.fv_sample_x3 第三维度间隔采样。
入参:
  1. 原矩阵;
  2. 采样周期;
  3. 采样窗口约束。
      null 值表示不约束;
  4. 采样范围。
      队列支持多个范围;
  5. 升采样填充值阵。缺省为 null;
      超过窗口约束的采样范围,填充该值阵;
select 
  sm_sc.fv_sample_x3
  (
    array
    [
      [
        [[1, -1],[2, -2]],[[3, -3],[4, -4]],[[5, -5],[6, -6]]
      , [[7, -7],[8, -8]],[[9.7, -9],[10, -10]],[[11, -11],[12, -12]]
      ]
    , [
        [[1, -1],[2, -2]],[[3, -3],[4, -4]],[[5, -5],[6, -6]]
      , [[7, -7],[8, -8]],[[9.7, -9],[10, -10]],[[11, -11],[12, -12]]
      ]
    , [
        [[1, -1],[2, -2]],[[3, -3],[4, -4]],[[5, -5],[6, -6]]
      , [[7, -7],[8, -8]],[[9.7, -9],[10, -10]],[[11, -11],[12, -12]]
      ]
    , [
        [[1, -1],[2, -2]],[[3, -3],[4, -4]],[[5, -5],[6, -6]]
      , [[7, -7],[8, -8]],[[9.7, -9],[10, -10]],[[11, -11],[12, -12]]
      ]
    ]::float[]
  , 3
  , 3
  , array
    [
      int4range(-1, 2, '[]')
    , int4range(-2, 0, '[]')
    , int4range(3, 5, '[]')
    , int4range(4, 5, '[]')
    ]
  , array
    [
      [
        [[32, -42]],[[54, -64]],[[75, -85]]
      , [[97, -97]],[[19.7, -19]],[[110, -116]]
      ]
    , [
        [[32, -42]],[[54, -64]],[[75, -85]]
      , [[97, -97]],[[19.7, -19]],[[110, -116]]
      ]
    , [
        [[32, -42]],[[54, -64]],[[75, -85]]
      , [[97, -97]],[[19.7, -19]],[[110, -116]]
      ]
    , [
        [[32, -42]],[[54, -64]],[[75, -85]]
      , [[97, -97]],[[19.7, -19]],[[110, -116]]
      ]
    ]::float[]
  )

返回:
  array
  [
    [
      [
        [32,-42],[32,-42],[1,-1],[2,-2],[32,-42],[32,-42]
      , [32,-42],[32,-42],[32,-42],[32,-42],[32,-42]
      ]
    , [
        [54,-64],[54,-64],[3,-3],[4,-4],[54,-64],[54,-64]
      , [54,-64],[54,-64],[54,-64],[54,-64],[54,-64]
      ]
    , [
        [75,-85],[75,-85],[5,-5],[6,-6],[75,-85],[75,-85]
      , [75,-85],[75,-85],[75,-85],[75,-85],[75,-85]
      ]
    , [
        [97,-97],[97,-97],[7,-7],[8,-8],[97,-97],[97,-97]
      , [97,-97],[97,-97],[97,-97],[97,-97],[97,-97]
      ]
    , [
        [19.7,-19],[19.7,-19],[9.7,-9],[10,-10],[19.7,-19],[19.7,-19]
      , [19.7,-19],[19.7,-19],[19.7,-19],[19.7,-19],[19.7,-19]
      ]
    , [
        [110,-116],[110,-116],[11,-11],[12,-12],[110,-116],[110,-116]
      , [110,-116],[110,-116],[110,-116],[110,-116],[110,-116]
      ]
    ]
  , [
      [
        [32,-42],[32,-42],[1,-1],[2,-2],[32,-42],[32,-42]
      , [32,-42],[32,-42],[32,-42],[32,-42],[32,-42]
      ]
    , [
        [54,-64],[54,-64],[3,-3],[4,-4],[54,-64],[54,-64]
      , [54,-64],[54,-64],[54,-64],[54,-64],[54,-64]
      ]
    , [
        [75,-85],[75,-85],[5,-5],[6,-6],[75,-85],[75,-85]
      , [75,-85],[75,-85],[75,-85],[75,-85],[75,-85]
      ]
    , [
        [97,-97],[97,-97],[7,-7],[8,-8],[97,-97],[97,-97]
      , [97,-97],[97,-97],[97,-97],[97,-97],[97,-97]
      ]
    , [
        [19.7,-19],[19.7,-19],[9.7,-9],[10,-10],[19.7,-19]
      , [19.7,-19],[19.7,-19],[19.7,-19],[19.7,-19],[19.7,-19],[19.7,-19]
      ]
    , [
        [110,-116],[110,-116],[11,-11],[12,-12],[110,-116],[110,-116]
      , [110,-116],[110,-116],[110,-116],[110,-116],[110,-116]
      ]
    ]
  , [
      [
        [32,-42],[32,-42],[1,-1],[2,-2],[32,-42],[32,-42]
      , [32,-42],[32,-42],[32,-42],[32,-42],[32,-42]
      ]
    , [
        [54,-64],[54,-64],[3,-3],[4,-4],[54,-64],[54,-64]
      , [54,-64],[54,-64],[54,-64],[54,-64],[54,-64]
      ]
    , [
        [75,-85],[75,-85],[5,-5],[6,-6],[75,-85],[75,-85]
      , [75,-85],[75,-85],[75,-85],[75,-85],[75,-85]
      ]
    , [
        [97,-97],[97,-97],[7,-7],[8,-8],[97,-97],[97,-97]
      , [97,-97],[97,-97],[97,-97],[97,-97],[97,-97]
      ]
    , [
        [19.7,-19],[19.7,-19],[9.7,-9],[10,-10],[19.7,-19],[19.7,-19]
      , [19.7,-19],[19.7,-19],[19.7,-19],[19.7,-19],[19.7,-19]
      ]
    , [
        [110,-116],[110,-116],[11,-11],[12,-12],[110,-116],[110,-116]
      , [110,-116],[110,-116],[110,-116],[110,-116],[110,-116]
      ]
    ]
  , [
      [
        [32,-42],[32,-42],[1,-1],[2,-2],[32,-42],[32,-42]
      , [32,-42],[32,-42],[32,-42],[32,-42],[32,-42]]
    , [
        [54,-64],[54,-64],[3,-3],[4,-4],[54,-64],[54,-64]
      , [54,-64],[54,-64],[54,-64],[54,-64],[54,-64]]
    , [
        [75,-85],[75,-85],[5,-5],[6,-6],[75,-85],[75,-85]
      , [75,-85],[75,-85],[75,-85],[75,-85],[75,-85]
      ]
    , [
        [97,-97],[97,-97],[7,-7],[8,-8],[97,-97],[97,-97]
      , [97,-97],[97,-97],[97,-97],[97,-97],[97,-97]
      ]
    , [
        [19.7,-19],[19.7,-19],[9.7,-9],[10,-10],[19.7,-19],[19.7,-19]
      , [19.7,-19],[19.7,-19],[19.7,-19],[19.7,-19],[19.7,-19]
      ]
    , [
        [110,-116],[110,-116],[11,-11],[12,-12],[110,-116],[110,-116]
      , [110,-116],[110,-116],[110,-116],[110,-116],[110,-116]
      ]
    ]
  ]
sm_sc.fv_sample_x4 第四维度间隔采样。
入参:
  1. 原矩阵;
  2. 采样周期;
  3. 采样窗口约束。
      null 值表示不约束;
  4. 采样范围。
      队列支持多个范围;
  5. 升采样填充值阵。缺省为 null;
      超过窗口约束的采样范围,填充该值阵;
select 
  sm_sc.fv_sample_x4
  (
    array
    [
      [
        [[1, -1],[2, -2]],[[3, -3],[4, -4]],[[5, -5],[6, -6]]
      , [[7, -7],[8, -8]],[[9.7, -9],[10, -10]],[[11, -11],[12, -12]]
      ]
    , [
        [[1, -1],[2, -2]],[[3, -3],[4, -4]],[[5, -5],[6, -6]]
      , [[7, -7],[8, -8]],[[9.7, -9],[10, -10]],[[11, -11],[12, -12]]
      ]
    , [
        [[1, -1],[2, -2]],[[3, -3],[4, -4]],[[5, -5],[6, -6]]
      , [[7, -7],[8, -8]],[[9.7, -9],[10, -10]],[[11, -11],[12, -12]]
      ]
    , [
        [[1, -1],[2, -2]],[[3, -3],[4, -4]],[[5, -5],[6, -6]]
      , [[7, -7],[8, -8]],[[9.7, -9],[10, -10]],[[11, -11],[12, -12]]
      ]
    ]::float[]
  , 3
  , 3
  , array
    [
      int4range(-1, 2, '[]')
    , int4range(-2, 0, '[]')
    , int4range(3, 5, '[]')
    , int4range(4, 5, '[]')
    ]
  , array
    [
      [
        [[1], [2]], [[3], [-4]], [[-5], [-6]]
      , [[-7], [-8]], [[9.7], [10]], [[-11], [12]]
      ]
    , [
        [[1], [2]], [[3], [-4]], [[-5], [-6]]
      , [[-7], [-8]], [[9.7], [10]], [[-11], [12]]
      ]
    , [
        [[1], [2]], [[3], [-4]], [[-5], [-6]]
      , [[-7], [-8]], [[9.7], [10]], [[-11], [12]]
      ]
    , [
        [[1], [2]], [[3], [-4]], [[-5], [-6]]
      , [[-7], [-8]], [[9.7], [10]], [[-11], [12]]
      ]
    ]::float[]
  )

返回:
  array
  [
    [
      [
        [1,1,1,-1,1,1,1,1,1,1,1]
      , [2,2,2,-2,2,2,2,2,2,2,2]
      ]
    , [
        [3,3,3,-3,3,3,3,3,3,3,3]
      , [-4,-4,4,-4,-4,-4,-4,-4,-4,-4,-4]
      ]
    , [
        [-5,-5,5,-5,-5,-5,-5,-5,-5,-5,-5]
      , [-6,-6,6,-6,-6,-6,-6,-6,-6,-6,-6]
      ]
    , [
        [-7,-7,7,-7,-7,-7,-7,-7,-7,-7,-7]
      , [-8,-8,8,-8,-8,-8,-8,-8,-8,-8,-8]
      ]
    , [
        [9.7,9.7,9.7,-9,9.7,9.7,9.7,9.7,9.7,9.7,9.7]
      , [10,10,10,-10,10,10,10,10,10,10,10]
      ]
    , [
        [-11,-11,11,-11,-11,-11,-11,-11,-11,-11,-11]
      , [12,12,12,-12,12,12,12,12,12,12,12]
      ]
    ]
  , [
      [
        [1,1,1,-1,1,1,1,1,1,1,1]
      , [2,2,2,-2,2,2,2,2,2,2,2]
      ]
    , [
        [3,3,3,-3,3,3,3,3,3,3,3]
      , [-4,-4,4,-4,-4,-4,-4,-4,-4,-4,-4]
      ]
    , [
        [-5,-5,5,-5,-5,-5,-5,-5,-5,-5,-5]
      , [-6,-6,6,-6,-6,-6,-6,-6,-6,-6,-6]
      ]
    , [
        [-7,-7,7,-7,-7,-7,-7,-7,-7,-7,-7]
      , [-8,-8,8,-8,-8,-8,-8,-8,-8,-8,-8]
      ]
    , [
        [9.7,9.7,9.7,-9,9.7,9.7,9.7,9.7,9.7,9.7,9.7]
      , [10,10,10,-10,10,10,10,10,10,10,10]
      ]
    , [
        [-11,-11,11,-11,-11,-11,-11,-11,-11,-11,-11]
      , [12,12,12,-12,12,12,12,12,12,12,12]
      ]
    ]
  , [
      [
        [1,1,1,-1,1,1,1,1,1,1,1]
      , [2,2,2,-2,2,2,2,2,2,2,2]
      ]
    , [
        [3,3,3,-3,3,3,3,3,3,3,3]
      , [-4,-4,4,-4,-4,-4,-4,-4,-4,-4,-4]
      ]
    , [
        [-5,-5,5,-5,-5,-5,-5,-5,-5,-5,-5]
      , [-6,-6,6,-6,-6,-6,-6,-6,-6,-6,-6]
      ]
    , [
        [-7,-7,7,-7,-7,-7,-7,-7,-7,-7,-7]
      , [-8,-8,8,-8,-8,-8,-8,-8,-8,-8,-8]
      ]
    , [
        [9.7,9.7,9.7,-9,9.7,9.7,9.7,9.7,9.7,9.7,9.7]
      , [10,10,10,-10,10,10,10,10,10,10,10]
      ]
    , [
        [-11,-11,11,-11,-11,-11,-11,-11,-11,-11,-11]
      , [12,12,12,-12,12,12,12,12,12,12,12]
      ]
    ]
  , [
      [
        [1,1,1,-1,1,1,1,1,1,1,1]
      , [2,2,2,-2,2,2,2,2,2,2,2]
      ]
    , [
        [3,3,3,-3,3,3,3,3,3,3,3]
      , [-4,-4,4,-4,-4,-4,-4,-4,-4,-4,-4]
      ]
    , [
        [-5,-5,5,-5,-5,-5,-5,-5,-5,-5,-5]
      , [-6,-6,6,-6,-6,-6,-6,-6,-6,-6,-6]
      ]
    , [
        [-7,-7,7,-7,-7,-7,-7,-7,-7,-7,-7]
      , [-8,-8,8,-8,-8,-8,-8,-8,-8,-8,-8]
      ]
    , [
        [9.7,9.7,9.7,-9,9.7,9.7,9.7,9.7,9.7,9.7,9.7]
      , [10,10,10,-10,10,10,10,10,10,10,10]
      ]
    , [
        [-11,-11,11,-11,-11,-11,-11,-11,-11,-11,-11]
      , [12,12,12,-12,12,12,12,12,12,12,12]
      ]
    ]
  ]
sm_sc.fv_lower_tri_mx 下三角矩阵。
入参:
  1. 原矩阵;
  2. 上三角填充值。缺省值为 null;
select  
    sm_sc.fv_lower_tri_mx
    (
        array
        [
            [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ,  [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ,  [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ]
    )

返回:
    array
    [
        [
            [1,NULL,NULL,NULL,NULL,NULL]
        ,  [-1,-2,NULL,NULL,NULL,NULL]
        ,  [-1,2,-3,NULL,NULL,NULL]
        ,  [1,-2,3,4,NULL,NULL]]
    ,  [
            [1,NULL,NULL,NULL,NULL,NULL]
        ,  [-1,-2,NULL,NULL,NULL,NULL]
        ,  [-1,2,-3,NULL,NULL,NULL]
        ,  [1,-2,3,4,NULL,NULL]
        ]
    ,  [
            [1,NULL,NULL,NULL,NULL,NULL]
        ,  [-1,-2,NULL,NULL,NULL,NULL]
        ,  [-1,2,-3,NULL,NULL,NULL]
        ,  [1,-2,3,4,NULL,NULL]
        ]
    ]
sm_sc.fv_upper_tri_mx 上三角矩阵。
入参:
  1. 原矩阵;
  2. 下三角填充值。缺省值为 null;
select  
    sm_sc.fv_upper_tri_mx
    (
        array
        [
            [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ,  [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ,  [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ]
    )

返回:
    array
    [
        [
            [1,2,3,4,5,6]
        ,  [NULL,-2,-3,-4,-5,-6]
        ,  [NULL,NULL,-3,4,5,-6]
        ,  [NULL,NULL,NULL,4,-5,6]]
    ,  [
            [1,2,3,4,5,6]
        ,  [NULL,-2,-3,-4,-5,-6]
        ,  [NULL,NULL,-3,4,5,-6]
        ,  [NULL,NULL,NULL,4,-5,6]]
        ]
    ,  [
            [1,2,3,4,5,6]
        ,  [NULL,-2,-3,-4,-5,-6]
        ,  [NULL,NULL,-3,4,5,-6]
        ,  [NULL,NULL,NULL,4,-5,6]]
        ]
    ]
sm_sc.fv_lower_tri_mx_ex 欠下三角矩阵。
入参:
  1. 原矩阵;
  2. 包含对角线的上三角填充值。缺省值为 null;
select  
    sm_sc.fv_lower_tri_mx_ex
    (
        array
        [
            [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ,  [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ,  [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ]
    )

返回:
    array
    [
        [
            [NULL,NULL,NULL,NULL,NULL,NULL]
        ,  [-1,NULL,NULL,NULL,NULL,NULL]
        ,  [-1,2,NULL,NULL,NULL,NULL]
        ,  [1,-2,3,NULL,NULL,NULL]]
    ,  [
            [NULL,NULL,NULL,NULL,NULL,NULL]
        ,  [-1,NULL,NULL,NULL,NULL,NULL]
        ,  [-1,2,NULL,NULL,NULL,NULL]
        ,  [1,-2,3,NULL,NULL,NULL]
        ]
    ,  [
            [NULL,NULL,NULL,NULL,NULL,NULL]
        ,  [-1,NULL,NULL,NULL,NULL,NULL]
        ,  [-1,2,NULL,NULL,NULL,NULL]
        ,  [1,-2,3,NULL,NULL,NULL]
        ]
    ]
sm_sc.fv_upper_tri_mx_ex 欠上三角矩阵。
入参:
  1. 原矩阵;
  2. 包含对角线的下三角填充值。缺省值为 null;
select  
    sm_sc.fv_upper_tri_mx_ex
    (
        array
        [
            [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ,  [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ,  [
                [1,  2,  3,  4,  5,  6]
            ,  [-1,  -2,  -3,  -4,  -5,  -6]
            ,  [-1,  2,  -3,  4,  5,  -6]
            ,  [1,  -2,  3,  4,  -5,  6]
            ]
        ]
    )

返回:
    array
    [
        [
            [null,2,3,4,5,6]
        ,  [NULL,null,-3,-4,-5,-6]
        ,  [NULL,NULL,null,4,5,-6]
        ,  [NULL,NULL,NULL,null,-5,6]]
    ,  [
            [null,2,3,4,5,6]
        ,  [NULL,null,-3,-4,-5,-6]
        ,  [NULL,NULL,null,4,5,-6]
        ,  [NULL,NULL,NULL,null,-5,6]]
        ]
    ,  [
            [null,2,3,4,5,6]
        ,  [NULL,null,-3,-4,-5,-6]
        ,  [NULL,NULL,null,4,5,-6]
        ,  [NULL,NULL,NULL,null,-5,6]]
        ]
    ]
sm_sc.fv_lmask 高宽二维面左部分逐个高度位置按给定长度掩码。
入参:
  1. 原矩阵;
  2. 逐个高度位置掩码长度;
  3. 填充值;
select  
    sm_sc.fv_lmask
    (
        array
        [
            [
                [1,  2,  3,  4,  5]
            ,  [2,  3,  4,  5,  6]
            ,  [3,  4,  5,  6,  7]
            ,  [4,  5,  6,  7,  8]
            ]
        ,  [
                [-1,  -2,  -3,  -4,  -5]
            ,  [-2,  -3,  -4,  -5,  -6]
            ,  [-3,  -4,  -5,  -6,  -7]
            ,  [-4,  -5,  -6,  -7,  -8]
            ]
        ,  [
                [11,  12,  13,  14,  15]
            ,  [12,  13,  14,  15,  16]
            ,  [13,  14,  15,  16,  17]
            ,  [14,  15,  16,  17,  18]
            ]
        ]
    ,  array
        [
            [
                [3]
            ,  [0]
            ,  [2]
            ,  [1]
            ]
        ,  [
                [1]
            ,  [1]
            ,  [4]
            ,  [2]
            ]
        ,  [
                [3]
            ,  [5]
            ,  [2]
            ,  [1]
            ]
        ]
    ,  0
    )

返回:
    array
    [
        [
            [0,0,0,4,5]
        ,  [2,3,4,5,6]
        ,  [0,0,5,6,7]
        ,  [0,5,6,7,8]
        ]
    ,  [
            [0,-2,-3,-4,-5]
        ,  [0,-3,-4,-5,-6]
        ,  [0,0,0,0,-7]
        ,  [0,0,-6,-7,-8]
        ]
    ,  [
            [0,0,0,14,15]
        ,  [0,0,0,0,0]
        ,  [0,0,15,16,17]
        ,  [0,15,16,17,18]
        ]
    ]
sm_sc.fv_rmask 高宽二维面右部分逐个高度位置按给定长度掩码。
入参:
  1. 原矩阵;
  2. 逐个高度位置掩码长度;
  3. 填充值;
select  
    sm_sc.fv_rmask
    (
        array
        [
            [
                [1,  2,  3,  4,  5]
            ,  [2,  3,  4,  5,  6]
            ,  [3,  4,  5,  6,  7]
            ,  [4,  5,  6,  7,  8]
            ]
        ,  [
                [-1,  -2,  -3,  -4,  -5]
            ,  [-2,  -3,  -4,  -5,  -6]
            ,  [-3,  -4,  -5,  -6,  -7]
            ,  [-4,  -5,  -6,  -7,  -8]
            ]
        ,  [
                [11,  12,  13,  14,  15]
            ,  [12,  13,  14,  15,  16]
            ,  [13,  14,  15,  16,  17]
            ,  [14,  15,  16,  17,  18]
            ]
        ]
    ,  array
        [
            [
                [3]
            ,  [0]
            ,  [2]
            ,  [1]
            ]
        ,  [
                [1]
            ,  [1]
            ,  [4]
            ,  [2]
            ]
        ,  [
                [3]
            ,  [5]
            ,  [2]
            ,  [1]
            ]
        ]
    ,  0
    )

返回:
    array
    [
        [
            [1,2,0,0,0]
        ,  [2,3,4,5,6]
        ,  [3,4,5,0,0]
        ,  [4,5,6,7,0]
        ]
    ,  [
            [-1,-2,-3,-4,0]
        ,  [-2,-3,-4,-5,0]
        ,  [-3,0,0,0,0]
        ,  [-4,-5,-6,0,0]
        ]
    ,  [
            [11,12,0,0,0]
        ,  [0,0,0,0,0]
        ,  [13,14,15,0,0]
        ,  [14,15,16,17,0]
        ]
    ]
sm_sc.fv_amask 高宽二维面上部分逐个宽度位置按给定长度掩码。
入参:
  1. 原矩阵;
  2. 逐个宽度位置掩码长度;
  3. 填充值;
select  
    sm_sc.fv_amask
    (
        array
        [
            [
                [1,  2,  3,  4,  5]
            ,  [2,  3,  4,  5,  6]
            ,  [3,  4,  5,  6,  7]
            ,  [4,  5,  6,  7,  8]
            ]
        ,  [
                [-1,  -2,  -3,  -4,  -5]
            ,  [-2,  -3,  -4,  -5,  -6]
            ,  [-3,  -4,  -5,  -6,  -7]
            ,  [-4,  -5,  -6,  -7,  -8]
            ]
        ,  [
                [11,  12,  13,  14,  15]
            ,  [12,  13,  14,  15,  16]
            ,  [13,  14,  15,  16,  17]
            ,  [14,  15,  16,  17,  18]
            ]
        ]
    ,  array
        [
            [
                [3,  0,  2,  1,  0]
            ]
        ,  [
                [1,  1,  4,  2,  1]
            ]
        ,  [
                [3,  2,  2,  1,  4]
            ]
        ]
    ,  0
    )

返回:
    array
    [
        [
            [0,2,0,0,5]
        ,  [0,3,0,5,6]
        ,  [0,4,5,6,7]
        ,  [4,5,6,7,8]
        ]
    ,  [
            [0,0,0,0,0]
        ,  [-2,-3,0,0,-6]
        ,  [-3,-4,0,-6,-7]
        ,  [-4,-5,0,-7,-8]
        ]
    ,  [
            [0,0,0,0,0]
        ,  [0,0,0,15,0]
        ,  [0,14,15,16,0]
        ,  [14,15,16,17,0]
        ]
    ]
sm_sc.fv_bmask 高宽二维面下部分逐个宽度位置按给定长度掩码。
入参:
  1. 原矩阵;
  2. 逐个宽度位置掩码长度;
  3. 填充值;
select  
    sm_sc.fv_bmask
    (
        array
        [
            [
                [1,  2,  3,  4,  5]
            ,  [2,  3,  4,  5,  6]
            ,  [3,  4,  5,  6,  7]
            ,  [4,  5,  6,  7,  8]
            ]
        ,  [
                [-1,  -2,  -3,  -4,  -5]
            ,  [-2,  -3,  -4,  -5,  -6]
            ,  [-3,  -4,  -5,  -6,  -7]
            ,  [-4,  -5,  -6,  -7,  -8]
            ]
        ,  [
                [11,  12,  13,  14,  15]
            ,  [12,  13,  14,  15,  16]
            ,  [13,  14,  15,  16,  17]
            ,  [14,  15,  16,  17,  18]
            ]
        ]
    ,  array
        [
            [
                [3,  0,  2,  1,  0]
            ]
        ,  [
                [1,  1,  4,  2,  1]
            ]
        ,  [
                [3,  2,  2,  1,  4]
            ]
        ]
    ,  0
    )

返回:
    array
    [
        [
            [1,2,3,4,5]
        ,  [0,3,4,5,6]
        ,  [0,4,0,6,7]
        ,  [0,5,0,0,8]
        ]
    ,  [
            [-1,-2,0,-4,-5]
        ,  [-2,-3,0,-5,-6]
        ,  [-3,-4,0,0,-7]
        ,  [0,0,0,0,0]
        ]
    ,  [
            [11,12,13,14,0]
        ,  [0,13,14,15,0]
        ,  [0,0,0,16,0]
        ,  [0,0,0,0,0]
        ]
    ]
sm_sc.fv_ele_replace 指定元素值替换为另外指定元素值。
入参:
  1. 原矩阵;
  2. 被替换的一个或多个元素值;
  3. 新元素值;
select
  sm_sc.fv_ele_replace
  (
    array[[12.3, 25.1],[3.25, 6.1]]
  , array[12.3, 3.25]
  , 1.0
  );

返回:
  array[[1.0, 25.1],[1.0, 6.1]]
sm_sc.fv_area_replace 指定位置区域替换切片或切块。
入参:
  1. 原矩阵;
  2. 被替换块在元矩阵的起始位置;
  3. 替换块矩阵;
select
  sm_sc.fv_area_replace
  (
    array[['a', 'b', 'c'],['e', 'f', 'g'],['h', 'i', 'j'],['x', 'y', 'z']]
  , array[3, 2]
  , array[['m', 'n'],['p', 'q']]
  );

返回:
  array[['a', 'b', 'c'],['e', 'f', 'g'],['h', 'm', 'n'],['x', 'p', 'q']]
sm_sc.fv_pos_replaces 指定若干位置替换为指定元素值。
入参:
  1. 原矩阵;
  2. 被替换位置清单;
  3. 新元素值;
select
  sm_sc.fv_pos_replaces
  (
    array[['a', 'b', 'c'],['e', 'f', 'g']]
  , array[[1, 3],[2, 2]]
  , 'd'
  );

返回:
  array[['a', 'b', 'd'],['e', 'd', 'g']]
sm_sc.fv_regexp_matches 文本矩阵元素值正则匹配。
入参:
  1. 原文本矩阵;
  2. 正则表达式;
  3. 正则表达式选项标记。缺省为 'g';
select
  sm_sc.fv_regexp_matches
  (
    array[['abbbbbc122223', 'abc123adc'],['abc123', 'ac13']]
  , array['a.c']
  , 'gi'
  );

返回:
  array[[null, '"{{abc},{adc}}"'],['"{{abc}}"', null]]
sm_sc.fv_regexp_replace 文本矩阵元素值正则替换。
入参:
  1. 原文本矩阵;
  2. 正则表达式;
  3. 替换新文本;
  4. 正则表达式选项标记。缺省为 'g';
select
  sm_sc.fv_regexp_replace
  (
    array[['abbbbbc122223', 'abc123adc'],['abc123', 'ac13']]
  , array[['a.c'], ['1.*?3']]
  , 'fff'
  , 'gi'
  );

返回:
  array[['abbbbbc122223', 'fff123fff'],['abcfff', 'acfff']]
sm_sc.fv_nullif 元素避值。
入参:
  1. 原矩阵;
  2. 回避敏感值矩阵;
select
  sm_sc.fv_nullif
  (
    array[[12.3, -12.3],[45.6, -45.6]]
  , array[[12.3],[-45.6]]
  );

返回:
  array[[null,-12.3],[45.6,null]]
sm_sc.fv_coalesce
sm_sc.fv_coalesce_variadic
元素免空。
  sm_sc.fv_coalesce 入参:
    1. 优先首个非空元素获取;
    2. 次优先首个非空元素获取;
--------------------------
  sm_sc.fv_coalesce_variadic 入参:
    1...n. 依次序首个非空元素获取;
select
  sm_sc.fv_coalesce
  (
    array[null, 2.4, 5.6, 52.3]
  , array[1.2, 2.3, null, 52.1]
  );

返回:
  array[[],[]]
--------------------------
select
  sm_sc.fv_coalesce_variadic
  (variadic
    array[[null, 2.4, 5.6, 52.3]
            ,[null, 2.3, null, 52.1]
            ,[1.2, 2.8, null, null]]
  );

返回:
  array[{1.2, 2.4, 5.6, 52.3}]
sm_sc.fv_lpad 右对齐左填充。
对于三维数组与四维数组,以最深的两个维度为方位的背景依据,
  即三维的 x, x3;四维的 x3, x4。
入参:
  1. 原矩阵;
  2. 填充值矩阵;
  3. 重复次数;
select
  sm_sc.fv_lpad
  (
    array[[1, 2, 3, 4, 5, 6],[-1, -2, -3, -4, -5, -6]]
  , array[[7],[8]]
  , 2
  );

返回:
  array[[7, 7, 1, 2, 3, 4, 5, 6]
          ,[8, 8, -1, -2, -3, -4, -5, -6]]
sm_sc.fv_rpad 左对齐右填充。
对于三维数组与四维数组,以最深的两个维度为方位的背景依据,
  即三维的 x, x3;四维的 x3, x4。
入参:
  1. 原矩阵;
  2. 填充值矩阵;
  3. 重复次数;
select
  sm_sc.fv_rpad
  (
    array[[1, 2, 3, 4, 5, 6],[-1, -2, -3, -4, -5, -6]]
  , array[[7],[8]]
  , 2
  );

返回:
  array[[1, 2, 3, 4, 5, 6, 7, 7]
          ,[-1, -2, -3, -4, -5, -6, 8, 8]]
sm_sc.fv_apad 下对齐上填充。
对于三维数组与四维数组,以最深的两个维度为方位的背景依据,
  即三维的 x, x3;四维的 x3, x4。
入参:
  1. 原矩阵;
  2. 填充值矩阵;
  3. 重复次数;
select
  sm_sc.fv_apad
  (
    array[[1, 2, 3, 4, 5, 6],[-1, -2, -3, -4, -5, -6]]
  , array[[7],[8]]
  , 2
  );

返回:
  array[[7, 7, 7, 7, 7, 7]
          ,[8, 8, 8, 8, 8, 8]
          ,[7, 7, 7, 7, 7, 7]
          ,[8, 8, 8, 8, 8, 8]
          ,[1, 2, 3, 4, 5, 6]
          ,[-1, -2, -3, -4, -5, -6]]
sm_sc.fv_bpad 上对齐下填充。
对于三维数组与四维数组,以最深的两个维度为方位的背景依据,
  即三维的 x, x3;四维的 x3, x4。
入参:
  1. 原矩阵;
  2. 填充值矩阵;
  3. 重复次数;
select
  sm_sc.fv_bpad
  (
    array[[1, 2, 3, 4, 5, 6],[-1, -2, -3, -4, -5, -6]]
  , array[[7],[8]]
  , 2
  );

返回:
  array[[1, 2, 3, 4, 5, 6]
          ,[-1, -2, -3, -4, -5, -6]
          ,[7, 7, 7, 7, 7, 7]
          ,[8, 8, 8, 8, 8, 8]
          ,[7, 7, 7, 7, 7, 7]
          ,[8, 8, 8, 8, 8, 8]]
sm_sc.fv_trim 上下左右消去某元素值置空。
对于三维数组与四维数组,以最深的两个维度为方位的背景依据,
  即三维的 x, x3;四维的 x3, x4。
入参:
  1. 原矩阵;
  2. 被端头置空的元素值
select
  sm_sc.fv_trim
  (
    array[[2, 0, 0, 0, 0, 0]
            ,[1, 2, 0, 4, 0, 0]
            ,[0, 0, 1, 0, 2, 0]
            ,[0, 1, 2, 2, 0, 0]
            ,[1, 0, 1, 0, 0, 3]]
  , 0
  );

返回:
  array[[2, null, null, null, null, null]
          ,[1, 2, null, 4, null, null]
          ,[null, null, 1, 0, 2, null]
          ,[null, 1, 2, 2, null, null]
          ,[1, null, 1, null, null, 3]]
sm_sc.fv_ltrim 左消去某元素值置空。
对于三维数组与四维数组,以最深的两个维度为方位的背景依据,
  即三维的 x, x3;四维的 x3, x4。
入参:
  1. 原矩阵;
  2. 被端头置空的元素值
select
  sm_sc.fv_ltrim
  (
    array[[0, 1, 2, 3, 4, 5]
            ,[0, 0, 1, 2, 0, 4]
            ,[0, 0, 0, 1, 2, 3]
            ,[0, 0, 0, 0, 1, 2]
            ,[0, 0, 1, 0, 0, 3]]
  , 0
  );

返回:
  array[[null, 1, 2, 3, 4, 5]
          ,[null, null, 1, 2, 0, 4]
          ,[null, null, null, 1, 2, 3]
          ,[null, null, null, null, 1, 2]
          ,[null, null, 1, 0, 0, 3]]
sm_sc.fv_rtrim 右消去某元素值置空。
对于三维数组与四维数组,以最深的两个维度为方位的背景依据,
  即三维的 x, x3;四维的 x3, x4。
入参:
  1. 原矩阵;
  2. 被端头置空的元素值
select
  sm_sc.fv_rtrim
  (
    array[[0, 1, 2, 3, 4, 5, 0]
            ,[4, 0, 0, 1, 2, 0, 0]
            ,[0, 1, 2, 3, 0, 0, 0]
            ,[0, 1, 2, 0, 0, 0, 0]
            ,[0, 0, 1, 0, 0, 3, 0]]
  , 0
  );

返回:
  array[[0, 1, 2, 3, 4, 5, NULL]
          ,[4, 0, 0, 1, 2, NULL, NULL]
          ,[0, 1, 2, 3, NULL, NULL, NULL]
          ,[0, 1, 2, NULL, NULL, NULL, NULL]
          ,[0, 0, 1, 0, 0, 3, NULL]]
sm_sc.fv_atrim 上消去某元素值置空。
对于三维数组与四维数组,以最深的两个维度为方位的背景依据,
  即三维的 x, x3;四维的 x3, x4。
入参:
  1. 原矩阵;
  2. 被端头置空的元素值
select
  sm_sc.fv_atrim
  (
    array[[0, 0, 0, 0, 0, 2]
            ,[0, 0, 1, 2, 0, 4]
            ,[0, 1, 0, 2, 0, 0]
            ,[0, 0, 0, 0, 1, 2]
            ,[1, 0, 1, 0, 0, 3]]
  , 0
  );

返回:
  array[[NULL, NULL, NULL, NULL, NULL, 2]
          ,[NULL, NULL, 1, 2, NULL, 4]
          ,[NULL, 1, 0, 2, NULL, 0]
          ,[NULL, 0, 0, 0, 1, 2]
          ,[1, 0, 1, 0, 0, 3]]
sm_sc.fv_btrim 下消去某元素值置空。
对于三维数组与四维数组,以最深的两个维度为方位的背景依据,
  即三维的 x, x3;四维的 x3, x4。
入参:
  1. 原矩阵;
  2. 被端头置空的元素值
select
  sm_sc.fv_btrim
  (
    array[[2, 0, 0, 0, 0, 0]
            ,[1, 2, 0, 4, 0, 0]
            ,[0, 0, 1, 0, 2, 0]
            ,[0, 1, 2, 0, 0, 0]
            ,[1, 0, 1, 0, 0, 3]]
  , 0
  );

返回:
  array[[2, 0, 0, 0, 0, 0]
          ,[1, 2, 0, 4, 0, 0]
          ,[0, 0, 1, NULL, 2, 0]
          ,[0, 1, 2, NULL, NULL, 0]
          ,[1, NULL, 1, NULL, NULL, 3]]

d. 矩阵的三角函数广播运算:

函数名 函数说明 调用举例
sm_sc.fv_degrees 元素、点(广播)弧度转角度。
入参:
  1. 原弧度矩阵;
select
  sm_sc.fv_degrees
  (
    array[[12.64, -12.64],[3.16, -3.16],[0.1, -0.1]]
  );

返回:
  array[[724.2187, -724.2187],[181.0547, -181.0547],[5.7296, -5.7296]]
sm_sc.fv_radians 元素、点(广播)角度转弧度。
入参:
  1. 原角度矩阵;
select
  sm_sc.fv_radians
  (
    array[[89, -90],[181, -270],[0, -360.1]]
  );

返回:
  array[[1.5533, -1.5708],[3.1590, -4.7124],[0, -6.2849]]
sm_sc.fv_sin 元素、点(广播)弧度正弦。
入参:
  1. 原弧度矩阵;
select
  sm_sc.fv_sin
  (
    array[[pi(), -pi()],[pi() / 2, pi() / 4]]::double precision[]
  );

返回:
  array[[1.5533, -1.5708],[3.1590, -4.7124],[0, -6.2849]]
sm_sc.fv_cos 元素、点(广播)弧度余弦。
入参:
  1. 原弧度矩阵;
select
  sm_sc.fv_cos
  (
    array[[pi(), -pi()],[pi() / 2, pi() / 4]]::double precision[]
  );

返回:
  array[[-1, -1],[0, 0.7071]]
sm_sc.fv_tan 元素、点(广播)弧度正切。
入参:
  1. 原弧度矩阵;
select
  sm_sc.fv_tan
  (
    array[[pi(), -pi()],[pi() / 2, pi() / 4]]::double precision[]
  );

返回:
  array[[0, 0],[1.6331e+16, 1]]
sm_sc.fv_cot 元素、点(广播)弧度余切。
入参:
  1. 原弧度矩阵;
select
  sm_sc.fv_cot
  (
    array[[pi(), -pi()],[pi() / 2, pi() / 4]]::double precision[]
  );

返回:
  array[[-8.1656e+15, 8.1656e+15],[0, 1]]
sm_sc.fv_sec 元素、点(广播)弧度正割。
入参:
  1. 原弧度矩阵;
select
  sm_sc.fv_sec
  (
    array[[pi(), -pi()],[pi() / 2, pi() / 4]]::double precision[]
  );

返回:
  array[[-1.0, -1.0],[1.6331e+16, 1.414]]
sm_sc.fv_csc 元素、点(广播)弧度余割。
入参:
  1. 原弧度矩阵;
select
  sm_sc.fv_csc
  (
    array[[pi(), -pi()],[pi() / 2, pi() / 4]]::double precision[]
  );

返回:
  array[[8.1656e+15, -8.1656e+15],[1.0, 1.414]]
sm_sc.fv_sind 元素、点(广播)角度正弦。
入参:
  1. 原角度矩阵;
select
  sm_sc.fv_sind
  (
    array[[180, -180],[90, 45]]::double precision[]
  );

返回:
  array[[0, -0],[1, 0.7071]]
sm_sc.fv_cosd 元素、点(广播)角度余弦。
入参:
  1. 原角度矩阵;
select
  sm_sc.fv_cosd
  (
    array[[180, -180],[90, 45]]::double precision[]
  );

返回:
  array[[-1, -1],[1, 0.7071]]
sm_sc.fv_tand 元素、点(广播)角度正切。
入参:
  1. 原角度矩阵;
select
  sm_sc.fv_tand
  (
    array[[180, -180],[90, 45]]::double precision[]
  );

返回:
  array[[0, 0],[Infinity, 1]]
sm_sc.fv_cotd 元素、点(广播)角度余切。
入参:
  1. 原角度矩阵;
select
  sm_sc.fv_cotd
  (
    array[[180, -180],[90, 45]]::double precision[]
  );

返回:
  array[[-Infinity, Infinity],[0, 1]]
sm_sc.fv_asin 元素、点(广播)弧度反正弦。
入参:
  1. 原弧度矩阵;
select
  sm_sc.fv_asin
  (
    array[[1, -1],[0.5, 0.25]]::double precision[]
  );

返回:
  array[[1.5708, -1.5708],[0.5236, 0.2527]]
sm_sc.fv_acos 元素、点(广播)弧度反余弦。
入参:
  1. 原弧度矩阵;
select
  sm_sc.fv_acos
  (
    array[[1, -1],[0.5, 0.25]]::double precision[]
  );

返回:
  array[[0, 3.1416],[1.0472, 1.3181]]
sm_sc.fv_atan 元素、点(广播)弧度反正切。
入参:
  1. 原弧度矩阵;
select
  sm_sc.fv_atan
  (
    array[[1, -1],[0.5, 0.25]]::double precision[]
  );

返回:
  array[[0.7854, -0.7854],[0.4636, 0.2450]]
sm_sc.fv_asind 元素、点(广播)角度反正弦。
入参:
  1. 原角度矩阵;
select
  sm_sc.fv_asind
  (
    array[[1, -1], [1.0 :: float/ 2, 1.0 :: float/ 4]]::double precision[]
  );

返回:
  array[[90, -90],[30, 14.4775]]
sm_sc.fv_acosd 元素、点(广播)角度反余弦。
入参:
  1. 原角度矩阵;
select
  sm_sc.fv_acosd
  (
    array[[1, -1], [1.0 :: float/ 2, 1.0 :: float/ 4]]::double precision[]
  );

返回:
  array[[0, 180],[60, 75.5225]]
sm_sc.fv_atand 元素、点(广播)角度反正切。
入参:
  1. 原角度矩阵;
select
  sm_sc.fv_atand
  (
    array[[1, -1],[1.0 / 2, 1.0 / 4],['-Infinity', 'Infinity']]::double precision[]
  );

返回:
  array[[45, -45],[26.5651, 14.0362],[-90, 90]]
sm_sc.fv_sinh 元素、点(广播)双曲正弦。
入参:
  1. 原矩阵;
select
  sm_sc.fv_sinh
  (
    array[[pi(), -pi()],[pi() / 2, pi() / 4]]::double precision[]
  );

返回:
  array[[11.5487, -11.5487],[2.3013, 0.8687]]
sm_sc.fv_cosh 元素、点(广播)双曲余弦。
入参:
  1. 原矩阵;
select
  sm_sc.fv_cosh
  (
    array[[pi(), -pi()],[pi() / 2, pi() / 4]]::double precision[]
  );

返回:
  array[[11.5920, 11.5920],[2.5092, 1.3246]]
sm_sc.fv_tanh 元素、点(广播)双曲正切。
入参:
  1. 原矩阵;
select
  sm_sc.fv_tanh
  (
    array[[pi(), -pi()],[pi() / 2, pi() / 4]]::double precision[]
  );

返回:
  array[[0.9963, -0.9963],[0.9176, 0.6558]]
sm_sc.fv_asinh 元素、点(广播)反双曲正弦。
入参:
  1. 原矩阵;
select
  sm_sc.fv_asinh
  (
    array[[1, -1],[0.5, 0.25],['-Infinity', 'Infinity']]::double precision[]
  );

返回:
  array[[0.8814, -0.8814],[0.4812, 0.2475],[-Infinity,Infinity]]
sm_sc.fv_acosh 元素、点(广播)反双曲余弦。
入参:
  1. 原矩阵;
select
  sm_sc.fv_acosh
  (
    array[[1.2, 1.3],[1.5, 1.25],[1.0, 'Infinity']]::double precision[]
  );

返回:
  array[[0.6224, 0.7564],[0.9624, 0.6931],[0,Infinity]]
sm_sc.fv_atanh 元素、点(广播)反双曲正切。
入参:
  1. 原矩阵;
select
  sm_sc.fv_atanh
  (
    array[[1, -1],[0.5, 0.25]]::double precision[]
  );

返回:
  array[[Infinity, -Infinity],[0.5493, 0.2554]]

e. 波形处理:

函数名 函数说明 调用举例
sm_sc.fv_grad_heigh_1st 矩阵y方向一阶差分。
输出高度比输入长度小1。
入参:
  1. 原矩阵;
select
  sm_sc.fv_grad_heigh_1st
  (
    array[[1, 2, 3, 4],[-1, -2, -3, -4],[-3, -2, -4, -1]]
  );

返回:
  array[[-2, -4, -6, -8],[-2, 0, -1, 3]]
sm_sc.fv_grad_heigh_2nd 矩阵y方向二阶差分。
输出高度比输入长度小2。
入参:
  1. 原矩阵;
select
  sm_sc.fv_grad_heigh_2nd
  (
    array[[1, 2, 3, 4],[-1, -2, -3, -4],[-3, -2, -4, -1]]
  );

返回:
  array[[0, 4, 5, 11]]
sm_sc.fv_grad_width_1st 矩阵x方向一阶差分。
输出长度比输入长度小1。
入参:
  1. 原矩阵;
select
  sm_sc.fv_grad_width_1st
  (
    array[[1, 2, 3, 4],[-1, -2, -3, -4],[-3, -2, -4, -1]]
  );

返回:
  array[[1, 1, 1],[-1, -1, -1],[1, -2, 3]]
sm_sc.fv_grad_width_2nd 矩阵x方向二阶差分。
输出长度比输入长度小2。
入参:
  1. 原矩阵;
select
  sm_sc.fv_grad_width_2nd
  (
    array[[1, 2, 3, 4],[-1, -2, -3, -4],[-3, -2, -4, -1]]
  );

返回:
  array[[0, 0],[-3, 5]]
sm_sc.fv_sgn_fft 一维快速傅里叶变换。
输出长度为2的整数幂。
入参:
  1. 原时域序列;
select
  sm_sc.fv_sgn_fft
  (
    array
    [
       1. , 0.97952994, 0.91895781, 0.82076344, 0.68896692, 0.52896401,
       0.34730525, 0.15142778, -0.05064917, -0.25065253, -0.44039415, -0.61210598,
       -0.75875812, -0.87434662, -0.95413926, -0.99486932, -0.99486932, -0.95413926,
       -0.87434662, -0.75875812, -0.61210598, -0.44039415, -0.25065253, -0.05064917,
       0.15142778, 0.34730525, 0.52896401, 0.68896692, 0.82076344, 0.91895781,
       0.97952994, 1.
    ]
  );

返回复数类型数组(sm_sc.typ_l_complex[]):
  array
  [
    1.00000000e+00+0.00000000e+00j, 1.61497357e+01+1.59061014e+00j,
    -3.53833224e-01-7.03818042e-02j, -1.26604779e-01-3.84051399e-02j,
    -6.41365736e-02-2.65662386e-02j, -3.75538211e-02-2.00729356e-02j,
    -2.37109631e-02-1.58431590e-02j, -1.55930224e-02-1.27968628e-02j,
    -1.04489194e-02-1.04489194e-02j, -7.01356383e-03-8.54605226e-03j,
    -4.63822579e-03-6.94159545e-03j, -2.96316279e-03-5.54368767e-03j,
    -1.77736596e-03-4.29094101e-03j, -9.52464878e-04-3.13985591e-03j,
    -4.09315616e-04-2.05776856e-03j, -1.00322243e-04-1.01858882e-03j,
     2.22044605e-16+0.00000000e+00j, -1.00322243e-04+1.01858882e-03j,
    -4.09315616e-04+2.05776856e-03j, -9.52464878e-04+3.13985591e-03j,
    -1.77736596e-03+4.29094101e-03j, -2.96316279e-03+5.54368767e-03j,
    -4.63822579e-03+6.94159545e-03j, -7.01356383e-03+8.54605226e-03j,
    -1.04489194e-02+1.04489194e-02j, -1.55930224e-02+1.27968628e-02j,
    -2.37109631e-02+1.58431590e-02j, -3.75538211e-02+2.00729356e-02j,
    -6.41365736e-02+2.65662386e-02j, -1.26604779e-01+3.84051399e-02j,
    -3.53833224e-01+7.03818042e-02j, 1.61497357e+01-1.59061014e+00j
  ]
sm_sc.fv_sgn_ifft 一维快速傅里叶逆变换。
输出长度为2的整数幂。
入参:
  1. 原频域序列;
select
  sm_sc.fv_sgn_ifft
  (
    array
    [
       1. , 0.97952994, 0.91895781, 0.82076344, 0.68896692, 0.52896401,
       0.34730525, 0.15142778, -0.05064917, -0.25065253, -0.44039415, -0.61210598,
       -0.75875812, -0.87434662, -0.95413926, -0.99486932, -0.99486932, -0.95413926,
       -0.87434662, -0.75875812, -0.61210598, -0.44039415, -0.25065253, -0.05064917,
       0.15142778, 0.34730525, 0.52896401, 0.68896692, 0.82076344, 0.91895781,
       0.97952994, 1.
    ]
  );

返回复数类型数组(sm_sc.typ_l_complex[]):
  array
  [
    -0.00014495-0.00021693j, -0.00009260-0.00017324j,
    -0.00005554-0.00013409j, -0.00002977-0.00009812j,
    -0.00001279-0.00006431j, -0.00000314-0.00003183j,
    0.00000000+0.00000000j , -0.00000314+0.00003183j,
    -0.00001279+0.00006431j, -0.00002977+0.00009812j,
    -0.00005554+0.00013409j, -0.00009260+0.00017324j,
    -0.00014495+0.00021693j, -0.00021917+0.00026707j,
    -0.00032653+0.00032653j, -0.00048729+0.00039991j,
    -0.00074097+0.00049510j, -0.00117356+0.00062728j,
    -0.00200427+0.00083020j, -0.00395641+0.00120017j,
    -0.01105730+0.00219944j, 0.50467924-0.04970657j
  ]
sm_sc.fv_sgn_fft2 二维快速傅里叶变换。
输出高宽为2的整数幂。
入参:
  1. 原时域序列;
select
  sm_sc.fv_sgn_fft2
  (
    array[[1, 2, 3, 4],[4, 5, 6, 7],[8, 9, 10, 11]]
  );

返回:
  array[[70.0+0.0j, -6.0-6.0j, -6.0+0.0j, -6.0+6.0j]
          ,[-28.0+22.0j, 2.0-2.0j, 0.0-2.0j, -2.0-2.0j]
          ,[26.0+0.0j, -2.0-2.0j, -2.0+0.0j, -2.0+2.0j]
          ,[-28.0-22.0j, -2.0+2.0j, 0.0+2.0j, 2.0+2.0j]]
sm_sc.fv_sgn_ifft2 二维快速傅里叶逆变换。
输出高宽为2的整数幂。
入参:
  1. 原频域序列;
select
  sm_sc.fv_sgn_ifft2
  (
    array[[1, 2, 3, 4],[4, 5, 6, 7],[8, 9, 10, 11]]
  );

返回:
  array[[4.3750+0.0000j, -0.3750+0.3750j, -0.3750+0.0000j, -0.3750-0.3750j]
          ,[-1.7500-1.3750j, 0.1250+0.1250j, 0.0000+0.1250j, -0.1250+0.1250j]
          ,[1.6250+0.0000j, -0.1250+0.1250j, -0.1250+0.0000j, -0.1250-0.1250j]
          ,[-1.7500+1.3750j, -0.1250-0.1250j, 0.0000-0.1250j, 0.1250-0.1250j]]
sm_sc.fv_sgn_kalman 卡尔曼滤波变换。
输出序列比输入序列长度大1。
入参:
  1. 原时域序列;

-- create extension tablefunc;
with
-- 构造精确序列
cte_ods as
(
   select
     row_number() over() as row_no,
     a_x,
     10 * sin(a_x) :: float as ods_ele
   from generate_series(0.0::decimal, pi()::decimal, (pi() / 100)::decimal) tb_a(a_x)
)
,
-- 构造误差序列
cte_test as
(
   select
     row_no,
     ods_ele + normal_rand(1, 0.0, 0.5) :: float as test_ele -- 假定观测误差标准差 0.5
   from cte_ods
)
,
-- 执行卡尔曼滤波
cte_predict as
(
   select
     sm_sc.fv_sgn_kalman
     (
       array_agg(test_ele order by row_no),
       0.4 * 0.4 , -- 假定过程误差标准差 0.4
       0.5 * 0.5 , -- 假定观测误差标准差 0.5
       0.5 * 0.5
     ) as predict_arr
   from cte_test
)
-- 对比结果
select
   a_x, a_ods_ele, a_test_ele, a_predict_ele
   -- sum(abs(a_test_ele - a_ods_ele) - abs(a_predict_ele - a_ods_ele))
from unnest
(
   (select array_agg(a_x) from cte_ods),
   (select array_agg(ods_ele) from cte_ods),
   (select array_agg(test_ele) from cte_test),
   (select predict_arr from cte_predict)
)  tb_a(a_x, a_ods_ele, a_test_ele, a_predict_ele)

返回:
    a_x              a_ods_ele   a_test_ele     a_predict_ele
    0.00000000 0.00000000 -0.07238570 -0.07238570
    0.03141593 0.31410760 0.06269807 0.01152998
    0.06283186 0.62790530 0.90212888 0.50826981
    0.09424779 0.94108320 1.73031760 1.17427501
    0.12566372 1.25333250 0.59666534 0.86101867
    0.15707965 1.56434480 1.01786649 0.94599484
    0.18849558 1.87381340 2.09580312 1.56879714
    0.21991151 2.18143270 2.11825104 1.86639946
    0.25132744 2.48689910 2.55075390 2.23706481
    0.28274337 2.78991140 2.60066296 2.43399926
    0.31415930 3.09017030 2.45377347 2.44470949
    0.34557523 3.38737960 3.72143761 3.13621913
    0.37699116 3.68124590 2.99812719 3.06142489
    0.40840709 3.97147930 3.42792734 3.25993228
    0.43982302 4.25779340 4.31830536 3.83317505
    0.47123895 4.53990550 4.56145212 4.22762911
    0.50265488 4.81753720 5.06905005 4.68336488
    0.53407081 5.09041470 5.45222292 5.09979867
    0.56548674 5.35826850 5.81926993 5.48948327
    0.59690267 5.62083430 5.97156983 5.75059406
    0.62831860 5.87785310 6.19611739 5.99190124
    0.65973453 6.12907110 6.98108901 6.52767142
    0.69115046 6.37424050 5.99603643 6.23972389
    0.72256639 6.61311930 6.28735803 6.26552380
    0.75398232 6.84547170 5.74105687 5.98145868
    0.78539825 7.07106840 6.77602618 6.41181739
    0.81681418 7.28968690 6.85151619 6.64996985
    0.84823011 7.50111130 6.38093462 6.50425328
    0.87964604 7.70513300 7.66786487 7.13449600
    0.91106197 7.90155070 8.07567306 7.64426231
    0.94247790 8.09017060 7.87262345 7.76794872
    0.97389383 8.27080630 8.31935211 8.06660333
    1.00530976 8.44327980 8.86376730 8.49836836
    1.03672569 8.60742090 8.06964373 8.26615980
    1.06814162 8.76306740 9.41039761 8.88590917
    1.09955755 8.91006580 8.92835762 8.90890037
    1.13097348 9.04827110 8.68164490 8.78581282
    1.16238941 9.17754680 9.27285046 9.04960525
    1.19380534 9.29776530 9.65991384 9.38016447
    1.22522127 9.40880810 9.37680006 9.37834222
    1.25663720 9.51056560 9.17752884 9.26957640
    1.28805313 9.60293730 8.78020289 9.00451880
    1.31946906 9.68583200 9.57998840 9.31620831
    1.35088499 9.75916790 9.27521528 9.29400540
    1.38230092 9.82287280 9.78488155 9.55987687
    1.41371685 9.87688360 10.32271604 9.97305068
    1.44513278 9.92114720 10.41625520 10.21310193
    1.47654871 9.95561980 9.17540882 9.65105998
    1.50796464 9.98026740 9.11660215 9.36158353
    1.53938057 9.99506570 10.34605545 9.89479948
    1.57079650 10.00000000 10.35161797 10.14222442
    1.60221243 9.99506550 9.88948807 10.00533575
    1.63362836 9.98026720 10.25024667 10.13798596
    1.66504429 9.95561950 9.73600478 9.92026235
    1.69646022 9.92114680 10.15850842 10.04930270
    1.72787615 9.87688310 11.01563448 10.57269347
    1.75929208 9.82287210 10.40551561 10.48214553
    1.79070801 9.75916720 10.51001749 10.49724172
    1.82212394 9.68583110 9.82572837 10.13353238
    1.85353987 9.60293630 10.46598167 10.31359568
    1.88495580 9.51056450 9.31690803 9.77376337
    1.91637173 9.40880700 9.12661892 9.42325287
    1.94778766 9.29776410 9.47494195 9.45124904
    1.97920359 9.17754540 8.83534106 9.11765704
    2.01061952 9.04826960 8.42020767 8.73990007
    2.04203545 8.91006420 9.31084849 9.04914079
    2.07345138 8.76306570 8.58320157 8.79677582
    2.10486731 8.60741910 8.81196387 8.80500207
    2.13628324 8.44327800 8.83431931 8.82088106
    2.16769917 8.27080440 8.69911763 8.75493078
    2.19911510 8.09016850 8.49712138 8.61529441
    2.23053103 7.90154860 7.52881785 8.02683006
    2.26194696 7.70513080 7.73606742 7.86934535
    2.29336289 7.50110900 6.90444588 7.34673036
    2.32477882 7.28968450 7.20778566 7.27147425
    2.35619475 7.07106600 7.04657670 7.14966381
    2.38761068 6.84546910 6.19311495 6.63157173
    2.41902661 6.61311670 7.75630107 7.24075480
    2.45044254 6.37423780 6.12010764 6.63378275
    2.48185847 6.12906840 6.65184129 6.64356373
    2.51327440 5.87785030 5.50467567 6.02671193
    2.54469033 5.62083150 4.62287829 5.26635862
    2.57610626 5.35826560 4.54544759 4.87589420
    2.60752219 5.09041170 4.88442549 4.88051497
    2.63893812 4.81753420 4.73826616 4.80346926
    2.67035405 4.53990240 5.22731399 5.03303474
    2.70176998 4.25779020 4.36847656 4.67309251
    2.73318591 3.97147610 4.07646885 4.34994540
    2.76460184 3.68124270 4.36259811 4.35679844
    2.79601777 3.38737630 3.42840169 3.85395428
    2.82743370 3.09016700 3.66048294 3.74916510
    2.85884963 2.78990800 2.66247256 3.16058377
    2.89026556 2.48689580 2.18075736 2.62988395
    2.92168149 2.18142930 1.64406354 2.09593762
    2.95309742 1.87380990 2.32140082 2.21805443
    2.98451335 1.56434140 1.76298351 1.97157602
    3.01592928 1.25332900 1.88917658 1.92694631
    3.04734521 0.94107980 1.13478766 1.49789230
    3.07876114 0.62790180 -0.13328145 0.61440559
    3.11017707 0.31410420 -0.54286213 -0.01240112
                        0.31651924

f. 矩阵的切片粒度聚合、矩阵粒度聚合、以某切片值排序、切片粒度定位极值位置:

函数名 函数说明 调用举例
sm_sc.fv_aggr_slice_sum 元素聚合合计。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_sum
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  2.75
sm_sc.fv_aggr_slice_prod 元素聚合累乘。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_prod
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  -19.305
sm_sc.fv_aggr_slice_avg 元素聚合平均。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_avg
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  0.6875
sm_sc.fv_aggr_slice_max 元素聚合最大。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_max
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  2.25
sm_sc.fv_aggr_slice_min 元素聚合最小。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_min
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  -3.0
sm_sc.fv_aggr_chunk_sum 切块粒度聚合合计。
入参:
  1. 原矩阵;
  2. 块规格,各维度长度;
select  
    sm_sc.fv_aggr_chunk_sum
    (
        array
        [
            [2.3,  5.1,  8.2,  2.56,  3.33,  -1.9]
        ,  [3.25,  6.4,  6.6,  6.9,  -2.65,  -4.6]
        ,  [-2.3,  5.1,  -8.2,  2.56,  -3.33,  -1.9]
        ,  [3.25,  -6.4,  -6.6,  6.9,  -2.65,  -4.6]
        ]
    ,  array[2,  3]
    )

返回:
    array
    [
        [5.12,  10.20,  -3.8]
    ,  [20.30,  -5.30,  -9.2]
    ]
sm_sc.fv_aggr_chunk_prod 切块粒度聚合累乘。
入参:
  1. 原矩阵;
  2. 块规格,各维度长度;
select  
    sm_sc.fv_aggr_chunk_prod
    (
        array
        [
            [2.3,  5.1,  8.2,  2.56,  3.33,  -1.9]
        ,  [3.25,  6.4,  6.6,  6.9,  -2.65,  -4.6]
        ,  [-2.3,  5.1,  -8.2,  2.56,  -3.33,  -1.9]
        ,  [3.25,  -6.4,  -6.6,  6.9,  -2.65,  -4.6]
        ]
    ,  array[2,  3]
    )

返回:
    array
    [
        [-34.668544,  -288.422289,  -242.7364]
    ,  [502.880625,  -287.641600,  -921.7296]
    ]
sm_sc.fv_aggr_chunk_avg 切块粒度聚合平均。
入参:
  1. 原矩阵;
  2. 块规格,各维度长度;
select  
    sm_sc.fv_aggr_chunk_avg
    (
        array
        [
            [2.3,  5.1,  8.2,  2.56,  3.33,  -1.9]
        ,  [3.25,  6.4,  6.6,  6.9,  -2.65,  -4.6]
        ,  [-2.3,  5.1,  -8.2,  2.56,  -3.33,  -1.9]
        ,  [3.25,  -6.4,  -6.6,  6.9,  -2.65,  -4.6]
        ]
    ,  array[2,  3]
    )

返回:
    array
    [
        [1.280,  2.550,  -0.950]
    ,  [5.075,  -1.325,  -2.300]
    ]
sm_sc.fv_aggr_chunk_max 切块粒度聚合最大。
入参:
  1. 原矩阵;
  2. 块规格,各维度长度;
select  
    sm_sc.fv_aggr_chunk_max
    (
        array
        [
            [2.3,  5.1,  8.2,  2.56,  3.33,  -1.9]
        ,  [3.25,  6.4,  6.6,  6.9,  -2.65,  -4.6]
        ,  [-2.3,  5.1,  -8.2,  2.56,  -3.33,  -1.9]
        ,  [3.25,  -6.4,  -6.6,  6.9,  -2.65,  -4.6]
        ]
    ,  array[2,  3]
    )

返回:
    array
    [
        [2.56,  5.1,  8.2]
    ,  [6.9,  6.4,  6.6]
    ]
sm_sc.fv_aggr_chunk_min 切块粒度聚合最小。
入参:
  1. 原矩阵;
  2. 块规格,各维度长度;
select  
    sm_sc.fv_aggr_chunk_min
    (
        array
        [
            [2.3,  5.1,  8.2,  2.56,  3.33,  -1.9]
        ,  [3.25,  6.4,  6.6,  6.9,  -2.65,  -4.6]
        ,  [-2.3,  5.1,  -8.2,  2.56,  -3.33,  -1.9]
        ,  [3.25,  -6.4,  -6.6,  6.9,  -2.65,  -4.6]
        ]
    ,  array[2,  3]
    )

返回:
    array
    [
        [-2.3,  -3.33,  -8.2]
    ,  [3.25,  -6.4,  -6.6]
    ]
sm_sc.fv_aggr_slice_ptp 元素聚合跨度(最大-最小)。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_ptp
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  5.25
sm_sc.fv_aggr_slice_var_pop 元素聚合总体方差。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_var_pop
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  4.67546875
sm_sc.fv_aggr_slice_var_samp 元素聚合样本方差。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_var_samp
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  6.2339583
sm_sc.fv_aggr_slice_stddev_pop 元素聚合总体标准差。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_stddev_pop
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  2.162283
sm_sc.fv_aggr_slice_stddev_samp 元素聚合样本标准差。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_stddev_samp
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  2.4967896
sm_sc.fv_aggr_slice_mode 元素聚合众数。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_mode
  (
    array[[1.3, 2.25],[2.25, -3.0]]
  );

返回:
  2.25
sm_sc.fv_aggr_slice_median 元素聚合中位数。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_median
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  1.75
sm_sc.fv_aggr_slice_concat 元素聚合位元拼接。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_concat
  (
    array[['abc', 'de'],['fghi', 'jklmn']]
  );

返回:
  'abcdefghijklmn'
sm_sc.fv_aggr_slice_or 元素聚合位元、逻辑求或。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_or
  (
    array[[true, false],[true, false]]
  );

返回:
  true
--------------------------
select
  sm_sc.fv_aggr_slice_or
  (
    array[[B'010', B'011'],[B'101', B'011']]
  );

返回:
  B'111'
sm_sc.fv_aggr_slice_and 元素聚合位元、逻辑求与。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_and
  (
    array[[true, false],[true, false]]
  );

返回:
  false
--------------------------
select
  sm_sc.fv_aggr_slice_and
  (
    array[[B'010', B'011'],[B'101', B'011']]
  );

返回:
  B'000'
sm_sc.fv_aggr_slice_coalesce 元素聚合免空。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_coalesce
  (
    array[[null, 2.25],[2.2, -3.0]]
  );

返回:
  2.25
sm_sc.fv_aggr_slice_is_exists_null 空元素判定。
入参:
  1. 原矩阵;
select
  sm_sc.fv_aggr_slice_is_exists_null
  (
    array[[null, 2.25],[2.2, -3.0]]
  );

返回:
  true
sm_sc.fv_idx_1d_max 一维数组检索最大值位置。
入参:
  1. 原矩阵;
select
  sm_sc.fv_idx_1d_max
  (
    array[1.2, 2.3, 5.6, 52.1]
  );

返回:
  4
sm_sc.fv_idx_y_max 二维数组各行检索最大值位置。
入参:
  1. 原矩阵;
select
  sm_sc.fv_idx_y_max
  (
    array[[1.2, 2.3, 5.6, 52.1],[-1.2, 2.3, -5.6, 2.1]]
  );

返回:
  array[[4],[2]]
sm_sc.fv_idx_x_max 二维数组各列检索最大值位置。
入参:
  1. 原矩阵;
select
  sm_sc.fv_idx_x_max
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  array[[2, 1]]
sm_sc.fv_idx_mx_max 二维数组检索最大值位置。
入参:
  1. 原矩阵;
select
  sm_sc.fv_idx_mx_max
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  array[1, 2]
sm_sc.fv_idx_1d_min 一维数组检索最小值位置。
入参:
  1. 原矩阵;
select
  sm_sc.fv_idx_1d_min
  (
    array[1.2, 2.3, 5.6, 52.1]
  );

返回:
  1
sm_sc.fv_idx_y_min 二维数组各行检索最小值位置。
入参:
  1. 原矩阵;
select
  sm_sc.fv_idx_y_min
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  array[[1],[2]]
sm_sc.fv_idx_x_min 二维数组各列检索最小值位置。
入参:
  1. 原矩阵;
select
  sm_sc.fv_idx_x_min
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  array[[1, 2]]
sm_sc.fv_idx_mx_min 二维数组检索最小值位置。
入参:
  1. 原矩阵;
select
  sm_sc.fv_idx_mx_min
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  );

返回:
  array[2, 2]
sm_sc.fv_ord_by_col 元素纵向排序,按照某列值排列行。
入参:
  1. 原矩阵;
  2. 列序号,按照该列元素值大小排序;
  3. 降序控制,缺省为升序;
select
  sm_sc.fv_ord_by_col
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  , 2
  );

返回:
  array[[2.2, -3.0],[1.3, 2.25]]
sm_sc.fv_ord_by_row 元素横向排序,按照某行值排列列。
入参:
  1. 原矩阵;
  2. 行序号,按照该行元素值大小排序;
  3. 降序控制,缺省为升序;
select
  sm_sc.fv_ord_by_row
  (
    array[[1.3, 2.25],[2.2, -3.0]]
  , 1
  , true
  );

返回:
  array[[2.25, 1.3],[-3.0, 2.2]]
sm_sc.fa_mx_sum 矩阵粒度聚合合计 select
  sm_sc.fa_mx_sum(a_arr) as a_mx_sum,
  sm_sc.fa_mx_prod(a_arr) as a_mx_prod,
  sm_sc.fa_mx_avg(a_arr :: float[]) as a_mx_avg,
  sm_sc.fa_mx_max(a_arr) as a_mx_max,
  sm_sc.fa_mx_min(a_arr) as a_mx_min,
  sm_sc.fa_mx_inner_prod(a_arr) as a_mx_inner_prod
from
  (
    select array[[1.3, 2.25],[2.2, -3.0]] as a_arr
    union all
    select array[[2.3, 5.6],[0.47, 2.6]] as a_arr
    union all
    select array[[2.6, -0.8],[0.63, 3.71]] as a_arr
  ) tb_a_arr(a_arr);

返回:
  a_mx_sum:
    array[[6.2, 7.05],[3.30, 3.31]]
  a_mx_prod:
    array[[7.774, -10.08],[0.65142, -28.938]]
  a_mx_avg:
    array[[2.0667, 2.35],[1.1, 1.1033]]
  a_mx_max:
    array[[2.6, 5.6],[2.2, 3.71]]
  a_mx_min:
    array[[1.3, -0.8],[0.47, -3.0]]
  a_mx_inner_prod:
    -30.59258
sm_sc.fa_mx_prod 矩阵粒度聚合累乘
sm_sc.fa_mx_avg 矩阵粒度聚合平均
sm_sc.fa_mx_max 矩阵粒度聚合最大
sm_sc.fa_mx_min 矩阵粒度聚合最小
sm_sc.fa_mx_inner_prod 矩阵粒度聚合内积
sm_sc.fa_array_concat 矩阵粒度一阶数组聚合拼接 select
  sm_sc.fa_array_concat(a_arr)
from
(
  select array[1.2, 1.5, 1.8] as a_val
  union all
  select array[11.2, 21.5, 31.8] as a_val
  union all
  select array[31.2, 1.5, 21.8] as a_val
) tb_a_arr(a_arr);

返回:
  array[1.2, 1.5, 1.8, 11.2, 21.5, 31.8, 31.2, 1.5, 21.8]
sm_sc.fa_mx_concat_y 矩阵粒度聚合第一维度拼接   select
    sm_sc.fa_mx_concat_y(a_arr)  as  a_mx_concat_y,
    sm_sc.fa_mx_concat_x(a_arr)  as  a_mx_concat_x,
    sm_sc.fa_mx_concat_x3(array[a_arr])  as  a_mx_concat_x3,
    sm_sc.fa_mx_concat_x4(array[[a_arr]])  as  a_mx_concat_x4,
    sm_sc.fa_mx_concat_per_ele(a_arr)  as  a_mx_concat_per_ele
from  
(
    select  array[[B'110',  B'100',  B'101'],[B'101',  B'1010',  B'100']]  as  a_val
    union  all
    select  array[[B'1010',  B'110',  B'1010'],[B'010',  B'1010',  B'110']]  as  a_val
    union  all
    select  array[[B'1010',  B'10',  B'1010'],[B'10',  B'101001010',  B'00010']]  as  a_val
)  tb_a_arr(a_arr)

返回:
    a_mx_concat_y:
        array[[B'110',B'100',B'101']
                  ,[B'101',B'1010',B'100']
                  ,[B'1010',B'110',B'1010']
                  ,[B'010',B'1010',B'110']
                  ,[B'1010',B'10',B'1010']
                  ,[B'10',B'101001010',B'00010']]
    a_mx_concat_x:
        array[[B'110',B'100',B'101',B'1010',B'110',B'1010',B'1010',B'10',B'1010']
                  ,[B'101',B'1010',B'100',B'010',B'1010',B'110',B'10',B'101001010',B'00010']]
    a_mx_concat_x3:
        array[[[B'110',B'100',B'101',B'1010',B'110',B'1010',B'1010',B'10',B'1010']
                    ,[B'101',B'1010',B'100',B'010',B'1010',B'110',B'10',B'101001010',B'00010']][
    a_mx_concat_x4:
        array[[[[B'110',B'100',B'101',B'1010',B'110',B'1010',B'1010',B'10',B'1010']
                      ,[B'101',B'1010',B'100',B'010',B'1010',B'110',B'10',B'101001010',B'00010']]]]
    a_mx_concat_per_ele:
        array[[B'11010101010',B'10011010',B'10110101010']
                  ,[B'10101010',B'10101010101001010',B'10011000010']]  
sm_sc.fa_mx_concat_x 矩阵粒度聚合第二维度拼接
sm_sc.fa_mx_concat_x3 矩阵粒度聚合第三维度拼接
sm_sc.fa_mx_concat_x4 矩阵粒度聚合第四维度拼接
sm_sc.fa_mx_concat_per_ele 每矩阵同位置对应元素聚合位元拼接
sm_sc.fa_mx_or 每矩阵同位置对应元素聚合位元、逻辑求或 select
  sm_sc.fa_mx_or(a_arr) as a_mx_or,
  sm_sc.fa_mx_and(a_arr) as a_mx_and
from
  (
    select array[[B'1101', B'100', B'101'],[B'10', B'100101010', B'10010']] as a_arr
    union all
    select array[[B'1010', B'110', B'100'],[B'00', B'100101010', B'10010']] as a_arr
    union all
    select array[[B'1010', B'101', B'010'],[B'10', B'101001010', B'00010']] as a_arr
  ) tb_a_arr(a_arr);

返回:
  a_mx_or:
    array[[B'1111', B'111', B'111'],[B'10', B'101101010', B'10010']]
  a_mx_and:
    array[[B'1000', B'100', B'000'],[B'00', B'100001010', B'00010']]
sm_sc.fa_mx_and 每矩阵同位置对应元素聚合位元、逻辑求与
sm_sc.fa_mx_coalesce 矩阵粒度聚合免空 select
  sm_sc.fa_mx_coalesce(a_arr)
from
(
  select array[[null, 12, null],[14, null, 16]] as a_val
  union all
  select array[[null, 22, 23],[null, null, 26]] as a_val
  union all
  select array[[31, 1.5, 1.8],[11.2, 11.5, 11.8]] as a_val
) tb_a_arr(a_arr);

返回:
  array[[31, 12, 23],[14, 11.5, 16]]

g. 机器学习的重分布函数:

函数名 函数说明 调用举例
sm_sc.fv_redistr_0_1 全矩阵0至1区间(线性)标准化。
入参:
  1. 原矩阵;
select
  sm_sc.fv_redistr_0_1
  (
    array[[12.3, 25.1],[2.56, 3.25]]
  );

返回:
  array[[0.432121, 1.0],[0.0, 0.030612]]
sm_sc.fv_redistr_ne1_1 全矩阵-1至1区间(线性)标准化。
入参:
  1. 原矩阵;
select
  sm_sc.fv_redistr_ne1_1
  (
    array[[12.3, 25.1],[2.56, 3.25]]
  );

返回:
  array[[0.0664, 0.6343],[-0.3657, -0.3351]]
sm_sc.fv_redistr_l1l2ln 全矩阵 l1, l2...ln 范数归一化。
入参:
  1. 原矩阵;
  2. 范数次数;
select
  sm_sc.fv_redistr_l1l2ln
  (
    array[[12.3, 25.1],[2.56, 3.25]]
  , 2
  );

返回:
  array[[0.4353, 0.8883],[0.0906, 0.1150]]
sm_sc.fv_redistr_log 全矩阵对数(非线性)标准化。
入参:
  1. 原矩阵;
select
  sm_sc.fv_redistr_log
  (
    array[[12.3, 25.1],[2.56, 3.25]]
  );

返回:
  array[[0.7787, 1.0000],[0.2917, 0.3657]]
sm_sc.fv_redistr_softmax 全矩阵 softmax 标准化。
入参:
  1. 原矩阵;
select
  sm_sc.fv_redistr_softmax
  (
    array[[4.3, 2.1],[2.56, 3.25]]
  );

返回:
  array[[0.6111, 0.0677],[0.1073, 0.2139]]
sm_sc.fv_redistr_zscore 全矩阵 z_score 标准化。
入参:
  1. 原矩阵;
select
  sm_sc.fv_redistr_zscore
  (
    array[[12.3, 25.1],[2.56, 3.25]]
  );

返回:
  array[[0.1424, 1.3598],[-0.7839, -0.7183]]
sm_sc.fv_redistr_centralize 全矩阵中心化。
入参:
  1. 原矩阵;
select  
    sm_sc.fv_redistr_centralize
    (
        array
        [
            [1,  2,  3,  4,  5,  6]
        ,  [10,  20,  30,  40,  50,  60]
        ,  [100,  200,  300,  400,  500,  600]
        ]
    )

返回:
    array
    [
        [-128.5,  -127.5,  -126.5,  -125.5,  -124.5,  -123.5]
    ,  [-119.5,  -109.5,  -99.5,  -89.5,  -79.5,  -69.5]
    ,  [-29.5,  70.5,  170.5,  270.5,  370.5,  470.5]
    ]

h. 机器学习的激活函数:

函数名 函数说明 调用举例
sm_sc.fv_activate_elu 激活函数 elu。
入参:
  1. 原值;
  2. α值;
select
  sm_sc.fv_activate_elu
  (
    array[[1.2, -1.0],[0.0, -8.3]]
  , 0.1
  );

返回:
  array[[1.2000, -0.0632],[0.0000, -0.1000]]
sm_sc.fv_activate_gelu 激活函数 gelu。
入参:
  1. 原值;
select
  sm_sc.fv_activate_gelu
  (
    array[[1.2, -1.0],[0.0, -8.3]]
  );

返回:
  array[[1.0617, -0.1588],[0.0000, 0.0000]]
sm_sc.fv_activate_leaky_relu 激活函数 leaky_relu。
入参:
  1. 原值;
  2. α值;
select
  sm_sc.fv_activate_leaky_relu
  (
    array[[1.2, -1.0],[0.0, -8.3]]
  , 0.1
  );

返回:
  array[[1.2000, -0.1000],[0.0000, -0.8300]]
sm_sc.fv_activate_relu 激活函数 relu。
入参:
  1. 原值;
select
  sm_sc.fv_activate_relu
  (
    array[[1.2, -1.0],[0.0, -8.3]]
  );

返回:
  array[[1.2, 0.0],[0.0, 0.0]]
sm_sc.fv_activate_selu 激活函数 selu。
入参:
  1. 原值;
select
  sm_sc.fv_activate_selu
  (
    array[[1.2, -1.0],[0.0, -8.3]]
  );

返回:
  array[[1.2608, -1.1113],[0.0, -1.7577]]
sm_sc.fv_activate_sigmoid 激活函数 sigmoid。
入参:
  1. 原值;
select
  sm_sc.fv_activate_sigmoid
  (
    array[[1.2, -1.0],[0.0, -8.3]]
  );

返回:
  array[[0.7685, 0.2689],[0.5000, 0.0002]]
sm_sc.fv_activate_softplus 激活函数 softplus。
入参:
  1. 原值;
select
  sm_sc.fv_activate_softplus
  (
    array[[1.2, -1.0],[0.0, -8.3]]
  );

返回:
  array[[1.4633, 0.3133],[0.6931, 0.0002]]
sm_sc.fv_activate_swish 激活函数 swish,也做 silu。
入参:
  1. 原值;
select
  sm_sc.fv_activate_swish
  (
    array[[1.2, -1.0],[0.0, -8.3]]
  );

返回:
  array[[0.9222, -0.2689],[0.0000, -0.0021]]
sm_sc.fv_activate_boxcox 激活函数 boxcox。
入参:
  1. 原值;
  2. lambda 值;
select  
    sm_sc.fv_activate_boxcox
    (
        array
        [
            [1,  2,  3,  4,  5,  6]
        ,  [10,  20,  30,  40,  50,  60]
        ,  [100,  200,  300,  400,  500,  600]
        ]
    ,  2
    )

返回:
    array
    [
        [0,1.5,4,7.5,12,17.5]
    ,  [49.5,199.5,449.5,799.5,1249.5,1799.5]
    ,  [4999.5,19999.5,44999.5,79999.5,124999.5,179999.5]
    ]

i. 计算图的 json 序列化、反序列化:

函数名 函数说明 调用举例
sm_sc.ft_computational_graph_deserialize json 计算图配置或代数式/等式文本反序列化为表记录。
本函数依托于临时表 sm_sc._vt_fn_compu_graph_deseri__graph 实现。
入参:
  1. 原值;json 计算图或代数式/等式文本;
      json 计算图格式说明如下:
        a. 花括号以及其中内容:表达式。
            表达式指变量或由变量和表达式以及运算类型组成的运算关系;
        b. out_param: 因变量名。
            表达式只有一个因变量;
        c. opr: 基础运算类型名称或注册的自定义运算类型名称;
        d. in_params: 自变量名称。
            其 value 值为方括号以及其中内容: 自变量或自变量集合;
        e. out_value: 常量值。

出参列:
  1. o_out_param: 中间结果因变量或最终因变量;
  2. o_in_param: 中间结果自变量或最终自变量;
  3. o_in_value: 常量数值;
  4. o_param_loc: 自变量在该步运算的入参顺序号;
  5. o_out_opr: 运算类型名;
-- 以下列函数表达式为例: "v_z_in = (v_x_in * v_y_in) + exp(2 * v_y_in)"
select * from sm_sc.ft_computational_graph_deserialize('
{
   "out_param": "v_z_in",
   "opr": "sm_sc.fv_opr_add",
   "in_params":
   [
       {
           "opr": "sm_sc.fv_opr_mul",
           "in_params":
           [
               {
                   "out_param": "v_x_in"
               },
               {
                   "out_param": "v_y_in"
               }
           ]
       },
       {
           "opr": "sm_sc.fv_opr_exp",
           "in_params":
           [
               {
                   "opr": "sm_sc.fv_opr_mul",
                   "in_params":
                   [
                       {
                           "out_value": 2
                       },
                       {
                           "out_param": "v_y_in"
                       }
                   ]
               }
           ]
       }
   ]
}
'::jsonb);

返回:
  o_out_param                                            o_in_param                                     o_in_value o_param_loc o_out_opr
                                                                    v_z_in                                                                  1    
  5fba12605bdc0e173138d1053c5e2d71    v_x_in                                                                  1    sm_sc.fv_opr_mul
  5fba12605bdc0e173138d1053c5e2d71    v_y_in                                                                  2    sm_sc.fv_opr_mul
  85a10bcd87dd33ec3668cf8719912cb6                                                                        2.0    1    sm_sc.fv_opr_mul
  85a10bcd87dd33ec3668cf8719912cb6    v_y_in                                                                  2    sm_sc.fv_opr_mul
  c37766ac76959dc0ab92af50ad916b13    85a10bcd87dd33ec3668cf8719912cb6              1    sm_sc.fv_opr_exp
  v_z_in                                                        5fba12605bdc0e173138d1053c5e2d71              1    sm_sc.fv_opr_add
  v_z_in                                                        c37766ac76959dc0ab92af50ad916b13              2    sm_sc.fv_opr_add
--------------------------
select * from sm_sc.ft_computational_graph_deserialize('v_z_in = (v_x_in * v_y_in) + exp(2 * v_y_in)');

返回:
  o_out_param                                            o_in_param                                     o_in_value o_param_loc o_out_opr
  3ad526261da71248975a90310b0da8f7    e4dd85e5f4b1451eaef35f03a5e44c5f              1    sm_sc.fv_opr_exp
  8efff79710388489d3fba3597afa8aac    v_x_in                                                                  1    sm_sc.fv_opr_mul
  8efff79710388489d3fba3597afa8aac    v_y_in                                                                  2    sm_sc.fv_opr_mul
  ce2101d23207b306073a470e7832654e    8efff79710388489d3fba3597afa8aac              1    sm_sc.fv_opr_add
  ce2101d23207b306073a470e7832654e    3ad526261da71248975a90310b0da8f7              2    sm_sc.fv_opr_add
  e4dd85e5f4b1451eaef35f03a5e44c5f                                                                        2.0    1    sm_sc.fv_opr_mul
  e4dd85e5f4b1451eaef35f03a5e44c5f    v_y_in                                                                  2    sm_sc.fv_opr_mul
  v_z_in                                                        ce2101d23207b306073a470e7832654e              1    

j. 机器学习的卷积、池化、矩阵组播:

函数名 函数说明 调用举例
sm_sc.fv_conv_2d_v_im2col 矩阵卷积(im2col 方法)。
入参:
  1. 背景矩阵;
  2. 卷积核矩阵;
  3. 卷积核偏移量;
  4. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  5. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  6. 补齐填充元素值;
select
   sm_sc.fv_conv_2d_v_im2col
   (
    array
    [
      [1,2,3,4,5,6]
    ,[10,20,30,40,50,60]
    ,[100,200,300,400,500,600]
    ,[-1,-2,-3,-4,-5,-6]
    ,[-10,-20,-30,-40,-50,-60]
    ]
  , array[[1.1, 1.1, 1.1],[1.1, 2.1, 1.1],[1.1, 1.1, 1.1]]
  , array[0.0]
  , array[2, 2]
  , array[1, 1, 1, 0]
  , 0.0
   );

返回:
  array
  [
    [37.3000, 111.9000, 186.5000]
  ,[459.7000, 1379.1000, 2298.5000]
  ,[-46.3000, -138.9000, -231.5000]
  ]
sm_sc.fv_pool_none 元素保留不变池化。
入参:
  1. 原矩阵;
  2. 池化窗口高宽大小;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select  sm_sc.fv_pool_none
    (
        array
        [
            [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
        ,  [10.0,20.0,30.0,40.0,50.0,60.0,70.0]
        ,  [100.0,200.0,300.0,400.0,500.0,600.0,700.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
        ]
        ,  array[3,  3]
        ,  array[2,  2]
    );

返回:
    array
    [
        [1.0,2.0,3.0,3.0,4.0,5.0,5.0,6.0,7.0]
    ,  [10.0,20.0,30.0,30.0,40.0,50.0,50.0,60.0,70.0]
    ,  [100.0,200.0,300.0,300.0,400.0,500.0,500.0,600.0,700.0]
    ,  [100.0,200.0,300.0,300.0,400.0,500.0,500.0,600.0,700.0]
    ,  [-1.0,-2.0,-3.0,-3.0,-4.0,-5.0,-5.0,-6.0,-7.0]
    ,  [-10.0,-20.0,-30.0,-30.0,-40.0,-50.0,-50.0,-60.0,-70.0]
    ]
sm_sc.fv_pool_avg 平均池化。
入参:
  1. 原矩阵;
  2. 池化窗口高宽大小;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select sm_sc.fv_pool_avg
  (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
    ,[10.0,20.0,30.0,40.0,50.0,60.0,70.0]
    ,[100.0,200.0,300.0,400.0,500.0,600.0,700.0]
    ,[-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
    ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
    ]
    , array[3, 3]
    , array[2, 2]
  );

返回:
  array
  [
    [3.6667, 11.0000, 18.3333, 23.8333]
  ,[36.3333, 109.0000, 181.6667, 236.1667]
  ,[-5.5000, -16.5000, -27.5000, -35.7500]
  ]
sm_sc.fv_pool_max 最大值池化。
入参:
  1. 原矩阵;
  2. 池化窗口高宽大小;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select sm_sc.fv_pool_max
  (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
    ,[10.0,20.0,30.0,40.0,50.0,60.0,70.0]
    ,[100.0,200.0,300.0,400.0,500.0,600.0,700.0]
    ,[-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
    ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
    ]
    , array[3, 3]
    , array[2, 2]
  );

返回:
  array
  [
    [300.0000, 500.0000, 700.0000]
  ,[300.0000, 500.0000, 700.0000]
  ]
sm_sc.fv_pool_min 最小值池化。
入参:
  1. 原矩阵;
  2. 池化窗口高宽大小;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select sm_sc.fv_pool_min
  (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
    ,[10.0,20.0,30.0,40.0,50.0,60.0,70.0]
    ,[100.0,200.0,300.0,400.0,500.0,600.0,700.0]
    ,[-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
    ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
    ]
    , array[3, 3]
    , array[2, 2]
  );

返回:
  array
  [
    [1.0000, 3.0000, 5.0000]
  ,[-30.0000, -50.0000, -70.0000]
  ]
sm_sc.fv_pool_sum 合计求和池化。
入参:
  1. 原矩阵;
  2. 池化窗口高宽大小;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select sm_sc.fv_pool_sum
  (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
    ,[10.0,20.0,30.0,40.0,50.0,60.0,70.0]
    ,[100.0,200.0,300.0,400.0,500.0,600.0,700.0]
    ,[-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
    ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
    ]
    , array[3, 3]
    , array[2, 2]
  );

返回:
  array
  [
    [666.0000, 1332.0000, 1998.0000]
  ,[534.0000, 1068.0000, 1602.0000]
  ]
sm_sc.fv_pool_ptp 跨度池化。
入参:
  1. 原矩阵;
  2. 池化窗口高宽大小;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select sm_sc.fv_pool_ptp
  (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
    ,[10.0,20.0,30.0,40.0,50.0,60.0,70.0]
    ,[100.0,200.0,300.0,400.0,500.0,600.0,700.0]
    ,[-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
    ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
    ]
    , array[3, 3]
    , array[2, 2]
  );

返回:
  array
  [
    [299.0000, 497.0000, 695.0000]
  ,[330.0000, 550.0000, 770.0000]
  ]
sm_sc.fv_pool_prod 累乘池化。
入参:
  1. 原矩阵;
  2. 池化窗口高宽大小;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select sm_sc.fv_pool_prod
  (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
    ,[10.0,20.0,30.0,40.0,50.0,60.0,70.0]
    ,[100.0,200.0,300.0,400.0,500.0,600.0,700.0]
    ,[-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
    ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
    ]
    , array[3, 3]
    , array[2, 2]
  );

返回:
  array
  [
    [216000000000, 216000000000000, 9261000000000000]
  ,[216000000000, 216000000000000, 9261000000000000]
  ]
sm_sc.fv_pool_mode 众数池化。
入参:
  1. 原矩阵;
  2. 池化窗口高宽大小;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select sm_sc.fv_pool_mode
  (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
    ,[10.0,20.0,30.0,40.0,50.0,60.0,70.0]
    ,[100.0,200.0,300.0,400.0,500.0,600.0,700.0]
    ,[-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
    ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
    ]
    , array[3, 3]
    , array[2, 2]
  );

返回:
  array
  [
    [1.0000, 3.0000, 5.0000]
  ,[-30.0000, -50.0000, -70.0000]
  ]
sm_sc.fv_pool_median 中位数池化。
入参:
  1. 原矩阵;
  2. 池化窗口高宽大小;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select sm_sc.fv_pool_median
  (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
    ,[10.0,20.0,30.0,40.0,50.0,60.0,70.0]
    ,[100.0,200.0,300.0,400.0,500.0,600.0,700.0]
    ,[-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
    ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
    ]
    , array[3, 3]
    , array[2, 2]
  );

返回:
  array
  [
    [20.0000, 40.0000, 60.0000]
  ,[-2.0000, -4.0000, -6.0000]
  ]
sm_sc.fv_pool_coalesce 免空池化。
入参:
  1. 原矩阵;
  2. 池化窗口高宽大小;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select sm_sc.fv_pool_coalesce
  (
    array
    [
      [null,2.0,3.0,4.0,5.0,6.0,7.0]
    ,[10.0,20.0,null,40.0,50.0,60.0,70.0]
    ,[100.0,200.0,300.0,400.0,500.0,null,700.0]
    ,[-1.0,null,-3.0,-4.0,-5.0,-6.0,-7.0]
    ,[-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,null]
    ]
    , array[3, 3]
    , array[2, 2]
  );

返回:
  array
  [
    [2.0, 3.0, 5.0]
  ,[100.0, 300.0, 500.0]
  ]
sm_sc.fv_conv_2d_grp_x 矩阵x方向卷积。
支持偏移量。
入参:
  1. 由2D转1D后的每行向量再次构成的2D原矩阵;
      例如:100张 28*14 像素的图片,
                先将2D像素转长度为392的1D向量,
                再聚合成高宽为 100*392 的2D矩阵;
  2. 2D样本的宽度。
      通常是图像的宽度,即参数一例子中的 14;
  3. 卷积核降维后的单行矩阵。
      如果带有偏移量,那么该一维数组长度多1。
      例如:3*4卷积核矩阵降维后,
                 如果没有偏移量,则为1*12矩阵,
                 如果有偏移量,则为1*12 + 1 = 13矩阵;
  4. 卷积核窗口的宽度。
      例如:即参数三例子中的 4;
  5. 卷积核滑动的纵向与横向步长。
      该参数为长度为2的一维数组;
  6. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  7. 补齐填充元素值;
select
   sm_sc.fv_conv_2d_grp_x
   (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0
        , 10.0,20.0,30.0,40.0,50.0,60.0
        , 100.0,200.0,300.0,400.0,500.0,600.0
        , -1.0,-2.0,-3.0,-4.0,-5.0,-6.0
        , -10.0,-20.0,-30.0,-40.0,-50.0,-60.0
      ],
      [1.0,2.0,3.0,4.0,5.0,6.0
        , -1.0,-2.0,-3.0,-4.0,-5.0,-6.0
        , 10.0,20.0,30.0,40.0,50.0,60.0
        , 100.0,200.0,300.0,400.0,500.0,600.0
        , -10.0,-20.0,-30.0,-40.0,-50.0,-60.0
      ],
      [1.0,2.0,3.0,4.0,5.0,6.0
        , -1.0,-2.0,-3.0,-4.0,-5.0,-6.0
        , 10.0,20.0,30.0,40.0,50.0,60.0
        , -10.0,-20.0,-30.0,-40.0,-50.0,-60.0
        , 100.0,200.0,300.0,400.0,500.0,600.0
      ]
    ]
    , 6
    , array[[1.1, 1.1, 1.1, 1.1, 2.1, 1.1, 1.1, 1.1, 1.1, 0.5]]
    , 3
    , array[2, 2]
    , array[1, 1, 1, 0]
    , 0
   );

返回:
  array
  [
    [37.30,111.90,186.50,459.70,1379.10,2298.50,-46.30,-138.90,-231.50]
  ,[1.00,3.00,5.00,369.70,1109.10,1848.50,287.00,861.00,1435.00]
  ,[1.00,3.00,5.00,6.70,20.10,33.50,397.00,1191.00,1985.00]
  ]
sm_sc.fv_pool_avg_2d_grp_x 矩阵x方向平均池化。
入参:
  1. 由2D转1D后的每行向量再次构成的2D原矩阵;
      例如:100张 28*14 像素的图片,
                先将2D像素转长度为392的1D向量,
                再聚合成高宽为 100*392 的2D矩阵;
  2. 2D样本的宽度。
      通常是图像的宽度,即参数一例子中的 14;
  3. 池化窗口高宽大小。
      该参数为长度为2的一维数组;
  4. 池化滑动的纵向与横向步长。
      该参数为长度为2的一维数组;
  5. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  6. 补齐填充元素值;
select
   sm_sc.fv_pool_avg_2d_grp_x
   (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0
        , 10.0,20.0,30.0,40.0,50.0,60.0,70.0
        , 100.0,200.0,300.0,400.0,500.0,600.0,700.0
        , -1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0
        , -10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0
      ],
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0
        , -1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0
        , 10.0,20.0,30.0,40.0,50.0,60.0,70.0
        , 100.0,200.0,300.0,400.0,500.0,600.0,700.0
        , -10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0
      ],
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0
        , -1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0
        , 10.0,20.0,30.0,40.0,50.0,60.0,70.0
        , -10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0
        , 100.0,200.0,300.0,400.0,500.0,600.0,700.0
      ]
    ]
    , 7
    , array[3, 3]
    , array[2, 2]
   );

返回:
  array
  [
    [3.67,11.00,18.33,23.83,36.33,109.00,181.67,236.17,-5.50,-16.50,-27.50,-35.75]
  ,[0.00,0.00,0.00,0.00,36.33,109.00,181.67,236.17,45.00,135.00,225.00,292.50]
  ,[0.00,0.00,0.00,0.00,-0.33,-1.00,-1.67,-2.17,45.00,135.00,225.00,292.50]
  ]
sm_sc.fv_pool_max_2d_grp_x 矩阵x方向最大值池化。
入参:
  1. 由2D转1D后的每行向量再次构成的2D原矩阵;
      例如:100张 28*14 像素的图片,
                先将2D像素转长度为392的1D向量,
                再聚合成高宽为 100*392 的2D矩阵;
  2. 2D样本的宽度。
      通常是图像的宽度,即参数一例子中的 14;
  3. 池化窗口高宽大小。
      该参数为长度为2的一维数组;
  4. 池化滑动的纵向与横向步长。
      该参数为长度为2的一维数组;
  5. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  6. 补齐填充元素值;
select
   sm_sc.fv_pool_max_2d_grp_x
   (
    array
    [
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0
        , 10.0,20.0,30.0,40.0,50.0,60.0,70.0
        , 100.0,200.0,300.0,400.0,500.0,600.0,700.0
        , -1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0
        , -10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0
      ],
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0
        , -1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0
        , 10.0,20.0,30.0,40.0,50.0,60.0,70.0
        , 100.0,200.0,300.0,400.0,500.0,600.0,700.0
        , -10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0
      ],
      [1.0,2.0,3.0,4.0,5.0,6.0,7.0
        , -1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0
        , 10.0,20.0,30.0,40.0,50.0,60.0,70.0
        , -10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0
        , 100.0,200.0,300.0,400.0,500.0,600.0,700.0
      ]
    ]
    , 7
    , array[3, 3]
    , array[2, 2]
   );

返回:
  array
  [
    [300.0,500.0,700.0,300.0,500.0,700.0]
  ,[30.0,50.0,70.0,300.0,500.0,700.0]
  ,[30.0,50.0,70.0,300.0,500.0,700.0]
  ]
sm_sc.fv_conv_add 矩阵组播 - 卷加。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
  3. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select
   sm_sc.fv_conv_add
   (
    array
    [
      [1.0,2,3,4,5,6]
    ,[10,20,30,40,50,60]
    ,[100,200,300,400,500,600]
    ,[-1,-2,-3,-4,-5,-6]
    ,[-10,-20,-30,-40,-50,-60]
    ]
  , array[[1.1, 1.1, 1.1],[1.1, 2.1, 1.1],[1.1, 1.1, 1.1]]
  , array[2, 2]
  , array[1, 1, 1, 0]
  , 0.0
   );

返回:
  array
  [[1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1]
  ,[1.1,3.1,3.1,3.1,5.1,5.1,5.1,7.1,7.1]
  ,[1.1,11.1,21.1,21.1,31.1,41.1,41.1,51.1,61.1]
  ,[1.1,11.1,21.1,21.1,31.1,41.1,41.1,51.1,61.1]
  ,[1.1,102.1,201.1,201.1,302.1,401.1,401.1,502.1,601.1]
  ,[1.1,0.1,-0.9,-0.9,-1.9,-2.9,-2.9,-3.9,-4.9]
  ,[1.1,0.1,-0.9,-0.9,-1.9,-2.9,-2.9,-3.9,-4.9]
  ,[1.1,-7.9,-18.9,-18.9,-27.9,-38.9,-38.9,-47.9,-58.9]
  ,[1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1]
  ]
sm_sc.fv_conv_sub 矩阵组播 - 卷减。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
  3. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select
   sm_sc.fv_conv_sub
   (
    array
    [
      [1.0,2,3,4,5,6]
    ,[10,20,30,40,50,60]
    ,[100,200,300,400,500,600]
    ,[-1,-2,-3,-4,-5,-6]
    ,[-10,-20,-30,-40,-50,-60]
    ]
  , array[[1.1, 1.1, 1.1],[1.1, 2.1, 1.1],[1.1, 1.1, 1.1]]
  , array[2, 2]
  , array[1, 1, 1, 0]
  , 0.0
   );

返回:
  array
  [[-1.1,-1.1,-1.1,-1.1,-1.1,-1.1,-1.1,-1.1,-1.1]
  ,[-1.1,-1.1,0.9,0.9,0.9,2.9,2.9,2.9,4.9]
  ,[-1.1,8.9,18.9,18.9,28.9,38.9,38.9,48.9,58.9]
  ,[-1.1,8.9,18.9,18.9,28.9,38.9,38.9,48.9,58.9]
  ,[-1.1,97.9,198.9,198.9,297.9,398.9,398.9,497.9,598.9]
  ,[-1.1,-2.1,-3.1,-3.1,-4.1,-5.1,-5.1,-6.1,-7.1]
  ,[-1.1,-2.1,-3.1,-3.1,-4.1,-5.1,-5.1,-6.1,-7.1]
  ,[-1.1,-12.1,-21.1,-21.1,-32.1,-41.1,-41.1,-52.1,-61.1]
  ,[-1.1,-1.1,-1.1,-1.1,-1.1,-1.1,-1.1,-1.1,-1.1]
  ]
sm_sc.fv_conv_mul 矩阵组播 - 卷乘。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
  3. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select
   sm_sc.fv_conv_mul
   (
    array
    [
      [1.0,2,3,4,5,6]
    ,[10,20,30,40,50,60]
    ,[100,200,300,400,500,600]
    ,[-1,-2,-3,-4,-5,-6]
    ,[-10,-20,-30,-40,-50,-60]
    ]
  , array[[1.1, 1.1, 1.1],[1.1, 2.1, 1.1],[1.1, 1.1, 1.1]]
  , array[2, 2]
  , array[1, 1, 1, 0]
  , 0.0
   );

返回:
  array
  [[0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00]
  ,[0.00,2.10,2.2,2.2,6.3,4.4,4.4,10.5,6.6]
  ,[0.00,11.0,22.0,22.0,33.0,44.0,44.0,55.0,66.0]
  ,[0.00,11.0,22.0,22.0,33.0,44.0,44.0,55.0,66.0]
  ,[0.00,210.0,220.0,220.0,630.0,440.0,440.0,1050.0,660.0]
  ,[0.00,-1.1,-2.2,-2.2,-3.3,-4.4,-4.4,-5.5,-6.6]
  ,[0.00,-1.1,-2.2,-2.2,-3.3,-4.4,-4.4,-5.5,-6.6]
  ,[0.00,-21.0,-22.0,-22.0,-63.0,-44.0,-44.0,-105.0,-66.0]
  ,[0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00]
  ]
sm_sc.fv_conv_div 矩阵组播 - 卷除。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
  3. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select
   sm_sc.fv_conv_div
   (
    array
    [
      [1.0,2,3,4,5,6]
    ,[10,20,30,40,50,60]
    ,[100,200,300,400,500,600]
    ,[-1,-2,-3,-4,-5,-6]
    ,[-10,-20,-30,-40,-50,-60]
    ]
  , array[[1.1, 1.1, 1.1],[1.1, 2.1, 1.1],[1.1, 1.1, 1.1]]
  , array[2, 2]
  , array[1, 1, 1, 0]
  , 0.0
   );

返回:
  array
  [[0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000]
  ,[0.000,0.476,1.818,1.818,1.429,3.636,3.636,2.381,5.455]
  ,[0.000,9.091,18.182,18.182,27.273,36.364,36.364,45.455,54.545]
  ,[0.000,9.091,18.182,18.182,27.273,36.364,36.364,45.455,54.545]
  ,[0.000,47.619,181.818,181.818,142.857,363.636,363.636,238.095,545.455]
  ,[0.000,-0.909,-1.818,-1.818,-2.727,-3.636,-3.636,-4.545,-5.455]
  ,[0.000,-0.909,-1.818,-1.818,-2.727,-3.636,-3.636,-4.545,-5.455]
  ,[0.000,-4.762,-18.182,-18.182,-14.286,-36.364,-36.364,-23.810,-54.545]
  ,[0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000]
  ]
sm_sc.fv_conv_pow 矩阵组播 - 卷幂。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
  3. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select
   sm_sc.fv_conv_pow
   (
    array
    [
      [1.0,2,3,4,5,6]
    ,[10,20,30,40,50,60]
    ,[-10,-20,-30,-40,-50,-60]
    ,[-1,-2,-3,-4,-5,-6]
    ,[-10,-20,-30,-40,-50,-60]
    ]
  , array[[1.0, 2.0, 3.0],[2.0, 3.0, 1.0],[1.0, 3.0, 2.0]]
  , array[2, 2]
  , array[1, 1, 1, 0]
  , 0.0
   );

返回:
  array
  [[0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00]
  ,[0.00,1.00,2.00,4.00,27.00,4.00,16.00,125.00,6.00]
  ,[0.00,1000.00,400.00,20.00,27000.00,1600.00,40.00,125000.00,3600.00]
  ,[0.00,100.00,8000.00,20.00,900.00,64000.00,40.00,2500.00,216000.00]
  ,[0.00,-1000.00,-20.00,400.00,-27000.00,-40.00,1600.00,-125000.00,-60.00]
  ,[0.00,-1.00,4.00,-2.00,-27.00,16.00,-4.00,-125.00,36.00]
  ,[0.00,1.00,-8.00,-2.00,9.00,-64.00,-4.00,25.00,-216.00]
  ,[0.00,-1000.00,-20.00,400.00,-27000.00,-40.00,1600.00,-125000.00,-60.00]
  ,[0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00]
  ]
sm_sc.fv_conv_log 矩阵组播 - 卷对数。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
  3. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select
   sm_sc.fv_conv_log
   (
    array
    [
      [2.0,2,3,4,5,6]
    ,[10,20,30,40,50,60]
    ,[10,20,30,40,50,60]
    ]
  , array[[1.0, 2.0, 3.0],[2.0, 3.0, 1.0],[1.0, 3.0, 2.0]]
  , array[2, 2]
  , array[1, 1, 1, 0]
  , 2.0
   );

返回:
  array
  [[0.00,1.00,1.58,0.00,1.00,1.58,0.00,1.00,1.58]
  ,[1.00,1.58,0.00,1.00,1.00,0.00,0.50,0.68,0.00]
  ,[0.00,0.48,0.23,0.00,0.32,0.19,0.00,0.28,0.17]
  ,[0.00,0.30,0.37,0.00,0.20,0.30,0.00,0.18,0.27]
  ,[1.00,0.48,0.00,0.23,0.32,0.00,0.19,0.28,0.00]
  ,[0.00,1.58,1.00,0.00,1.58,1.00,0.00,1.58,1.00]
  ]
sm_sc.fv_conv_de_sub 矩阵组播 - 反卷减。
窗口为第一目入参,原矩阵为第二目入参。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
  3. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select  sm_sc.fv_conv_de_sub
    (
        array[[1.5,  2.0,  3.0],  [1.4,  2.0,  3.0],  [3.0,  2.0,  1.7]]
    ,  array
        [
            [1.1,2.0,3.0,4.0,5.0,6.0,7.0]
        ,  [1.2,2.2,3.3,4.1,5.6,6.2,7.4]
        ,  [1.3,2.3,3.3,4.3,5.3,6.3,7.3]
        ,  [1.4,2.4,3.4,4.4,5.4,6.4,7.4]
        ,  [1.5,2.5,3.5,4.5,5.5,6.5,7.5]
        ]
    ,  array[2,  2]
    )

返回:
    array  
    [
        [0.4,0.0,0.0,-1.5,-2.0,-2.0,-3.5,-4.0,-4.0]
    ,  [0.2,-0.2,-0.3,-1.9,-2.1,-2.6,-4.2,-4.2,-4.4]
    ,  [1.7,-0.3,-1.6,-0.3,-2.3,-3.6,-2.3,-4.3,-5.6]
    ,  [0.2,-0.3,-0.3,-1.8,-2.3,-2.3,-3.8,-4.3,-4.3]
    ,  [0.0,-0.4,-0.4,-2.0,-2.4,-2.4,-4.0,-4.4,-4.4]
    ,  [1.5,-0.5,-1.8,-0.5,-2.5,-3.8,-2.5,-4.5,-5.8]
    ]
sm_sc.fv_conv_de_div 矩阵组播 - 反卷除。
窗口为第一目入参,原矩阵为第二目入参。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
  3. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select  sm_sc.fv_conv_de_div
    (
        array[[1.5,  2.0,  3.0],  [1.4,  2.0,  3.0],  [3.0,  2.0,  1.7]]
    ,  array
        [
            [1.1,2.0,3.0,4.0,5.0,6.0,7.0]
        ,  [1.2,2.2,3.3,4.1,5.6,6.2,7.4]
        ,  [1.3,2.3,3.3,4.3,5.3,6.3,7.3]
        ,  [1.4,2.4,3.4,4.4,5.4,6.4,7.4]
        ,  [1.5,2.5,3.5,4.5,5.5,6.5,7.5]
        ]
    ,  array[2,  2]
    )

返回:
    array  
    [
        [1.364,1.000,1.000,0.500,0.500,0.600,0.300,0.333,0.429]
    ,  [1.167,0.909,0.909,0.424,0.488,0.536,0.250,0.323,0.405]
    ,  [2.308,0.870,0.515,0.909,0.465,0.321,0.566,0.317,0.233]
    ,  [1.154,0.870,0.909,0.455,0.465,0.566,0.283,0.317,0.411]
    ,  [1.000,0.833,0.882,0.412,0.455,0.556,0.259,0.313,0.405]
    ,  [2.000,0.800,0.486,0.857,0.444,0.309,0.545,0.308,0.227]
    ]
sm_sc.fv_conv_de_pow 矩阵组播 - 反卷幂。
窗口为第一目入参,原矩阵为第二目入参。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
  3. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select  
    sm_sc.fv_conv_de_pow
    (
        array[[1.0,  2.0,  3.0],[2.0,  3.0,  1.0],[1.0,  3.0,  2.0]]
    ,  array
        [
            [1.0,2,3,4,5,6]
        ,  [-1,-2,-3,-4,-5,-6]
        ,  [-0.1,-0.2,-0.3,-0.4,-0.5,-0.6]
        ]
    ,  array[2,  2]
    ,  array[1,  1,  1,  0]
    ,  0.0
    )

返回:
    array  
    [
        [1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000,1.000]
    ,  [1.000,3.000,1.000,4.000,27.000,1.000,16.000,243.000,1.000]
    ,  [1.000,0.333,0.250,1.000,0.037,0.063,1.000,0.004,0.016]
    ]
sm_sc.fv_conv_de_log 矩阵组播 - 反卷对数。
窗口为第一目入参,原矩阵为第二目入参。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
  3. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  5. 补齐填充元素值;
select  
    sm_sc.fv_conv_de_log
    (
        array[[1.5,  2.0,  3.0],[2.0,  3.0,  1.5],[1.5,  3.0,  2.0]]
    ,  array
        [
            [2.0,2,3,4,5,6]
        ,  [10,20,30,40,50,60]
        ,  [10,20,30,40,50,60]
        ]
    ,  array[2,  2]
    ,  array[1,  1,  1,  0]
    ,  2.0
    )

返回:
    array  
    [
        [1.710,1.000,0.631,1.710,1.000,0.631,1.710,1.000,0.631]
    ,  [1.000,0.631,1.710,1.000,1.000,3.419,2.000,1.465,4.419]
    ,  [1.710,2.096,4.322,7.388,3.096,5.322,9.098,3.561,5.907]
    ]
sm_sc.fv_conv_prod_mx 矩阵组播 - 卷矩阵乘法。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
  3. 背景矩阵滑动窗口高宽规格。
      该窗口规格区别于第二自变量高宽规格,两者为矩阵相乘关系;
  4. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  5. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  6. 补齐填充元素值;
select  
    sm_sc.fv_conv_prod_mx
    (
        array
        [
            [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
        ,  [10.0,20.0,30.0,40.0,50.0,60.0,70.0]
        ,  [100.0,200.0,300.0,400.0,500.0,600.0,700.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
        ]
    ,  array[[1.0,  2.0,  -3.0],  [-1.0,  -3.0,  2.0]]
    ,  2
    ,  array[1,  1]
    ,  array[0,  0,  0,  0]
    )

返回:
    array  
    [
        [-1,-4,1,-1,-5,0,-1,-6,-1,-1,-7,-2,-1,-8,-3,-1,-9,-4]
    ,  [-10,-40,10,-10,-50,0,-10,-60,-10,-10,-70,-20,-10,-80,-30,-10,-90,-40]
    ,  [-10,-40,10,-10,-50,0,-10,-60,-10,-10,-70,-20,-10,-80,-30,-10,-90,-40]
    ,  [-100,-400,100,-100,-500,0,-100,-600,-100,-100,-700,-200,-100,-800,-300,-100,-900,-400]
    ,  [-100,-400,100,-100,-500,0,-100,-600,-100,-100,-700,-200,-100,-800,-300,-100,-900,-400]
    ,  [1,4,-1,1,5,0,1,6,1,1,7,2,1,8,3,1,9,4]
    ,  [1,4,-1,1,5,0,1,6,1,1,7,2,1,8,3,1,9,4]
    ,  [10,40,-10,10,50,0,10,60,10,10,70,20,10,80,30,10,90,40]
    ]
sm_sc.fv_conv_de_prod_mx 矩阵组播 - 反卷矩阵乘法。
窗口为第一目入参,原矩阵为第二目入参。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
  3. 背景矩阵滑动窗口高宽规格。
      该窗口规格区别于第一自变量高宽规格,两者为矩阵相乘关系;
  4. 滑动窗口纵向和横向步长;
      该参数为长度为2的一维数组;
  5. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  6. 补齐填充元素值;
select  
    sm_sc.fv_conv_de_prod_mx
    (
        array[[1.0,  2.0],  [-3.0,  -1.0],  [-3.0,  2.0]]
    ,  array
        [
            [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
        ,  [10.0,20.0,30.0,40.0,50.0,60.0,70.0]
        ,  [100.0,200.0,300.0,400.0,500.0,600.0,700.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
        ]
    ,  2
    )

返回:
    array  
    [
        [21,42,42,63,63,84,84,105,105,126,126,147]
    ,  [-13,-26,-26,-39,-39,-52,-52,-65,-65,-78,-78,-91]
    ,  [17,34,34,51,51,68,68,85,85,102,102,119]
    ,  [210,420,420,630,630,840,840,1050,1050,1260,1260,1470]
    ,  [-130,-260,-260,-390,-390,-520,-520,-650,-650,-780,-780,-910]
    ,  [170,340,340,510,510,680,680,850,850,1020,1020,1190]
    ,  [98,196,196,294,294,392,392,490,490,588,588,686]
    ,  [-299,-598,-598,-897,-897,-1196,-1196,-1495,-1495,-1794,-1794,-2093]
    ,  [-302,-604,-604,-906,-906,-1208,-1208,-1510,-1510,-1812,-1812,-2114]
    ,  [-21,-42,-42,-63,-63,-84,-84,-105,-105,-126,-126,-147]
    ,  [13,26,26,39,39,52,52,65,65,78,78,91]
    ,  [-17,-34,-34,-51,-51,-68,-68,-85,-85,-102,-102,-119]
    ]
sm_sc.fv_opr_conv_add_stride_1 矩阵组播 - 单步卷加。
协参缺省,步长为 1。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_add_stride_1
    (
        array
        [
            [1.0,2.0,3.0,4.0,5.0]
        ,  [10.0,20.0,30.0,40.0,50.0]
        ,  [100.0,200.0,300.0,400.0,500.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0]
        ]
    ,  array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    )

返回:
    array  
    [
        [2.0,4.0,6.0,3.0,5.0,7.0,4.0,6.0,8.0]
    ,  [9.0,18.0,27.0,19.0,28.0,37.0,29.0,38.0,47.0]
    ,  [103.0,198.0,301.0,203.0,298.0,401.0,303.0,398.0,501.0]
    ,  [11.0,22.0,33.0,21.0,32.0,43.0,31.0,42.0,53.0]
    ,  [99.0,198.0,297.0,199.0,298.0,397.0,299.0,398.0,497.0]
    ,  [2.0,-4.0,-2.0,1.0,-5.0,-3.0,0.0,-6.0,-4.0]
    ]
sm_sc.fv_opr_conv_sub_stride_1 矩阵组播 - 单步卷减。
协参缺省,步长为 1。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_sub_stride_1
    (
        array
        [
            [1.0,2.0,3.0,4.0,5.0]
        ,  [10.0,20.0,30.0,40.0,50.0]
        ,  [100.0,200.0,300.0,400.0,500.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0]
        ]
    ,  array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    )

返回:
    array  
    [
        [0.0,0.0,0.0,1.0,1.0,1.0,2.0,2.0,2.0]
    ,  [11.0,22.0,33.0,21.0,32.0,43.0,31.0,42.0,53.0]
    ,  [97.0,202.0,299.0,197.0,302.0,399.0,297.0,402.0,499.0]
    ,  [9.0,18.0,27.0,19.0,28.0,37.0,29.0,38.0,47.0]
    ,  [101.0,202.0,303.0,201.0,302.0,403.0,301.0,402.0,503.0]
    ,  [-4.0,0.0,-4.0,-5.0,-1.0,-5.0,-6.0,-2.0,-6.0]
    ]
sm_sc.fv_opr_conv_de_sub_stride_1 矩阵组播 - 单步反卷减。
协参缺省,步长为 1。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select    
    sm_sc.fv_opr_conv_de_sub_stride_1
    (
        array[[1.0,    2.0,    3.0],  [-1.0,    -2.0,    -3.0],  [3.0,    -2.0,    1.0]]
    ,  array
        [
            [1.0,2.0,3.0,4.0,5.0]
        ,  [10.0,20.0,30.0,40.0,50.0]
        ,  [100.0,200.0,300.0,400.0,500.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0]
        ]
    )

返回:
    array  
    [
        [0.0,0.0,0.0,-1.0,-1.0,-1.0,-2.0,-2.0,-2.0]
    ,  [-11.0,-22.0,-33.0,-21.0,-32.0,-43.0,-31.0,-42.0,-53.0]
    ,  [-97.0,-202.0,-299.0,-197.0,-302.0,-399.0,-297.0,-402.0,-499.0]
    ,  [-9.0,-18.0,-27.0,-19.0,-28.0,-37.0,-29.0,-38.0,-47.0]
    ,  [-101.0,-202.0,-303.0,-201.0,-302.0,-403.0,-301.0,-402.0,-503.0]
    ,  [4.0,0.0,4.0,5.0,1.0,5.0,6.0,2.0,6.0]
    ]
sm_sc.fv_opr_conv_mul_stride_1 矩阵组播 - 单步卷乘。
协参缺省,步长为 1。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_mul_stride_1
    (
        array
        [
            [1.0,2.0,3.0,4.0,5.0]
        ,  [10.0,20.0,30.0,40.0,50.0]
        ,  [100.0,200.0,300.0,400.0,500.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0]
        ]
    ,  array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    )

返回:
    array  
    [
        [1.00,4.00,9.00,2.00,6.00,12.00,3.00,8.00,15.00]
    ,  [-10.00,-40.00,-90.00,-20.00,-60.00,-120.00,-30.00,-80.00,-150.00]
    ,  [300.00,-400.00,300.00,600.00,-600.00,400.00,900.00,-800.00,500.00]
    ,  [10.00,40.00,90.00,20.00,60.00,120.00,30.00,80.00,150.00]
    ,  [-100.00,-400.00,-900.00,-200.00,-600.00,-1200.00,-300.00,-800.00,-1500.00]
    ,  [-3.00,4.00,-3.00,-6.00,6.00,-4.00,-9.00,8.00,-5.00]
    ]
sm_sc.fv_opr_conv_div_stride_1 矩阵组播 - 单步卷除。
协参缺省,步长为 1。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_div_stride_1
    (
        array
        [
            [1.0,2.0,3.0,4.0,5.0]
        ,  [10.0,20.0,30.0,40.0,50.0]
        ,  [100.0,200.0,300.0,400.0,500.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0]
        ]
    ,  array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    )

返回:
    array  
    [
        [1.000,1.000,1.000,2.000,1.500,1.333,3.000,2.000,1.667]
    ,  [-10.000,-10.000,-10.000,-20.000,-15.000,-13.333,-30.000,-20.000,-16.667]
    ,  [33.333,-100.000,300.000,66.667,-150.000,400.000,100.000,-200.000,500.000]
    ,  [10.000,10.000,10.000,20.000,15.000,13.333,30.000,20.000,16.667]
    ,  [-100.000,-100.000,-100.000,-200.000,-150.000,-133.333,-300.000,-200.000,-166.667]
    ,  [-0.333,1.000,-3.000,-0.667,1.500,-4.000,-1.000,2.000,-5.000]
    ]
sm_sc.fv_opr_conv_de_div_stride_1 矩阵组播 - 单步反卷除。
协参缺省,步长为 1。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select    
    sm_sc.fv_opr_conv_de_div_stride_1
    (
        array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    ,  array
        [
            [1.0,2.0,3.0,4.0,5.0]
        ,  [10.0,20.0,30.0,40.0,50.0]
        ,  [100.0,200.0,300.0,400.0,500.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0]
        ]
    )

返回:
    array  
    [
        [1.000,1.000,1.000,0.500,0.667,0.750,0.333,0.500,0.600]
    ,  [-0.100,-0.100,-0.100,-0.050,-0.067,-0.075,-0.033,-0.050,-0.060]
    ,  [0.030,-0.010,0.003,0.015,-0.007,0.003,0.010,-0.005,0.002]
    ,  [0.100,0.100,0.100,0.050,0.067,0.075,0.033,0.050,0.060]
    ,  [-0.010,-0.010,-0.010,-0.005,-0.007,-0.008,-0.003,-0.005,-0.006]
    ,  [-3.000,1.000,-0.333,-1.500,0.667,-0.250,-1.000,0.500,-0.200]
    ]
sm_sc.fv_opr_conv_pow_stride_1 矩阵组播 - 单步卷幂。
协参缺省,步长为 1。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_pow_stride_1
    (
        array
        [
            [1.1,2.0,3.0,4.0,5.0]
        ,  [1.2,2.2,3.3,4.1,5.6]
        ,  [1.3,2.3,3.3,4.3,5.3]
        ,  [1.4,2.4,3.4,4.4,5.4]
        ,  [1.5,2.5,3.5,4.5,5.5]
        ]
    ,  array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    )
    
返回:
    array  
    [
        [1.100,4.000,27.000,2.000,9.000,64.000,3.000,16.000,125.000]
    ,  [0.833,0.207,0.028,0.455,0.092,0.015,0.303,0.059,0.006]
    ,  [2.197,0.189,3.300,12.167,0.092,4.300,35.937,0.054,5.300]
    ,  [1.200,4.840,35.937,2.200,10.890,68.921,3.300,16.810,175.616]
    ,  [0.769,0.189,0.028,0.435,0.092,0.013,0.303,0.054,0.007]
    ,  [2.744,0.174,3.400,13.824,0.087,4.400,39.304,0.052,5.400]
    ,  [1.300,5.290,35.937,2.300,10.890,79.507,3.300,18.490,148.877]
    ,  [0.714,0.174,0.025,0.417,0.087,0.012,0.294,0.052,0.006]
    ,  [3.375,0.160,3.500,15.625,0.082,4.500,42.875,0.049,5.500]
    ]
sm_sc.fv_opr_conv_de_pow_stride_1 矩阵组播 - 单步反卷幂。
协参缺省,步长为 1。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select  
    sm_sc.fv_opr_conv_de_pow_stride_1
    (
        array[[1.0,  2.0,  3.0],  [1.0,  2.0,  3.0],  [3.0,  2.0,  1.0]]
    ,  array
        [
            [1.1,2.0,-3.0,5.0,-6.0]
        ,  [1.2,2.2,-3.3,5.6,-6.2]
        ,  [1.3,2.3,-3.3,5.3,-6.3]
        ,  [1.4,2.4,-3.4,5.4,-6.4]
        ,  [1.5,2.5,-3.5,5.5,-6.5]
        ]
    )
    
返回:
    array  
    {
      {1.000,4.000,0.037,1.000,0.125,243.000,1.000,32.000,0.001}
    ,{1.000,4.595,0.027,1.000,0.102,469.763,1.000,48.503,0.001}
    ,{4.171,4.925,1.000,12.514,0.102,1.000,0.027,39.397,1.000}
    ,{1.000,4.595,0.027,1.000,0.102,469.763,1.000,48.503,0.001}
    ,{1.000,4.925,0.027,1.000,0.102,337.865,1.000,39.397,0.001}
    ,{4.656,5.278,1.000,13.967,0.095,1.000,0.024,42.224,1.000}
    ,{1.000,4.925,0.027,1.000,0.102,337.865,1.000,39.397,0.001}
    ,{1.000,5.278,0.024,1.000,0.095,377.098,1.000,42.224,0.001}
    ,{5.196,5.657,1.000,15.588,0.088,1.000,0.021,45.255,1.000}
    }
sm_sc.fv_opr_conv_log_stride_1 矩阵组播 - 单步卷对数。
协参缺省,步长为 1。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_log_stride_1
    (
        array
        [
            [1.1,2.0,3.0,4.0,5.0]
        ,  [1.2,2.2,3.3,4.1,5.6]
        ,  [1.3,2.3,3.3,4.3,5.3]
        ,  [1.4,2.4,3.4,4.4,5.4]
        ,  [1.5,2.5,3.5,4.5,5.5]
        ]
    ,  array[[1.0,  2.0,  3.0],  [1.0,  2.0,  3.0],  [3.0,  2.0,  1.0]]
    )
    
返回:
    array  
    [
        [0.000,1.000,1.000,0.000,0.631,0.792,0.000,0.500,0.683]
    ,  [0.000,0.879,0.920,0.000,0.581,0.779,0.000,0.491,0.638]
    ,  [4.187,0.832,0.000,1.319,0.581,0.000,0.920,0.475,0.000]
    ,  [0.000,0.879,0.920,0.000,0.581,0.779,0.000,0.491,0.638]
    ,  [0.000,0.832,0.920,0.000,0.581,0.753,0.000,0.475,0.659]
    ,  [3.265,0.792,0.000,1.255,0.566,0.000,0.898,0.468,0.000]
    ,  [0.000,0.832,0.920,0.000,0.581,0.753,0.000,0.475,0.659]
    ,  [0.000,0.792,0.898,0.000,0.566,0.742,0.000,0.468,0.651]
    ,  [2.710,0.756,0.000,1.199,0.553,0.000,0.877,0.461,0.000]
    ]
sm_sc.fv_opr_conv_de_log_stride_1 矩阵组播 - 单步反卷对数。
协参缺省,步长为 1。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select  
    sm_sc.fv_opr_conv_de_log_stride_1
    (
        array[[1.5,  2.0,  3.0],  [1.8,  2.0,  3.0],  [3.0,  2.0,  1.2]]
    ,  array
        [
            [1.1,2.0,3.0,4.0,5.0]
        ,  [1.2,2.2,3.3,4.1,5.6]
        ,  [1.3,2.3,3.3,4.3,5.3]
        ,  [1.4,2.4,3.4,4.4,5.4]
        ,  [1.5,2.5,3.5,4.5,5.5]
        ]
    )
    
返回:
    array  
    [
        [0.235,1.000,1.000,1.710,1.585,1.262,2.710,2.000,1.465]
    ,  [0.310,1.138,1.087,1.341,1.722,1.284,2.031,2.036,1.568]
    ,  [0.239,1.202,6.548,0.758,1.722,8.000,1.087,2.104,9.147]
    ,  [0.450,1.138,1.087,1.945,1.722,1.284,2.945,2.036,1.568]
    ,  [0.446,1.202,1.087,1.417,1.722,1.328,2.031,2.104,1.518]
    ,  [0.306,1.263,6.712,0.797,1.766,8.126,1.114,2.138,9.250]
    ,  [0.647,1.202,1.087,2.054,1.722,1.328,2.945,2.104,1.518]
    ,  [0.572,1.263,1.114,1.489,1.766,1.349,2.082,2.138,1.535]
    ,  [0.369,1.322,6.871,0.834,1.807,8.250,1.140,2.170,9.350]
    ]
sm_sc.fv_opr_conv_add_stride_window 矩阵组播 - 窗口步长卷加。
协参缺省,步长为 1。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_add_stride_window
    (
        array
        [
            [1.0,2.0,3.0,4.0,5.0,6.0]
        ,  [10.0,20.0,30.0,40.0,50.0,60.0]
        ,  [100.0,200.0,300.0,400.0,500.0,600.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0,-6.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0]
        ]
    ,  array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    )
    
返回:
    array  
    [
        [2.0,4.0,6.0,5.0,7.0,9.0]
    ,  [9.0,18.0,27.0,39.0,48.0,57.0]
    ,  [103.0,198.0,301.0,403.0,498.0,601.0]
    ,  [0.0,0.0,0.0,-3.0,-3.0,-3.0]
    ,  [-11.0,-22.0,-33.0,-41.0,-52.0,-63.0]
    ,  [-7.0,-22.0,-29.0,-37.0,-52.0,-59.0]
    ]
sm_sc.fv_opr_conv_sub_stride_window 矩阵组播 - 窗口步长卷减。
协参缺省,步长与窗口规格相同。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_sub_stride_window
    (
        array
        [
            [1.0,2.0,3.0,4.0,5.0,6.0]
        ,  [10.0,20.0,30.0,40.0,50.0,60.0]
        ,  [100.0,200.0,300.0,400.0,500.0,600.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0,-6.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0]
        ]
    ,  array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    )
    
返回:
    array  
    [
        [0.0,0.0,0.0,3.0,3.0,3.0]
    ,  [11.0,22.0,33.0,41.0,52.0,63.0]
    ,  [97.0,202.0,299.0,397.0,502.0,599.0]
    ,  [-2.0,-4.0,-6.0,-5.0,-7.0,-9.0]
    ,  [-9.0,-18.0,-27.0,-39.0,-48.0,-57.0]
    ,  [-13.0,-18.0,-31.0,-43.0,-48.0,-61.0]
    ]
sm_sc.fv_opr_conv_de_sub_stride_window 矩阵组播 - 窗口步长反卷减。
协参缺省,步长与窗口规格相同。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select    
    sm_sc.fv_opr_conv_de_sub_stride_window
    (
        array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    ,  array
        [
            [1.1,2.0,3.0,4.0,5.0,6.0]
        ,  [1.2,2.2,3.3,4.1,5.6,6.2]
        ,  [1.3,2.3,3.3,4.3,5.3,6.3]
        ,  [1.4,2.4,3.4,4.4,5.4,6.4]
        ,  [1.5,2.5,3.5,4.5,5.5,6.5]
        ,  [1.5,2.5,3.5,4.5,5.5,6.5]
        ]
    )
    
返回:
    array  
    [
        [-0.1,0.0,0.0,-3.0,-3.0,-3.0]
    ,  [-2.2,-4.2,-6.3,-5.1,-7.6,-9.2]
    ,  [1.7,-4.3,-2.3,-1.3,-7.3,-5.3]
    ,  [-0.4,-0.4,-0.4,-3.4,-3.4,-3.4]
    ,  [-2.5,-4.5,-6.5,-5.5,-7.5,-9.5]
    ,  [1.5,-4.5,-2.5,-1.5,-7.5,-5.5]
    ]
sm_sc.fv_opr_conv_mul_stride_window 矩阵组播 - 窗口步长卷乘。
协参缺省,步长与窗口规格相同。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_mul_stride_window
    (
        array
        [
            [1.0,2.0,3.0,4.0,5.0,6.0]
        ,  [10.0,20.0,30.0,40.0,50.0,60.0]
        ,  [100.0,200.0,300.0,400.0,500.0,600.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0,-6.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0]
        ]
    ,  array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    )
    
返回:
    array  
    [
        [1.00,4.00,9.00,4.00,10.00,18.00]
    ,  [-10.00,-40.00,-90.00,-40.00,-100.00,-180.00]
    ,  [300.00,-400.00,300.00,1200.00,-1000.00,600.00]
    ,  [-1.00,-4.00,-9.00,-4.00,-10.00,-18.00]
    ,  [10.00,40.00,90.00,40.00,100.00,180.00]
    ,  [-30.00,40.00,-30.00,-120.00,100.00,-60.00]
    ]
sm_sc.fv_opr_conv_div_stride_window 矩阵组播 - 窗口步长卷除。
协参缺省,步长与窗口规格相同。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_div_stride_window
    (
        array
        [
            [1.0,2.0,3.0,4.0,5.0,6.0]
        ,  [10.0,20.0,30.0,40.0,50.0,60.0]
        ,  [100.0,200.0,300.0,400.0,500.0,600.0]
        ,  [-1.0,-2.0,-3.0,-4.0,-5.0,-6.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0]
        ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0]
        ]
    ,  array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    )
    
返回:
    array  
    [
        [1.000,1.000,1.000,4.000,2.500,2.000]
    ,  [-10.000,-10.000,-10.000,-40.000,-25.000,-20.000]
    ,  [33.333,-100.000,300.000,133.333,-250.000,600.000]
    ,  [-1.000,-1.000,-1.000,-4.000,-2.500,-2.000]
    ,  [10.000,10.000,10.000,40.000,25.000,20.000]
    ,  [-3.333,10.000,-30.000,-13.333,25.000,-60.000]
    ]
sm_sc.fv_opr_conv_de_div_stride_window 矩阵组播 - 窗口步长反卷除。
协参缺省,步长与窗口规格相同。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select    
    sm_sc.fv_opr_conv_de_div_stride_window
    (
        array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    ,  array
        [
            [1.1,2.0,3.0,4.0,5.0,6.0]
        ,  [1.2,2.2,3.3,4.1,5.6,6.2]
        ,  [1.3,2.3,3.3,4.3,5.3,6.3]
        ,  [1.4,2.4,3.4,4.4,5.4,6.4]
        ,  [1.5,2.5,3.5,4.5,5.5,6.5]
        ,  [1.5,2.5,3.5,4.5,5.5,6.5]
        ]
    )
    
返回:
    array  
    [
        [0.909,1.000,1.000,0.250,0.400,0.500]
    ,  [-0.833,-0.909,-0.909,-0.244,-0.357,-0.484]
    ,  [2.308,-0.870,0.303,0.698,-0.377,0.159]
    ,  [0.714,0.833,0.882,0.227,0.370,0.469]
    ,  [-0.667,-0.800,-0.857,-0.222,-0.364,-0.462]
    ,  [2.000,-0.800,0.286,0.667,-0.364,0.154]
    ]
sm_sc.fv_opr_conv_pow_stride_window 矩阵组播 - 窗口步长卷幂。
协参缺省,步长与窗口规格相同。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_pow_stride_window
    (
        array
        [
            [1.1,2.0,3.0,4.0,5.0,6.0]
        ,  [1.2,2.2,3.3,4.1,5.6,6.2]
        ,  [1.3,2.3,3.3,4.3,5.3,6.3]
        ,  [1.4,2.4,3.4,4.4,5.4,6.4]
        ,  [1.4,2.4,3.4,4.4,5.4,6.4]
        ,  [1.5,2.5,3.5,4.5,5.5,6.5]
        ]
    ,  array[[1.0,  2.0,  3.0],  [-1.0,  -2.0,  -3.0],  [3.0,  -2.0,  1.0]]
    )
    
返回:
    array  
    [
        [1.100,4.000,27.000,4.000,25.000,216.000]
    ,  [0.833,0.207,0.028,0.244,0.032,0.004]
    ,  [2.197,0.189,3.300,79.507,0.036,6.300]
    ,  [1.400,5.760,39.304,4.400,29.160,262.144]
    ,  [0.714,0.174,0.025,0.227,0.034,0.004]
    ,  [3.375,0.160,3.500,91.125,0.033,6.500]
    ]
sm_sc.fv_opr_conv_de_pow_stride_window 矩阵组播 - 窗口步长反卷幂。
协参缺省,步长与窗口规格相同。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select  
    sm_sc.fv_opr_conv_de_pow_stride_window
    (
        array[[1.0,  2.0,  3.0],  [1.0,  2.0,  3.0],  [3.0,  2.0,  1.0]]
    ,  array
        [
            [1.1,2.0,3.0,4.0,-5.0]
        ,  [1.2,2.2,3.3,4.1,-5.6]
        ,  [1.3,2.3,3.3,4.3,-5.3]
        ,  [1.4,2.4,3.4,4.4,-5.4]
        ,  [1.5,2.5,3.5,4.5,-5.5]
        ,  [1.5,2.5,3.5,4.5,-5.5]
        ]
    )
    
返回:
    array  
    [
        [1.000,4.000,27.000,1.000,0.031,81.000]
    ,  [1.000,4.595,37.541,1.000,0.021,90.406]
    ,  [4.171,4.925,1.000,112.622,0.025,1.000]
    ,  [1.000,5.278,41.900,1.000,0.024,125.699]
    ,  [1.000,5.657,46.765,1.000,0.022,140.296]
    ,  [5.196,5.657,1.000,140.296,0.022,1.000]
    ]
sm_sc.fv_opr_conv_log_stride_window 矩阵组播 - 窗口步长卷对数。
协参缺省,步长与窗口规格相同。
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    sm_sc.fv_opr_conv_log_stride_window
    (
        array
        [
            [1.1,2.0,3.0,4.0,5.0,6.0]
        ,  [1.2,2.2,3.3,4.1,5.6,6.2]
        ,  [1.3,2.3,3.3,4.3,5.3,6.3]
        ,  [1.4,2.4,3.4,4.4,5.4,6.4]
        ,  [1.4,2.4,3.4,4.4,5.4,6.4]
        ,  [1.5,2.5,3.5,4.5,5.5,6.5]
        ]
    ,  array[[1.0,  2.0,  3.0],  [1.0,  2.0,  3.0],  [3.0,  2.0,  1.0]]
    )
    
返回:
    array  
    [
        [0.000,1.000,1.000,0.000,0.431,0.613]
    ,  [0.000,0.879,0.920,0.000,0.402,0.602]
    ,  [4.187,0.832,0.000,0.753,0.416,0.000]
    ,  [0.000,0.792,0.898,0.000,0.411,0.592]
    ,  [0.000,0.792,0.898,0.000,0.411,0.592]
    ,  [2.710,0.756,0.000,0.730,0.407,0.000]
    ]
sm_sc.fv_opr_conv_de_log_stride_window 矩阵组播 - 窗口步长反卷对数。
协参缺省,步长与窗口规格相同。
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select  
    sm_sc.fv_opr_conv_de_log_stride_window
    (
        array[[1.3,  2.0,  3.0],  [1.2,  2.0,  3.0],  [3.0,  2.0,  1.5]]
    ,  array
        [
            [1.1,2.0,3.0,0.9,5.0]
        ,  [1.2,2.2,3.3,0.1,5.6]
        ,  [1.3,2.3,3.3,0.3,5.3]
        ,  [1.4,2.4,3.4,0.4,5.4]
        ,  [1.5,2.5,3.5,0.5,5.5]
        ,  [1.5,2.5,3.5,0.5,5.5]
        ]
    )
    
返回:
    array  
    [
        [0.363,1.000,1.000,-0.402,2.322,-0.096]
    ,  [1.000,1.138,1.087,-12.629,2.485,-2.096]
    ,  [0.239,1.202,2.945,-1.096,2.406,-2.969]
    ,  [1.282,1.263,1.114,-3.492,2.433,-0.834]
    ,  [2.224,1.322,1.140,-3.802,2.459,-0.631]
    ,  [0.369,1.322,3.090,-0.631,2.459,-1.710]
    ]

k. 机器学习的 lambda:

函数名 函数说明 调用举例
sm_sc.fv_algebra_execute 对于基础运算或自定义运算,代数式或函数式计算数值。
重载1:
  入参:
    1. 代数式;
重载2:
  入参:
    1. 函数名;
    1. 入参列表;
select
  sm_sc.fv_algebra_execute
  (
    '2.5 + 3.6'
  );

返回:
  6.1
--------------------------
select
  sm_sc.fv_algebra_execute
  (
    'sm_sc.fv_opr_mul'
  , array[1.5, 2.0, 3.4]
  );

返回:
  10.2
sm_sc.fv_lambda_arr 前行传播节点输出因变量 lambda。
入参:
  1. 神经网络节点序号。
      该参数不参与实际计算,仅用于控制、调试跟踪与日志;
  2. lambda 命名,即运算类型。
      支持范围参看第三章第三节神经网络节点支持运算类型;
  3. 第一目入参自变量。
      该参数为二维数组;
  4. 第二目入参自变量。
      该参数为二维数组;对于单目运算,该参数为空;
  5. 神经网络节点粒度的超参数配置。
      例如:激活函数的α值、卷积/池化的窗口的滑动步长;
      详见字典表:
          select * from sm_sc.tb_dic_enum
          where enum_name = 'node_fn_asso_value'
      该参数为二维数组;对于单目运算,该参数为空;

select
  sm_sc.fv_lambda_arr
  (
    100001
    , '03_elu'
    , array[[1.23, 3.34],[-7.2, -0.25]]
    , null
    , array[0.1]
  );

返回:
  array[[1.2300, 3.3400],[-0.0999, -0.0221]]
sm_sc.fv_lambda_arr_ddepdt_dindepdt 反向传播节点因变量对自变量求导 lambda。
该 lambda 适用于前向传播即可求出导数的运算类型。
该 lambda 求取因变量对自变量的导数,没有对自变量广播求逆。
入参:
  1. 神经网络节点序号。
      该参数不参与实际计算,仅用于控制、调试跟踪与日志;
  2. lambda 命名,即运算类型。
      支持范围参看第三章第三节神经网络节点支持运算类型;
  3. 待求导数的自变量入参矩阵;
  4. 待求导数的自变量入参位置;
  5. 另一目自变量入参矩阵。
      对于单目运算,该参数为空;
  6. 神经网络节点粒度的超参数配置。
      例如:激活函数的α值、卷积/池化的窗口的滑动步长;
      详见字典表:
          select * from sm_sc.tb_dic_enum
          where enum_name = 'node_fn_asso_value'
      该参数为二维数组;对于单目运算,该参数为空;
  7. 因变量矩阵;
  8. 自变量的高宽规格;
      一些运算类型可省去传自变量,而只传规格即可。
      包括:agg_concat_x, agg_concat_y, agg_sum, agg_avg,
                 slice_x, slice_y, add, sub 等
select
  sm_sc.fv_lambda_arr_ddepdt_dindepdt
  (
    100001
    , '01_pow'
    , array[[1.23, 3.34],[2.2, 0.25]]
    , 2
    , array[[1.5, 1.3],[0.7, 0.25]]
    , null
    , array[[1.5, 1.3],[0.7, 0.25]] ^` array[[1.23, 3.34],[2.2, 0.25]]
  );

返回:
  array[[0.6676, 0.6302],[-0.1627, -0.9803]]
sm_sc.fv_lambda_arr_dloss_dindepdt 反向传播损失函数对节点自变量求导 lambda。
该 lambda 适用于反向传播阶段才能求出导数的运算类型。
该 lambda 求取损失函数对自变量的导数,没有对自变量广播求逆。
入参:
  1. 神经网络节点序号。
      该参数不参与实际计算,仅用于控制、调试跟踪与日志;
  2. lambda 命名,即运算类型。
      支持范围参看第三章第三节神经网络节点支持运算类型;
  3. 待求导数的自变量入参矩阵;
  4. 待求导数的自变量入参位置;
  5. 另一目自变量入参矩阵。
      对于单目运算,该参数为空;
  6. 神经网络节点粒度的超参数配置。
      例如:激活函数的α值、卷积/池化的窗口的滑动步长;
      详见字典表:
          select * from sm_sc.tb_dic_enum
          where enum_name = 'node_fn_asso_value'
      该参数为二维数组;对于单目运算,该参数为空;
  7. 因变量矩阵;
  8. 损失函数对该神经元因变量导数;
select  
    sm_sc.fv_lambda_arr_dloss_dindepdt
    (
        100001
        ,  '03_softmax'
        ,  array[[1.23,  3.34,  0.96],[2.2,  0.25,  7.7]]
        ,  2
        ,  null
        ,  array[2,  3]  ::  float[]
        ,  sm_sc.fv_redistr_softmax(array[[1.23,  3.34,  0.96],[2.2,  0.25,  7.7]],  array[2,  3]  ::  int[])
        ,  (-`  array[[0.0,  0.0,  1.0],[0.0,  0.0,  1.0]])  ::  float[]
            /`  sm_sc.fv_redistr_softmax(array[[1.23,  3.34,  0.96],[2.2,  0.25,  7.7]],  array[2,  3]  ::  int[])
    )
    
返回:
    array  
    [[0.003,0.025,-0.998[0.008,0.001,0.960]]
sm_sc.fv_lambda_arr_len 神经网络节点(自变量与因变量)矩阵高宽的审查。
该审查发生在训练准备过程中。
根据入参规格和超参数配置,得出出参高宽规格。
入参:
  1. 神经网络节点序号。
      该参数不参与实际计算,仅用于控制、调试跟踪与日志;
  2. lambda 命名,即运算类型;
      支持范围参看第三章第三节神经网络节点支持运算类型;
  3. 运算入参第一目矩阵高宽规格;
  4. 运算入参第二目矩阵高宽规格;
  5. 超参数配置;
select
  sm_sc.fv_lambda_arr_len
  (
    1000001
  , 'conv_2d'
  , array[70, 784]
  , array[1, 25]
  , array[28, 5, 5, 1, 1, 2, 2, 2, 2, 0]
  );

返回:
  array[73, 763]
sm_sc.fv_lambda_loss 求取损失函数。
入参:
  1. 损失函数类型;
      详见字典表:
          select * from sm_sc.tb_dic_enum
          where enum_name = 'loss_fn_type'
  2. 训练输出预测值矩阵;
  3. 训练集的真实值编码;
select
  sm_sc.fv_lambda_loss
  (
    '101'
  , array[[1, 2, 3],[2, 3, 4]]
  , array[[1.1, 2.1, 3.2],[2.2, 3.3, 4.2]]
  )

返回:
  0.3391
sm_sc.fv_lambda_dloss_dz 损失函数对预测值求导。
入参:
  1. 损失函数类型;
      详见字典表:
          select * from sm_sc.tb_dic_enum
          where enum_name = 'loss_fn_type'
  2. 训练输出预测值矩阵;
  3. 训练集的真实值编码;
select
  sm_sc.fv_lambda_dloss_dz
  (
    '101'
  , array[[1, 2, 3],[2, 3, 4]]
  , array[[1.1, 2.1, 3.2],[2.2, 3.3, 4.2]]
  )

返回:
  array[[-0.0707, -0.0707, -0.1414],[-0.1414, -0.2121, -0.1414]]

l. 机器学习的神经网络专用:

函数名 函数说明 调用举例
sm_sc.fv_idx_samp_by_samp 采样再采样序号跟踪。
入参:
  1. 本次采样前样本的原始序号的多区间范围;
  2. 本次采样到的样本在旧集合的位置序号的多区间范围;
select
  sm_sc.fv_idx_samp_by_samp
  (
    int4multirange
    (
      int4range(1, 3, '[]'),
      int4range(8, 12, '[]'),
      int4range(13, 15, '[]')
    ),
    int4multirange
    (
      int4range(4, 6, '[]'),
      int4range(8, 12, '[]')
    )
  )

返回:
  int4multirange
  (
    int4range(8, 10, '[]'),
    int4range(12, 12, '[]'),
    int4range(13, 15, '[]')
  )
sm_sc.ft_nn_buff_slice_rand_pick 从规约的 buff 表中分组随机拣取单次训练的小批量。
当次批量内记录不重复。
入参:
  1. 训练任务标识;
  2. 训练集所有样本按照分类分组排序后的样本编号范围划定;
  3. 训练集中每个分类分组采用数量。
      不同分组可以配置不同采样数量;
出参列:
  1. 抽到的样本编号;
  2. 抽到样本的入参向量;
-- 以 mnist 数据集,配置训练任务为例,
-- 假定配置训练任务编号为:2022030501;
select
  o_ord_no,
  o_slice_rand_pick
from
  sm_sc.ft_nn_buff_slice_rand_pick
  (
    2022030501,
    array
    [
      int4range(1, 5923, '[]'),
      int4range(5924, 12665, '[]'),
      int4range(12666, 18623, '[]'),
      int4range(18624, 24754, '[]'),
      int4range(24755, 30596, '[]'),
      int4range(30597, 36017, '[]'),
      int4range(36018, 41935, '[]'),
      int4range(41936, 48200, '[]'),
      int4range(48201, 54052, '[]'),
      int4range(54053, 60001, '[]')
    ],
    array_fill(7, array[10])
  ) tb_a;

返回:
  -- 10个分类分组,每组随机抽取7个样本,
  -- 共70条采样。
sm_sc.ft_nn_in_out 训练集测试集单条输入,返回判断或预测结果向量。
本函数依托于临时表 sm_sc.__vt_tmp_nn_node 实现。
入参:
  1. 输出模型的训练任务标识;
  2. session 序号。表示 __vt_tmp_nn_node 表中的一个模型实例。
      当传入 null,会新建一个模型实例;
  3 - 6. 测试集或验证集样本入参向量。其中 4 - 6 缺省为 null。
      传入的自变量比训练集的记录大一个维度,用于一次请求传入多条预测数据;
  7. 指定要返回的因变量序号。缺省为 array[1];
-- 假定已经有训练好的模型任务:2022030501。
select
  ord_no,
  i_depdt_01
from sm_sc.tb_nn_train_input_buff,
  sm_sc.ft_nn_in_out
  (
    2022030501,
    null,
    array[i_indepdt]
  ) as a_pred_out_arr
where work_no = 2022030501
  and ord_no = round((random() * 60001) + 0.5)

返回(其中 a_pred_out_arr 为返回值,i_depdt_01 做为真实值对比):
  i_depdt_01:
    array[0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
  a_pred_out_arr:
    array[[0.0001, 0.9193, 0.0028, 0.0337, 0.0010, 0.0048, 0.0013, 0.0125, 0.0190, 0.0053]]
sm_sc.ft_nn_node2node_path 两节点之间的前向路径。
入参:
  1. 输出模型的训练任务标识;
  2. 起始节点;
  3. 到达节点;
出参列:
  1. 出发节点;
  2. 抵达节点;
  3. 抵达节点顺序号;
  4. 节点遍历类型。控制沿途标记;
-- 假定已经有训练的模型任务:2022030501。
select
  o_back_node_no,
  o_fore_node_no,
  o_path_ord_no,
  o_node_type
from sm_sc.ft_nn_node2node_path(2022030501, 103010025, 104030008)

注:
  返回字段 o_node_type 的枚举值:
    1. main: 路径上沿途节点;
    2. leaf: 非沿途节点,但是是配套入参;

返回:
  o_back_node_no    o_fore_node_no    o_path_ord_no    o_node_type
  103010015             104010008             1                          leaf
  103010025             104010008             2                          main
  103010035             104010008             3                          leaf
  103010044             104010008             4                          leaf
  104010008             104020008             1                          main
  104020008             104030008             1                          main
sm_sc.fv_nn_node2node_val 两节点之间的前向传播数值
入参:
  1. 输出模型的训练任务标识;
  2. 起始节点;
  3. 到达节点;
-- 假定已经有训练的模型任务:2022030501。
select sm_sc.fv_nn_node2node_val(2022030501, 103010025, 104030008)

返回(一个算子的张量输出): 略
sm_sc.fv_nn_weight_len 针对权重参数算子,通过因变量规格、超参数配置和自变量顺序位置,反推权重自变量规格。
入参:
  1. 算子类型;
  2. 待求权重规格的自变量位置序号;
  3. 算子超参数;
  4. 算子因变量规格;
select  
    sm_sc.fv_nn_weight_len
    (
        '01_prod_mx'
    ,  2
    ,  array[2.0,  3.0,  5.0]
    ,  array[8,  10,  2,  5]
    )

返回:
    array[8,  10,  3,  5]
sm_sc.fv_nn_none 空算子、直传算子、nn 节点占位算子。
单目自变量原封不动当做因变量输出。
可用于设计神经网络时,
网络节点占位、
算子粒度超参数配置位置扩展或自变量位置跟踪等。
select  
    sm_sc.fv_nn_none(array[1.0])

返回:
    array[1.0]
sm_sc.fv_nn_node_pick_depdt_idx 算子执行后,因变量的数据集采样序号跟踪。 select  
    sm_sc.fv_nn_node_pick_depdt_idx
    (
        '04_slice_y'
    ,  array[int4multirange(int4range(2,  5,  '[]')),  int4multirange(int4range(7,  11,  '[]'))]
    ,  array[[3.0],  [6.0]]
    )


返回:
    array
    [
        int4multirange(int4range(4,  5,  '[]'),  int4range(7,  8,  '[]'))
    ]

m. 机器学习的编码、解码:

函数名 函数说明 调用举例
sm_sc.fv_huffman 霍夫曼编码。
本函数依托于临时表 sm_sc.__vt_tmp_huffman 实现。
入参:
  1. 原始数值集合组成的一维数组;
select
  sm_sc.fv_huffman
  (
    array[1, 2, 3, 8, 9, 13, 19]
  );

返回:
  array[B'00101', B'00100',B'0011',B'001',B'11',B'10',B'01']
sm_sc.fv_onehot 独热编码。
入参:
  1. 原始数值集合组成的一维数组或二维多行一列数组;
  2. 热编码值。缺省为 1;
  3. 冷编码值。缺省为 0;
select
  sm_sc.fv_onehot
  (
    array[1, 2, 3, 1, 4, 3, 5, 6]
  );

返回:
  array
  [[1.0, 0.0, 0.0, 0.0, 0.0, 0.0]
  ,[0.0, 1.0, 0.0, 0.0, 0.0, 0.0]
  ,[0.0, 0.0, 1.0, 0.0, 0.0, 0.0]
  ,[1.0, 0.0, 0.0, 0.0, 0.0, 0.0]
  ,[0.0, 0.0, 0.0, 1.0, 0.0, 0.0]
  ,[0.0, 0.0, 1.0, 0.0, 0.0, 0.0]
  ,[0.0, 0.0, 0.0, 0.0, 1.0, 0.0]
  ,[0.0, 0.0, 0.0, 0.0, 0.0, 1.0]]
sm_sc.ft_onehot_dic 独热编码字典。
入参:
  1. 原始数值集合组成的一维数组或二维多行一列数组;
  2. 热编码值。缺省为 1;
  3. 冷编码值。缺省为 0;
select
    o_ele
,  o_onehot
from  
    sm_sc.ft_onehot_dic
    (
        array[1,  2,  3,  1,  4,  3,  5,  6]
    );

返回:
    o_ele      o_onehot
    1              {1,0,0,0,0,0}
    2              {0,1,0,0,0,0}
    3              {0,0,1,0,0,0}
    4              {0,0,0,1,0,0}
    5              {0,0,0,0,1,0}
    6              {0,0,0,0,0,1}
sm_sc.ft_bpe BPE 编码。
入参:
  1. 原始输入序列数组;
  2. 约束:迭代合并 token 的次数做为循环结束的阈值;
  3. 约束:token list 的字典规模做为循环结束的阈值,
      缺省 0;
  4. 期望:编码后,每个 seq 包含 token 数量的最大值做为循环结束的阈值,
      缺省 0 代表不约束循环结束阈值;
  5. 初步评估:对于某一个 seq 来说,当包含的 token 数已经小于 i_threshold_seq_token_len,
      那么判断:其包含的 token 的平均长度超过该阈值,则不再参与 bpe。
      缺省 0 代表不做此判断;
  6. 是否区分匹配 seq 的起始和终止。
      如果区分,则要对 seq 中的两个逃逸字符 '^$' 做特殊处理;
出参列:
  1. 输出序列数组。
      元素顺序与原始输入一一对应;
  2. 清单,字典表;
select
    o_ret_seq_code
,  o_ret_token_list
from  
    sm_sc.ft_bpe
    (
        array['estern',  'widest',  'longest']
    ,  2
    )

返回:
    o_ret_seq_code:
        array
        [
            'est  e  r  n'
        ,  'w  i  d  est'
        ,  'l  o  n  g  est'
        ]
    o_ret_token_list:
        array
        [
            'r'
        ,  'n'
        ,  'd'
        ,  'g'
        ,  'i'
        ,  'w'
        ,  'l'
        ,  'o'
        ,  'est'
        ,  'e'
        ]

n. 机器学习的损失函数:

函数名 函数说明 调用举例
sm_sc.fv_loss_least_square 最小二乘法。
  1. 训练输出预测值矩阵;
  2. 训练集的真实值编码;
select  
    sm_sc.fv_loss_least_square
    (
        array[[1.0,  2,  3],  [2,  3,  4]]
    ,  array[[1.1,  2.1,  3.2],  [2.2,  3.3,  4.2]]
    )
    
返回:  
    0.3391164991562635
sm_sc.fv_loss_cross_entropy 交叉熵。
  1. 训练输出预测值矩阵;
  2. 训练集的真实值编码;
select  
    sm_sc.fv_loss_cross_entropy
    (
        array[[0.3,  0.5,  0.2],  [0.1,  0.8,  0.1]]
    ,  array[[0.0,  1.0,  0.0],  [0.0,  1.0,  0.0]]
    )
    
返回:  
    0.4581453659370775

o. 复数运算:

函数名 函数说明 调用举例
sm_sc.fv_opr_add 复数相加 select
  sm_sc.fv_opr_add
  (
    (12.3, -12.3),
    (-45.6, -45.6)
  );

返回:
  (-33.3, -57.9)
sm_sc.fv_opr_sub 复数相减 select
  sm_sc.fv_opr_sub
  (
    (12.3, -12.3),
    (-45.6, -45.6)
  );

返回:
  (57.9, 33.3)
sm_sc.fv_opr_sub 复数相反数 select
  sm_sc.fv_opr_sub
  (
    (12.3, -12.3)
  );

返回:
  (-12.3, 12.3)
sm_sc.fv_opr_mul 复数相乘 select
  sm_sc.fv_opr_mul
  (
    (12.3, -12.3),
    (-45.6, -45.6)
  );

返回:
  (1121.76, 0.0)
sm_sc.fv_opr_div 复数相除 select
  sm_sc.fv_opr_div
  (
    (12.3, -12.3),
    (-45.6, -45.6)
  );

返回:
  (0.0 ,0.2697)
sm_sc.fv_opr_div 复数倒数 select
  sm_sc.fv_opr_div
  (
    (12.3, -12.3)
  );

返回:
  (0.0407, 0.0407)
sm_sc.fv_opr_pow 复数幂 select
  sm_sc.fv_opr_pow
  (
    (2.3, -0.8),
    (1.6, -3.6)
  );

返回:
  (-1.0288, 0.7009)
sm_sc.fv_opr_exp 复数自然常数幂 select
  sm_sc.fv_opr_exp
  (
    (2.3, -0.8)
  );

返回:
  (6.9491, -7.1550)
sm_sc.fv_opr_log 复数对数 select
  sm_sc.fv_opr_log
  (
    (12.3, -12.3),
    (-45.6, -45.6)
  );

返回:
  (1.5671, -0.3940)
sm_sc.fv_opr_ln 复数自然对数 select
  sm_sc.fv_opr_ln
  (
    (12.3, -12.3)
  );

返回:
  (2.8562, -0.7854)
sm_sc.fv_sin 复数正弦 select
  sm_sc.fv_sin
  (
    (2.3, -2.3)
  );

返回:
  (3.7563, 3.2894)
sm_sc.fv_cos 复数余弦 select
  sm_sc.fv_cos
  (
    (3.3, -1.3)
  );

返回:
  (-0.3109, 1.6771)
sm_sc.fv_opr_real 复数实部 select
  sm_sc.fv_opr_real
  (
    (2.3, -2.3)
  );

返回:
  2.3
sm_sc.fv_opr_imaginary 复数虚部 select
  sm_sc.fv_opr_imaginary
  (
    (2.3, -2.3)
  );

返回:
  -2.3
sm_sc.fv_opr_norm 复数的模 select
  sm_sc.fv_opr_norm
  (
    (2.3, -2.3)
  );

返回:
  3.2527
sm_sc.fv_opr_conjugate 复数共轭 select
  sm_sc.fv_opr_conjugate
  (
    (2.4, -6.3)
  );

返回:
  (2.4, 6.3)
sm_sc.fv_opr_conjugate_45 复数实虚对换 select
  sm_sc.fv_opr_conjugate_45
  (
    (2.4, -6.3)
  );

返回:
  (-6.3, 2.4)
sm_sc.fv_opr_round 复数四舍五入 select
  sm_sc.fv_opr_round
  (
    (12.34854, -12.3483)
  );

返回:
  (12, -12)
sm_sc.fv_opr_floor 复数数位地板值 select
  sm_sc.fv_opr_floor
  (
    (1482.37878, -178672.3543)
  , -1
  );

返回:
  (1480, -178680)
sm_sc.fv_opr_ceil 复数数位天花板值 select
  sm_sc.fv_opr_ceil
  (
    (12.3233333, -12.3788)
  , 2
  );

返回:
  (12.33, -12.37)
sm_sc.fv_opr_trunc 复数数位截取值 select
  sm_sc.fv_opr_trunc
  (
    (12.31231, -12.32333)
  , 3
  );

返回:
  (12.312, -12.323)

p. 对 postgresql 补充的 udf 公共函数:

函数名 函数说明 调用举例
sm_sc.fa_coalesce 免空聚合。 select
  sm_sc.fa_coalesce(a_val) as a_coal_agg,
  sm_sc.fa_coalesce(a_val order by a_no) as a_coal_agg_asc,
  sm_sc.fa_coalesce(a_val order by a_no desc) as a_coal_agg_desc
from
(
  select null as a_val, 1 as a_no
  union all
  select 'abc', 3
  union all
  select 'cde', 2
  union all
  select 'fgh', 4
  union all
  select null, 5
) tb_a(a_val)

返回:
  a_coal_agg: 'abc'
  a_coal_agg_asc: 'cde'
  a_coal_agg_desc: 'fgh'
sm_sc.fa_prod 连乘聚合。 select
  sm_sc.fa_prod(a_val) as a_prod_agg
from
(
  select 3.0 as a_val
  union all
  select 2.5
  union all
  select 4.8
) tb_a(a_val)

返回:36.0
sm_sc.fa_concat 连接聚合。 select  
    sm_sc.fa_concat(a_val)  as  a_concat_agg
from  
(
    select  'abc'  as  a_val
    union  all  select  'faera'
    union  all  select  '4564'
    union  all  select  'kuk7'
    union  all  select  '66yy'
)  tb_a(a_val)

返回:abcfaera4564kuk766yy
sm_sc.fv_enum_rand_pick 枚举随机拣取,不重复。
入参:
  1. 枚举类型名称;
  2. 随机采样数量;
-- create type sm_sc.typ_enum_day as
-- enum('SUN','MON','TUE','WED','THU','FRI','SAT');
select
  sm_sc.fv_enum_rand_pick
  (
    'sm_sc.typ_enum_day'
  , 3
  );

返回:array['TUE', 'MON', 'SUN']
sm_sc.fv_enum_rand 枚举随机取值,可重复。
入参:
  1. 枚举类型名称;
  2. 随机采样数量;
-- create type sm_sc.typ_enum_day as
-- enum('SUN','MON','TUE','WED','THU','FRI','SAT');
select
  sm_sc.fv_enum_rand
  (
    'sm_sc.typ_enum_day'
  , 3
  );

返回:array['TUE', 'MON', 'MON']
sm_sc.fv_o_distance 两向量欧式距离。
入参:
  1. 向量1;
  2. 向量2;
select
  sm_sc.fv_o_distance
  (
    array[1.0, 2.0]
  , array[4.0, 6.0]
  );

返回:5.0
sm_sc.fa_range_or 各个多段区间合并聚合。
  聚合字段类型:
    range 类型或 range 数组类型;
select  
    sm_sc.fa_range_or(a_val)
from  
(
    select  int8range(1,  2,  '[]')  ::  int8multirange  as  a_val
    union  all  select  int8range(5,  6,  '[]')  ::  int8multirange
    union  all  select  int8range(3,  7,  '[]')  ::  int8multirange
    union  all  select  int8range(9,  13,  '[]')  ::  int8multirange
    union  all  select  int8range(11,  17,  '[]')  ::  int8multirange
    union  all  select  null
)  t

返回:  
    int8multirange(int8range(1,  7,  '[]'),  int8range(9,  17,  '[]'))
    
--  -----------------------------------------------------
select  sm_sc.fa_range_or(a_val)
from  
(
    select  array[int8range(1,  2,  '[]')  ::  int8multirange,  int8range(-2,  -1,  '[]')  ::  int8multirange]  as  a_val
    union  all  select  array[int8range(5,  6,  '[]')  ::  int8multirange,  int8range(-6,  -5,  '[]')  ::  int8multirange]
    union  all  select  array[int8range(3,  7,  '[]')  ::  int8multirange,  int8range(-7,  -3,  '[]')  ::  int8multirange]
    union  all  select  array[int8range(9,  13,  '[]')  ::  int8multirange,  int8range(-13,  -9,  '[]')  ::  int8multirange]
    union  all  select  array[int8range(11,  17,  '[]')  ::  int8multirange,  int8range(-17,  -11,  '[]')  ::  int8multirange]
    union  all  select  null
)  t

返回:  
    array  
    [
        int8multirange(int8range(1,  7,  '[]'),  int8range(9,  17,  '[]'))
    ,  int8multirange(int8range(-17,  -7,  '[]'),  int8range(-7,  -1,  '[]'))
    ]
sm_sc.fa_range_and 区间相交聚合。
  聚合字段类型:
    range 类型或 range 数组类型;
select  
    sm_sc.fa_range_and(a_val)
from  
(
    select  int8range(9,  15,  '[]')  ::  int8multirange  as  a_val
    union  all  select  int8range(11,  17,  '[]')  ::  int8multirange
    union  all  select  int8range(7,  12,  '[]')  ::  int8multirange
)  t

返回:  
    int8multirange(int8range(11,  12,  '[]'))
    
--  -----------------------------------------------------
select  sm_sc.fa_range_and(a_val)
from  
(
    select  array[int8range(1,  5,  '[]')  ::  int8multirange,  int8range(-4,  3,  '[]')  ::  int8multirange]  as  a_val
    union  all  select  array[int8range(3,  6,  '[]')  ::  int8multirange,  int8range(-6,  -1,  '[]')  ::  int8multirange]
)  t

返回:  
    array  
    [
        int8multirange(int8range(3,  5,  '[]'))
    ,  int8multirange(int8range(-4,  -1,  '[]'))
    ]
sm_sc.fv_multirange_len 多段区间的长度,与跨度不同,排除了间隔。
  入参:
    1. 多段区间;
select  
    sm_sc.fv_multirange_len
    (
        int8multirange(int8range(1,  3,  '[]'),  int8range(9,  10,  '[]'))
    )

返回:  
    5
sm_sc.fv_range_move 单区间漂移。
  入参:
    1. 单区间;
    2. 移动距离;
select  
    sm_sc.fv_range_move
    (
        int8range(1,  3,  '[]')
    ,  6  ::  bigint
    )

返回:  
    int8range(7,  9,  '[]')
sm_sc.fv_multirange_move 多段区间漂移。
  入参:
    1. 多段区间;
    2. 移动距离;
select  
    sm_sc.fv_multirange_move
    (
        int8multirange(int8range(1,  3,  '[]'),  int8range(9,  10,  '[]'))
    ,  10  ::  bigint
    )

返回:  
    int8multirange(int8range(11,  13,  '[]'),  int8range(19,  20,  '[]'))
sm_sc.fv_get_global_seq 获得全局 bigint 唯一标识。
  入参:
    1. 获得唯一标识个数。缺省为 1;
select  
    sm_sc.fv_get_global_seq(3)
    
返回:
    int8range(8,  10,  '[]')

q. 导数公式推导:

函数名 函数说明 调用举例
sm_sc.fv_gradient 代数式导数推导。
本函数依托于以下临时表实现。
  1. sm_sc._vt_fn_grad__graph;
  2. sm_sc._vt_fn_grad__algebra;
  3. sm_sc._vt_fn_grad__forward;
  4. sm_sc._vt_fn_grad__chain;
重载1.
  入参:
    1. 求导目标自变量名称;
    2. 代数式的序列化 json;
重载2.
  入参:
    1. 求导目标自变量名称;
    2. 代数式文本表达;
select
  sm_sc.fv_gradient
  (
    'v_x' :: text,
    '
    {
      "out_param": "v_z",
      "opr": "sm_sc.fv_opr_pow",
      "in_params":
      [
        {
          "out_param": "v_x"
        },
        {
          "out_param": "v_x"
        }
      ]
    }
    ' :: jsonb
  );

返回:
  (((v_x ^ v_x) * ln(v_x)) + (v_x * (v_x ^ (v_x - 1.00000000))))
--------------------------
select
  sm_sc.fv_gradient
  (
    'v_x'
  , '(v_x * v_y) + exp(v_x * v_y) + power(v_x, 2)'::text
  );

返回:(v_y + (2.00000000 * v_x) + (exp((v_x * v_y)) * v_y))
sm_sc.ft_gradient 代数式导数数值计算。
入参:
  1. 求导目标自变量名称列表;
  2.包含自变量代入数值的代数式的序列化 json;
出参列:
  1. 求导目标自变量名称;
  2.导数值;
select
  o_indepdt_vars_name,
  o_grad
from
sm_sc.ft_gradient
(
  array['v_x_in', 'v_y_in'],
  '
  {
    "out_param": "v_z_in",
    "opr": "sm_sc.fv_opr_add",
    "in_params":
    [
      {
        "opr": "sm_sc.fv_opr_mul",
        "in_params":
        [
          {
            "out_param": "v_x_in",
            "out_value": 1.5
          },
          {
            "out_param": "v_y_in",
            "out_value": 1.5
          }
        ]
      },
      {
        "opr": "sm_sc.fv_opr_exp",
        "in_params":
        [
          {
            "opr": "sm_sc.fv_opr_mul",
            "in_params":
            [
              {
                "out_param": "v_x_in",
                "out_value": 1.5
              },
              {
                "out_param": "v_y_in",
                "out_value": 1.5
              }
            ]
          }
        ]
      },
      {
        "opr": "sm_sc.fv_opr_pow",
        "in_params":
        [
          {
            "out_param": "v_x_in",
            "out_value": 1.5
          },
          {
            "out_value": 2
          }
        ]
      }
    ]
  }
  '::jsonb
);

返回:
  o_indepdt_vars_name        o_grad
  v_x_in                                18.73160376
  v_y_in                                15.73160376
sm_sc.ft_gradient_graph 代数式文本导数推导(输出为树形结构)。
入参:
  1. 求导目标自变量名称;
  2.代数式文本表达;
出参列:
  1. 中间因变量;
  2. 中间自变量;
  3. 常量数值;
  4. 入参位置顺序号;
  5. 运算操作类型;
select
  o_out_param_x,
  o_in_param_x,
  o_in_value_x,
  o_param_loc_x,
  o_out_opr_x
from sm_sc.ft_gradient_graph('v_x', '3 * v_x * v_y'::text)

返回:
  o_out_param_x                                              o_in_param_x                                                      o_in_value_x      o_param_loc_x        o_out_opr_x
                                                                          1ecb1aeee9bba546541394669cfbb68e                                            1        
  04460d66750dc2c536e3aef4a66df70a        3a98ec1e00cca8e4d330b49c896699c3                                            1                                sm_sc.fv_opr_mul
  04460d66750dc2c536e3aef4a66df70a        e38869fbedbaa92e1aef2ee286e1a751                                            2                                sm_sc.fv_opr_mul
  1ecb1aeee9bba546541394669cfbb68e        04460d66750dc2c536e3aef4a66df70a                                            1                                sm_sc.fv_opr_add
  3a98ec1e00cca8e4d330b49c896699c3                                                                                      1.0                        1                                
  e38869fbedbaa92e1aef2ee286e1a751        v_y                                                                                                      1                                sm_sc.fv_opr_mul
  e38869fbedbaa92e1aef2ee286e1a751                                                                                      3.0                        1                                sm_sc.fv_opr_mul
sm_sc.ft_gradient_opr_graph 基础算子的导数推导。
入参:
  1. 求导目标自变量名称;
  2.运算操作类型;
  3.运算操作类型;求导目标自变量入参位置顺序号;
  4.其他入参名称清单。
     如果是常量则填 null;
  5.其他入参常量清单。
     如果是变量则填 null;
  6.指定求导结果变量名称;
select
  o_out_param,
  o_in_param,
  o_in_value,
  o_param_loc,
  o_out_opr
from sm_sc.ft_gradient_opr_graph
(
  'x',
  'sm_sc.fv_opr_div',
  2,
  null,
  array[1.2]
);

返回:
  o_out_param                                                o_in_param                                                  o_in_value    o_param_loc    o_out_opr
  b0ae53f5ac4c3091753f8e4e4c352039      x                                                                                            1                        sm_sc.fv_opr_pow
  b0ae53f5ac4c3091753f8e4e4c352039                                                                            -2.0                2                        sm_sc.fv_opr_pow
  6da6d6058c859b21588e829d71a7e6b3                                                                            1.2                  1                        sm_sc.fv_opr_mul
  6da6d6058c859b21588e829d71a7e6b3      b0ae53f5ac4c3091753f8e4e4c352039                              2                        sm_sc.fv_opr_mul
  8881836ea7405adb788660db93f5f116                                                                            0.0                  1                        sm_sc.fv_opr_sub
  8881836ea7405adb788660db93f5f116      6da6d6058c859b21588e829d71a7e6b3                              2                        sm_sc.fv_opr_sub
                                                                        8881836ea7405adb788660db93f5f116                              1                        
sm_sc.fv_gradient_jacobi 雅可比矩阵导数推导。
入参:
  1. 自变量名称清单;
  2. 代数式清单;
select
  sm_sc.fv_gradient_jacobi
  (
    array['r', 'a', 'b']
  , array['r*cos(a)*sin(b)', 'r*sin(a)*sin(b)', 'r*cos(b)']
  )

返回:
  array
  [
    [
      '(sin(b) * cos(a))',
      '((sin(b) * r) * (0.0 - sin(a)))',
      '((r * cos(a)) * cos(b))'
    ],
    [
      '(sin(b) * sin(a))',
      '((r * sin(b)) * cos(a))',
      '((r * sin(a)) * cos(b))'
    ],
    [
      'cos(b)',
      '0.0',
      '(r * (0.0 - sin(b)))'
    ]
  ]
sm_sc.fv_gradient_opr 基础算子的数值求导。
入参:
  1. 求导目标自变量值;
  2.运算操作类型;
  3. 求导目标自变量入参顺序位置;
  4. 因变量值;
  5. 另一目自变量入参数值;
select sm_sc.fv_gradient_opr
(
  8.0,
  'sm_sc.fv_opr_log',
  2,
  null,
  2.0
);

返回:0.18033688

r. 一些矩阵运算求导:

提示 1:pg4ml 框架中,通常求导函数对自变量广播的反向传播的支持,依赖于训练准备阶段对自变量数组规格的跟踪;

函数名 函数说明 调用举例
sm_sc.
fv_d_nn_none_dloss_dindepdt
空函数求导。
入参:
  1. 损失函数对因变量的导数;
select  
    sm_sc.fv_d_nn_none_dloss_dindepdt
    (
        array[[1,  2,  3],  [4,  5,  6]]
    )

返回:  
    array[[1,  2,  3],  [4,  5,  6]]
sm_sc.
fv_d_new_dloss_dindepdt
数值求导 new。
入参:
  1. 损失函数对因变量的导数;
  2. new 函数各维度方向分组重复次数;
select
  sm_sc.fv_d_new_dloss_dindepdt
  (
    array[[0.5, -0.2, 0.25, 1.3, -0.9, -0.1]
         ,[-0.5, -0.2, -0.25, 1.3, 0.9, 0.1]
         ,[0.5, 0.2, 0.25, -1.3, 0.9, 0.05]],
    array[1, 3]
  );

返回:
  array[[-0.15, 1.0],[0.15, 1.2],[1.65, -1.05]]
sm_sc.
fv_d_activate_elu
数值求导 elu。
入参:
  1. 自变量矩阵;
  2. α 值;
select
  sm_sc.fv_d_activate_elu
  (
    array[[1.0, -2.0],[3.0, 4.0]]
  , 0.3
  );

返回:
  array[[1.0, 0.0406],[1.0, 1.0]]
sm_sc.
fv_d_activate_gelu
数值求导 gelu。
入参:
  1. 自变量矩阵;
select
  sm_sc.fv_d_activate_gelu
  (
    array[[1.0, -2.0],[3.0, 4.0]]
  );

返回:
  array[[1.0830, -0.0861],[1.0116, 1.0003]]
sm_sc.
fv_d_activate_leaky_relu
数值求导 leaky_relu。
入参:
  1. 自变量矩阵;
  2. α值;
select
  sm_sc.fv_d_activate_leaky_relu
  (
    array[[1.0, -2.0],[3.0, 4.0]]
  , 0.3
  );

返回:
  array[[1.0000, 0.3000],[1.0000, 1.0000]]
sm_sc.
fv_d_activate_relu
数值求导 relu。
入参:
  1. 自变量矩阵;
select
  sm_sc.fv_d_activate_relu
  (
    array[[1.0, -2.0],[3.0, 4.0]]
  );

返回:
  array[[1.0000, 0.0000],[1.0000, 1.0000]]
sm_sc.
fv_d_activate_selu
数值求导 selu。
入参:
  1. 自变量矩阵;
select
  sm_sc.fv_d_activate_selu
  (
    array[[1.0, -2.0],[3.0, 4.0]]
  );

返回:
  array[[1.0507, 0.2379],[1.0507, 1.0507]]
sm_sc.
fv_d_activate_sigmoid
数值求导 sigmoid。
入参:
  1. 自变量矩阵;
select
  sm_sc.fv_d_activate_sigmoid
  (
    array[[1.0, -2.0],[3.0, 4.0]]
  );

返回:
  array[[0.1966, 0.1050],[0.0452, 0.0177]]
sm_sc.
fv_d_activate_softplus
数值求导 softplus。
入参:
  1. 自变量矩阵;
select
  sm_sc.fv_d_activate_softplus
  (
    array[[1.0, -2.0],[3.0, 4.0]]
  );

返回:
  array[[0.7311, 0.1192],[0.9526, 0.9820]]
sm_sc.
fv_d_activate_swish
数值求导 swish。
入参:
  1. 自变量矩阵;
select
  sm_sc.fv_d_activate_swish
  (
    array[[1.0, -2.0],[3.0, 4.0]]
  );

返回:
  array[[0.9277, -0.0908],[1.0881, 1.0527]]
sm_sc.
fv_d_activate_boxcox
数值求导 boxcox。
入参:
  1. 自变量矩阵;
  2. lambda 值;
select  
    sm_sc.fv_d_activate_boxcox
    (
        array[[1.1,  2,  3],  [4,  5,  6]]
    ,  0.2
    )

返回:  
    array[[0.927,  0.574,  0.415],[0.330,  0.276,  0.238]]
sm_sc.
fv_d_redistr_softmax_dloss_dindepdt
softmax 的损失函数对自变量求导。
入参:
  1. 因变量矩阵:
  2. 损失函数对因变量求导矩阵;
  3. 自变量矩阵:
select
  sm_sc.fv_d_redistr_softmax_dloss_dindepdt
  (
    sm_sc.fv_redistr_softmax(array[[1, 2, 3, 4, 5]]),
    -` array[[0.0, 0.0, 0.0, 0.0, 1.0]] :: float[] /` sm_sc.fv_redistr_softmax(array[[1, 2, 3, 4, 5]]),
    array[[1, 2, 3, 4, 5]]
  );

返回:
  array[[0.0117, 0.0317, 0.0861, 0.2341, -0.3636]]
sm_sc.
fv_d_redistr_zscore
数值求导 zscore 。
入参:
  1. 因变量矩阵:
  2. 自变量矩阵:
select  
    sm_sc.fv_d_redistr_zscore
    (
        sm_sc.fv_redistr_zscore(array[[1,  2,  3,  4,  5]])
    ,  array[[1,  2,  3,  4,  5]]
    )

返回:  
    array[1.138,  1.771,  2.403,  3.036,  3.668]
sm_sc.
fv_d_conv_2d_dloss_dindepdt_1_ex
卷积的损失函数对第一自变量(即:背景矩阵)求导。
入参:
  1. 损失函数对因变量求导矩阵;
  2. 另一目自变量,
      即第二目,卷积核窗口矩阵;
  3. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  4. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
select
  sm_sc.fv_d_conv_2d_dloss_dindepdt_1_ex
  (
    array[[1.1, 1.1, 1.1],[1.1, 1.1, 1.1],[1.1, 1.1, 1.1]],
    array[[0.5, 1.1, 0.5],[1.1, 2.1, 1.1],[0.5, 1.1, 0.5]],
    array[2,2],
    array[1,1,1,0]
  );

返回:
  array[[0.257, 0.269, 0.257, 0.269, 0.257, 0.134]
          ,[0.269, 0.244, 0.269, 0.244, 0.269, 0.122]
          ,[0.257, 0.269, 0.257, 0.269, 0.257, 0.134]
          ,[0.269, 0.244, 0.269, 0.244, 0.269, 0.122]
          ,[0.257, 0.269, 0.257, 0.269, 0.257, 0.134]]
sm_sc.
fv_d_conv_2d_dloss_dindepdt_2
卷积的损失函数对第二自变量(即:窗口矩阵)求导。
入参:
  1. 另一目自变量矩阵,
      即第一目,背景矩阵;
  2. 损失函数对因变量求导矩阵;
  3. 本自变量高宽,
      即第二目规格,卷积核窗口矩阵高宽;
      该参数为长度为2的一维数组;
  4. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  5. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  6. 补齐填充元素值;
select
  sm_sc.fv_d_conv_2d_dloss_dindepdt_2
  (
    array[[1, 2, 3, 4, 5, 6]
            ,[10, 20, 30, 40, 50, 60]
            ,[100, 200, 300, 400, 500, 600]
            ,[-1, -2, -3, -4, -5, -6]
            ,[-10, -20, -30, -40, -50, -60]],
    array[[0.5, 1.1, 0.5],[1.1, 2.1, 1.1],[0.5, 1.1, 0.5]],
    array[3,3],
    array[2,2],
    array[1,1,1,0],
    0
  );

返回:
  array[[66.800, 50.100, 33.400]
          ,[1644.400, 1233.300, 822.200]
          ,[163.600, 122.700, 81.800]]
sm_sc.
fv_d_conv_2d_dloss_dindepdt_3
卷积的损失函数对第三自变量(即:偏移量)求导。
入参:
  1. 损失函数对因变量求导矩阵;
  2. 本自变量规格,
      即第三目自变量规格;
select  
    sm_sc.fv_d_conv_2d_dloss_dindepdt_3
    (
        array
        [
            [
                [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
            ,  [10.0,20.0,30.0,40.0,50.0,60.0,70.0]
            ,  [100.0,200.0,300.0,400.0,500.0,600.0,700.0]
            ,  [-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
            ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
            ]
        ,  [
                [1.0,2.0,3.0,4.0,5.0,6.0,7.0]
            ,  [10.0,20.0,30.0,40.0,50.0,60.0,70.0]
            ,  [100.0,200.0,300.0,400.0,500.0,600.0,700.0]
            ,  [-1.0,-2.0,-3.0,-4.0,-5.0,-6.0,-7.0]
            ,  [-10.0,-20.0,-30.0,-40.0,-50.0,-60.0,-70.0]
            ]
        ]
    ,  array[2,  1,  1]
    )

返回:  
    array[[[2800.0]],  [[2800.0]]]
sm_sc.
fv_d_conv_2d_grp_x_dloss_dindepdt_1
矩阵x方向卷积的损失函数对第一自变量求导,
也即损失函数对背景矩阵求导。
入参:
  1. 2D样本的宽度。
      通常是图像的宽度,即以下例子中的 14;
      例如:100张 28*14 像素的图片,
                先将2D像素转长度为392的1D向量,
                再聚合成高宽为 100*392 的2D矩阵;
  2. 损失函数对因变量求导再降维堆叠后的矩阵;
  3. 卷积核降维后的单行矩阵。
      如果带有偏移量,那么该一维数组长度多1。
      例如:3*4卷积核矩阵降维后,
                 如果没有偏移量,则为1*12矩阵,
                 如果有偏移量,则为1*12 + 1 = 13矩阵;
  4. 卷积核窗口的宽度。
  5. 卷积核滑动的纵向与横向步长。
      该参数为长度为2的一维数组;
  6. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;

select 
  sm_sc.fv_d_conv_2d_grp_x_dloss_dindepdt_1
  (
    6,
    array
    [
      [
        1.1, 1.1, 1.1
      , 1.1, 1.1, 1.1
      , 1.1, 1.1, 1.1
      ],
      [
        2.1, 3.1, 0.1
      , 1.1, -1.1, -0.1
      , -1.1, 1.1, -1.1
      ],
      [
        0.1, -2.1, 1.1
      , -1.1, 3.1, 2.1
      , 1.1, -1.1, 1.1
      ]
    ],
    array
    [
      [
        0.5, 1.1, 0.5
      , 1.1, 2.1, 1.1
      , 0.5, 1.1, 0.5
      ]
    ]
    , 3
    , array[2, 2]
    , array[1, 1, 1, 0]
  )

返回:
  array
  [
    [
      0.257, 0.269, 0.257, 0.269, 0.257, 0.134
    , 0.269, 0.244, 0.269, 0.244, 0.269, 0.122
    , 0.257, 0.269, 0.257, 0.269, 0.257, 0.134
    , 0.269, 0.244, 0.269, 0.244, 0.269, 0.122
    , 0.257, 0.269, 0.257, 0.269, 0.257, 0.134
    ],
    [
      0.490, 0.636, 0.723, 0.391, 0.023, 0.012
    , 0.391, 0.289, 0.244, 0.111, 0.000, 0.000
    , 0.257, 0.000, -0.257, -0.147, -0.023, -0.012
    , 0.000, 0.000, 0.000, -0.067, -0.147, -0.067
    , -0.257, 0.000, 0.257, 0.000, -0.257, -0.134
    ],
    [
      0.023, -0.244, -0.490, -0.122, 0.257, 0.134
    , -0.122, 0.000, 0.122, 0.233, 0.391, 0.178
    , -0.257, 0.244, 0.723, 0.636, 0.490, 0.257
    , 0.000, 0.111, 0.244, 0.289, 0.391, 0.178
    , 0.257, 0.000, -0.257, 0.000, 0.257, 0.134
    ]
  ]
sm_sc.
fv_d_conv_2d_grp_x_dloss_dindepdt_2
矩阵x方向卷积的损失函数对第二自变量求导,
也即损失函数对卷积核窗口矩阵求导。
入参:
  1. 由2D转1D后的每行向量再次构成的2D原矩阵;
      例如:100张 28*14 像素的图片,
                先将2D像素转长度为392的1D向量,
                再聚合成高宽为 100*392 的2D矩阵;
  2. 2D样本的宽度。
      通常是图像的宽度,即参数一例子中的 14;
  3. 损失函数对因变量求导再降维堆叠后的矩阵;
  4. 卷积核窗口的宽度。
  5. 卷积核是否附加偏移量。
  6. 卷积核滑动的纵向与横向步长。
      该参数为长度为2的一维数组;
  7. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  8. 补齐填充元素值;

select 
  sm_sc.fv_d_conv_2d_grp_x_dloss_dindepdt_2
  (
    array
    [
      [
        1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0
      , 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0
      , 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0
      , -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0
      , -10.0, -20.0, -30.0, -40.0, -50.0, -60.0, -70.0
      ], 
      [
        1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0
      , -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0
      , 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0
      , 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0
      , -10.0, -20.0, -30.0, -40.0, -50.0, -60.0, -70.0
      ], 
      [
        1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0
      , -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0
      , 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0
      , -10.0, -20.0, -30.0, -40.0, -50.0, -60.0, -70.0
      , 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0
      ]
    ]
    , 7, 
    array
    [
      [
        1.1, 1.1, 1.1
      , 1.1, 1.1, 1.1
      ], 
      [
        2.1, 3.1, 0.1
      , 1.1, -1.1, -0.1
      ], 
      [
        0.1, -2.1, 1.1
      , -1.1, 3.1, 2.1
      ]
    ]
    , array[3, 3]
    , true    -- false
    , array[2, 2]
  )

返回:
  array
  [
    [
      4404.000, 3652.000, 2900.000
    , -430.500, -404.800, -379.100
    , 1926.500, 1548.800, 1171.100
    , 15.000
    ]
  ]
sm_sc.
fv_d_pool_none_dloss_dindepdt
元素保留不变池化的损失函数对自变量求导。
入参:
  1. 自变量矩阵的高宽大小;
  2. 池化窗口高宽大小;
  3. 损失函数对因变量求导矩阵;
  4. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  5. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
select  sm_sc.fv_d_pool_none_dloss_dindepdt
(
    array[4,  5]      
,  array[3,  3]    
,  array
    [
        [1,  2,  3,  4,  5,  6,  7,  8,  9]                                
    ,  [11,  12,  13,  14,  15,  16,  17,  18,  19]                                
    ,  [21,  22,  23,  24,  25,  26,  27,  28,  29]                                              
    ,  [31,  32,  33,  34,  35,  36,  37,  38,  39]                                
    ,  [41,  42,  43,  44,  45,  46,  47,  48,  49]                      
    ,  [51,  52,  53,  54,  55,  56,  57,  58,  59]
    ]  ::  float[]
,  array[1,  1]
,  array[0,  0,  0,  0]
)

返回:  
    array
    [
        [1,  6,  15,  14,  9]
    ,  [42,  92,  150,  108,  58]
    ,  [62,  132,  210,  148,  78]
    ,  [51,  106,  165,  114,  59]
    ]
sm_sc.
fv_d_pool_avg_dloss_dindepdt
平均池化的损失函数对自变量求导。
入参:
  1. 自变量矩阵的高宽大小;
  2. 池化窗口高宽大小;
  3. 损失函数对因变量求导矩阵;
  4. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  5. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
select 
  sm_sc.fv_d_pool_avg_dloss_dindepdt
  (
    array[5, 7]
  , array[3, 3]
  , array
    [
      [1.1, 1.1, 1.1]
    , [1.1, 1.1, 1.1]
    ]
  , array[2, 2]
  )

返回:
  array
  [
    [0.020, 0.020, 0.041, 0.020, 0.041, 0.020, 0.020]
  , [0.020, 0.020, 0.041, 0.020, 0.041, 0.020, 0.020]
  , [0.041, 0.041, 0.081, 0.041, 0.081, 0.041, 0.041]
  , [0.020, 0.020, 0.041, 0.020, 0.041, 0.020, 0.020]
  , [0.020, 0.020, 0.041, 0.020, 0.041, 0.020, 0.020]
  ]
sm_sc.
fv_d_pool_avg_grp_x_dloss_dindepdt
矩阵x方向平均池化的损失函数对自变量求导。
入参:
  1. 由2D转1D后的每行向量再次构成的2D原矩阵;
      例如:100张 2814 像素的图片,
                先将2D像素转长度为392的1D向量,
                再聚合成高宽为 100
392 的2D矩阵;
  2. 2D样本的宽度。
      通常是图像的宽度,即参数一例子中的 14;
  3. 损失函数对因变量求导再降维堆叠后的矩阵;
  4. 池化窗口的宽度。
  5. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  6. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
select 
  sm_sc.fv_d_pool_avg_grp_x_dloss_dindepdt
  (
    5*7, 
    7, 
    array
    [
      [
        1.1, 1.1, 1.1
      , 1.1, 1.1, 1.1
      ], 
      [
        2.1, 3.1, 0.1
      , 1.1, -1.1, -0.1
      ], 
      [
        0.1, -2.1, 1.1
      , -1.1, 3.1, 2.1
      ]
    ], 
    array[3, 3], 
    array[2, 2]
  )

返回:
  array
  [
    [
      0.020, 0.020, 0.041, 0.020, 0.041, 0.020, 0.020
    , 0.020, 0.020, 0.041, 0.020, 0.041, 0.020, 0.020
    , 0.041, 0.041, 0.081, 0.041, 0.081, 0.041, 0.041
    , 0.020, 0.020, 0.041, 0.020, 0.041, 0.020, 0.020
    , 0.020, 0.020, 0.041, 0.020, 0.041, 0.020, 0.020
    ], 
    [
      0.039, 0.039, 0.096, 0.057, 0.059, 0.002, 0.002
    , 0.039, 0.039, 0.096, 0.057, 0.059, 0.002, 0.002
    , 0.059, 0.059, 0.096, 0.037, 0.037, 0.000, 0.000
    , 0.020, 0.020, 0.000, -0.020, -0.022, -0.002, -0.002
    , 0.020, 0.020, 0.000, -0.020, -0.022, -0.002, -0.002
    ], 
    [
      0.002, 0.002, -0.037, -0.039, -0.019, 0.020, 0.020
    , 0.002, 0.002, -0.037, -0.039, -0.019, 0.020, 0.020
    , -0.019, -0.019, 0.000, 0.019, 0.078, 0.059, 0.059
    , -0.020, -0.020, 0.037, 0.057, 0.096, 0.039, 0.039
    , -0.020, -0.020, 0.037, 0.057, 0.096, 0.039, 0.039
    ]
  ]
sm_sc.
fv_d_pool_max_dloss_dindepdt
最大池化的损失函数对自变量求导。
入参:
  1. 自变量矩阵;
  2. 池化窗口高宽大小;
  3. 损失函数对因变量求导矩阵;
  4. 因变量矩阵;
  5. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  6. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  7. 补齐填充元素值;
select 
  sm_sc.fv_d_pool_max_dloss_dindepdt
  (
    array
    [
      [1, 2, 3, 4, 5, 6]             , 
      [10, 20, 30, 40, 50, 60]       , 
      [100, 200, 300, 400, 500, 600] , 
      [-1, -2, -3, -4, -5, -6]       , 
      [-10, -20, -30, -40, -50, -60]
    ], 
    array[3, 3]       , 
    array
    [
      [1.1, 1.1, 1.1], 
      [1.1, 1.1, 1.1], 
      [1.1, 1.1, 1.1]
    ], 
    null              , 
    array[2, 2]       , 
    array[1, 1, 1, 0] , 
    0
  )
  
返回:
  array
  [[0.122, 0.000, 0.122, 0.000, 0.122, 0.000]
  , [0.122, 0.000, 0.122, 0.000, 0.122, 0.000]
  , [0.000, 0.000, 0.000, 0.000, 0.000, 0.000]
  , [0.000, 0.000, 0.000, 0.000, 0.000, 0.000]
  , [0.000, 0.000, 0.000, 0.000, 0.000, 0.000]]
sm_sc.
fv_d_pool_max_grp_x_dloss_dindepdt
矩阵x方向最大池化的损失函数对自变量求导。
入参:
  1. 由2D转1D后的每行向量再次构成的2D原矩阵;
      例如:100张 2814 像素的图片,
                先将2D像素转长度为392的1D向量,
                再聚合成高宽为 100392 的2D矩阵;
  2. 2D样本的宽度。
      通常是图像的宽度,即参数一例子中的 14;
  3. 损失函数对因变量求导再降维堆叠后的矩阵;
  4. 池化窗口的宽度;
  5. 因变量降维堆叠后的矩阵;
  6. 滑动窗口纵向和横向步长。
      该参数为长度为2的一维数组;
  7. 上下左右补齐行数/列数。
      该参数为长度为4的一维数组;
  8. 补齐填充元素值;
select sm_sc.fv_d_pool_max_grp_x_dloss_dindepdt
  (
    array
    [
      [
        1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0
      , 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0
      , 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0
      , -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0
      , -10.0, -20.0, -30.0, -40.0, -50.0, -60.0, -70.0
      ], 
      [
        1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0
      , -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0
      , 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0
      , 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0
      , -10.0, -20.0, -30.0, -40.0, -50.0, -60.0, -70.0
      ], 
      [
        1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0
      , -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0
      , 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0
      , -10.0, -20.0, -30.0, -40.0, -50.0, -60.0, -70.0
      , 100.0, 200.0, 300.0, 400.0, 500.0, 600.0, 700.0
      ]
    ], 
    7, 
    array
    [
      [
        1.1, 1.1, 1.1
      , 1.1, 1.1, 1.1
      ], 
      [
        2.1, 3.1, 0.1
      , 1.1, -1.1, -0.1
      ], 
      [
        0.1, -2.1, 1.1
      , -1.1, 3.1, 2.1
      ]
    ]
    , array[3, 3]
    , null
    , array[2, 2]
  );
  
返回:
  array
  [
    [
      0, 0, 0, 0, 0, 0, 0
    , 0, 0, 0, 0, 0, 0, 0
    , 0, 0, 0.367, 0, 0.367, 0, 0.367
    , 0, 0, 0, 0, 0, 0, 0
    , 0, 0, 0, 0, 0, 0, 0]
  , [
      0, 0, 0, 0, 0, 0, 0
    , 0, 0, 0, 0, 0, 0, 0
    , 0, 0, 0.350, 0, 0.517, 0, 0.017
    , 0, 0, 0.183, 0, -0.183, 0, -0.017
    , 0, 0, 0, 0, 0, 0, 0]
  , [
      0, 0, 0, 0, 0, 0, 0
    , 0, 0, 0, 0, 0, 0, 0
    , 0, 0, 0.017, 0, -0.350, 0, 0.183
    , 0, 0, 0, 0, 0, 0, 0
    , 0, 0, -0.183, 0, 0.517, 0, 0.350
    ]
  ]
sm_sc.
fv_d_conv_add_dloss_dindepdt_1
卷加求导,损失函数对第一自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 第二自变量矩阵高宽规格;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_add_dloss_dindepdt_1
(           
  array[4, 5]                   ,               
  array[3, 3]                   ,              
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]                
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]              
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]              
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]              
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]           
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[], 
  array[1, 1]                           
);

返回:
  array
  [[1, 6, 15, 14, 9]
  , [42, 92, 150, 108, 58]
  , [62, 132, 210, 148, 78]
  , [51, 106, 165, 114, 59]]
sm_sc.
fv_d_conv_add_dloss_dindepdt_2
卷加求导,损失函数对第二自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 第二自变量矩阵高宽规格;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_add_dloss_dindepdt_2
(               
  array[4, 5]                   ,                
  array[3, 3]                   ,          
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]                
  ,[11, 12, 13, 14, 15, 16, 17, 18, 19]             
  ,[21, 22, 23, 24, 25, 26, 27, 28, 29]             
  ,[31, 32, 33, 34, 35, 36, 37, 38, 39]             
  ,[41, 42, 43, 44, 45, 46, 47, 48, 49]           
  ,[51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[]
);

返回:
  array[[114,120,126],[174,180,186],[234,240,246]]
sm_sc.
fv_d_conv_sub_dloss_dindepdt_1
卷减求导,损失函数对第一自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 第二自变量矩阵高宽规格;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_sub_dloss_dindepdt_1
(          
  array[4, 5]                   ,              
  array[3, 3]                   ,        
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]                
  ,[11, 12, 13, 14, 15, 16, 17, 18, 19]             
  ,[21, 22, 23, 24, 25, 26, 27, 28, 29]             
  ,[31, 32, 33, 34, 35, 36, 37, 38, 39]             
  ,[41, 42, 43, 44, 45, 46, 47, 48, 49]           
  ,[51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[]
)

返回:
  array
  [[1, 6, 15, 14, 9]
  ,[42, 92, 150, 108, 58]
  ,[62, 132, 210, 148, 78]
  ,[51, 106, 165, 114, 59]]
sm_sc.
fv_d_conv_sub_dloss_dindepdt_2
卷减求导,损失函数对第二自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 第二自变量矩阵高宽规格;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_sub_dloss_dindepdt_2
(        
  array[4, 5]                   ,               
  array[3, 3]                   ,             
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]                
  ,[11, 12, 13, 14, 15, 16, 17, 18, 19]             
  ,[21, 22, 23, 24, 25, 26, 27, 28, 29]             
  ,[31, 32, 33, 34, 35, 36, 37, 38, 39]             
  ,[41, 42, 43, 44, 45, 46, 47, 48, 49]           
  ,[51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[],
  array[1, 1]        ,                              
  array[0, 0, 0, 0]                               
);

返回:
  array
  [[-114, -120, -126]
  ,[-174, -180, -186]
  ,[-234, -240, -246]]
sm_sc.
fv_d_conv_mul_dloss_dindepdt_1
卷乘求导,损失函数对第一自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 第二自变量矩阵,即窗口矩阵;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_mul_dloss_dindepdt_1
(
  array[4, 5]                   ,
  array[[1,4,7],[2,5,8],[3,6,9]] :: float[],
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]                
  ,[11, 12, 13, 14, 15, 16, 17, 18, 19]                
  ,[21, 22, 23, 24, 25, 26, 27, 28, 29]                       
  ,[31, 32, 33, 34, 35, 36, 37, 38, 39]                
  ,[41, 42, 43, 44, 45, 46, 47, 48, 49]           
  ,[51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[]
);

返回:
  array
  [[1, 12, 48, 74, 63]           
  ,[53, 250, 621, 622, 425]           
  ,[145, 502, 1101, 1010, 653]           
  ,[153, 474, 978, 852, 531]]
sm_sc.
fv_d_conv_mul_dloss_dindepdt_2
卷乘求导,损失函数对第二自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵,即背景矩阵;
  2. 第二自变量矩阵高宽规格;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
  6. 补齐填充元素值;
select sm_sc.fv_d_conv_mul_dloss_dindepdt_2
(
  array[[1,2,3,4,5],[3,4,5,6,7],[2,4,6,8,5],[7,5,3,4,8]] :: float[],
  array[3, 3]                   ,
  array
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]                
  ,[11, 12, 13, 14, 15, 16, 17, 18, 19]
  ,[21, 22, 23, 24, 25, 26, 27, 28, 29]
  ,[31, 32, 33, 34, 35, 36, 37, 38, 39]
  ,[41, 42, 43, 44, 45, 46, 47, 48, 49]
  ,[51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[],
  array[1, 1]        ,
  array[0, 0, 0, 0]  ,
  0.0  :: float
);

返回:
  array[[444,582,732],[714,1053,1165],[1098,1119,1346]]
sm_sc.
fv_d_conv_div_dloss_dindepdt_1
卷除求导,损失函数对第一自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 第二自变量矩阵,即窗口矩阵;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_div_dloss_dindepdt_1
(
  array[4, 5]                   , 
  array[[1,4,7],[2,5,8],[3,6,9]] :: float[],  
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]                
  ,[11, 12, 13, 14, 15, 16, 17, 18, 19]                
  ,[21, 22, 23, 24, 25, 26, 27, 28, 29]                       
  ,[31, 32, 33, 34, 35, 36, 37, 38, 39]                
  ,[41, 42, 43, 44, 45, 46, 47, 48, 49]           
  ,[51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[]
)

返回:
  array
  [[1.000, 4.500, 8.679, 2.857, 1.286]
  ,[36.500, 51.400, 63.589, 20.243, 7.946]
  ,[27.500, 42.067, 53.597, 22.906, 9.347]
  ,[17.000, 26.667, 34.056, 15.889, 6.556]]
sm_sc.
fv_d_conv_div_dloss_dindepdt_2
卷除求导,损失函数对第二自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵,即背景矩阵;
  2. 第二自变量矩阵,即窗口矩阵;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
  6. 补齐填充元素值;
select sm_sc.fv_d_conv_div_dloss_dindepdt_2
(
  array[[1,2,3,4,5],[3,4,5,6,7],[2,4,6,8,5],[7,5,3,4,8]] :: float[],
  array[[1,4,7],[2,5,8],[3,6,9]] :: float[],
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]                
  ,[11, 12, 13, 14, 15, 16, 17, 18, 19]                
  ,[21, 22, 23, 24, 25, 26, 27, 28, 29]                       
  ,[31, 32, 33, 34, 35, 36, 37, 38, 39]                
  ,[41, 42, 43, 44, 45, 46, 47, 48, 49]           
  ,[51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[],
  array[1, 1]
)

返回:
  array
  [[-9.827, -24.044, -29.290]                
  ,[-34.166, -32.375, -41.803]                
  ,[-51.102, -85.938, -112.643]]
sm_sc.
fv_d_conv_pow_dloss_dindepdt_1
卷幂求导,损失函数对第一自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵,即背景矩阵;
  2. 第二自变量矩阵,即窗口矩阵;
  3. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销;
  4. 因变量矩阵高宽规格;
  5. 损失函数对因变量的导数矩阵;
  6. 滑动窗口纵向和横向步长;
  7. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_pow_dloss_dindepdt_1
(
  array
  [
    [1, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]] :: float[], 
  array[[1, 4, 7], [2, 5, 8], [3, 6, 9]] :: float[], 
  sm_sc.fv_conv_pow
  (
    array
    [
      [1, 2, 3, 4, 5]
    , [3, 4, 5, 6, 7]
    , [2, 4, 6, 8, 5]
    , [7, 5, 3, 4, 8]] :: float[], 
    array[[1, 4, 7], [2, 5, 8], [3, 6, 9]] :: float[]
  ), 
  array[6, 9], 
  array              
  [
    [1, 2, 3, 4, 5, 6, 7, 8, 9]                
  , [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]                
  , [2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9]                       
  , [3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9]                
  , [4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9]           
  , [5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9]] :: float[]


返回:
  array 
  [
    [1.000, 68.000, 15856.000, 174080.000, 984375.000]
  , [9.700, 2369.800, 1179895.700, 4773859.200, 15729671.300]
  , [41.600, 19043.200, 44543997.600, 470410854.400, 13257812.500]
  , [749.700, 97905.000, 321132.600, 3338649.600, 890870169.600]
  ]
sm_sc.
fv_d_conv_pow_dloss_dindepdt_2
卷幂求导,损失函数对第二自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵,即背景矩阵;
  2. 第二自变量矩阵,即窗口矩阵;
  3. 第二自变量矩阵高宽规格;
  4. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销。
      如传递该入参,可以不传第二个参数的窗口矩阵;
  5. 因变量矩阵高宽规格;
  6. 损失函数对因变量的导数矩阵;
  7. 滑动窗口纵向和横向步长;
  8. 上下左右补齐行数/列数;
  9. 补齐填充元素值;
select sm_sc.fv_d_conv_pow_dloss_dindepdt_2
(
  array
  [
    [1, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]
  ] :: float[], 
  null, -- array[[1, 4, 7], [2, 5, 8], [3, 6, 9]] :: float[], 
  array[3, 3]                   , 
  sm_sc.fv_conv_pow
  (
    array
    [
      [1, 2, 3, 4, 5]
    , [3, 4, 5, 6, 7]
    , [2, 4, 6, 8, 5]
    , [7, 5, 3, 4, 8]
    ] :: float[], 
    array[[1, 4, 7], [2, 5, 8], [3, 6, 9]] :: float[], 
    array[1, 1]        , 
    array[0, 0, 0, 0]  , 
    0.0  :: float
  ), 
  array[6, 9]                   , 
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]                
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]                       
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]                
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]           
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[], 
  array[1, 1]        , 
  array[0, 0, 0, 0]  , 
  0.0  :: float
)

返回:
  array
  [
    [617.069, 138109.798, 85980348.256]
  , [5224.588, 4300539.139, 2034488125.210]
  , [59289.615, 19159053.803, 24251286231.684]
  ]
sm_sc.
fv_d_conv_log_dloss_dindepdt_1
卷对数求导,损失函数对第一自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵,即背景矩阵;
  2. 第一自变量矩阵高宽规格;
  3. 第二自变量矩阵,即窗口矩阵;
  4. 第二自变量矩阵高宽规格;
  5. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销;
  6. 损失函数对因变量的导数矩阵;
  7. 滑动窗口纵向和横向步长;
  8. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_log_dloss_dindepdt_1
(
  array
  [
    [1.2, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]
  ] :: float[], 
  array[4, 5]                   , 
  array[[1.3, 4, 7], [2, 5, 8], [3, 6, 9]] :: float[], 
  array[3, 3]                   , 
  sm_sc.fv_conv_log
  (
    array
    [
      [1.2, 2, 3, 4, 5]
    , [3, 4, 5, 6, 7]
    , [2, 4, 6, 8, 5]
    , [7, 5, 3, 4, 8]
    ] :: float[], 
    array[[1.3, 4, 7], [2, 5, 8], [3, 6, 9]] :: float[], 
    array[1, 1]        , 
    array[0, 0, 0, 0]  , 
    0.5  :: float
  ), 
  array              
  [
    [1.2, 2, 3, 4, 5, 6, 7, 8, 9]                
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]                
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]                       
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]                
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]           
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[], 
  array[1, 1]        , 
  array[0, 0, 0, 0]  -- , 
  -- 0.5  :: float
)

返回:
  array
  [
    [7.893, 3.978, 4.034, 2.962, 1.352]
  , [4.352, 10.706, 14.315, 9.603, 4.354]
  , [53.585, 21.318, 16.582, 8.100, 12.787]
  , [2.114, 11.774, 76.673, 29.525, 3.748]
  ]
sm_sc.
fv_d_conv_log_dloss_dindepdt_2
卷对数求导,损失函数对第二自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵,即背景矩阵;
  2. 第二自变量矩阵,即窗口矩阵;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
  6. 补齐填充元素值;
select sm_sc.fv_d_conv_log_dloss_dindepdt_2
(
  array
  [
    [1.2, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]
  ] :: float[], 
  array[[1.3, 4, 7], [2, 5, 8], [3, 6, 9]] :: float[], 
  array              
  [
    [1.2, 2, 3, 4, 5, 6, 7, 8, 9]                
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]                
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]                       
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]                
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]           
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[], 
  array[1, 1]        , 
  array[0, 0, 0, 0]  , 
  0.5  :: float
)

返回:
  array
  [
    [72.659, 19.811, 10.470]
  , [73.898, 21.303, 12.917]
  , [58.107, 27.916, 17.819]
  ]
sm_sc.
fv_d_conv_de_sub_dloss_dindepdt_1
反卷减求导,损失函数对第一自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 第二自变量矩阵高宽规格;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_de_sub_dloss_dindepdt_1
(
  array[3, 3]                   , 
  array[4, 5]                   , 
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[], 
  array[1, 1]        , 
  array[0, 0, 0, 0]
)

返回:
  array
  [
    [114, 120, 126]
  , [174, 180, 186]
  , [234, 240, 246]
  ]
sm_sc.
fv_d_conv_de_sub_dloss_dindepdt_2
反卷减求导,损失函数对第二自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 第二自变量矩阵高宽规格;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_de_sub_dloss_dindepdt_2
(
  array[3, 3]                   , 
  array[4, 5]                   , 
  array
  [
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]
  ] :: float[]
)

返回:
  array
  [
    [-1, -6, -15, -14, -9]
  , [-42, -92, -150, -108, -58]
  , [-62, -132, -210, -148, -78]
  , [-51, -106, -165, -114, -59]
  ]
sm_sc.
fv_d_conv_de_div_dloss_dindepdt_1
反卷除求导,损失函数对第一自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 第二自变量矩阵,即背景矩阵;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_de_div_dloss_dindepdt_1
(
  array[3, 3], 
  array
  [
    [1, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]
  ] :: float[], 
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]                
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]                
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]                       
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]                
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]           
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[], 
  array[1, 1]        , 
  array[1, -1, -1, 1], 
  2.0  :: float
)

返回:
  array
  [
    [42.083, 34.517, 43.950]
  , [41.300, 34.107, 54.188]
  , [43.425, 39.708, 69.373]
  ]
sm_sc.
fv_d_conv_de_div_dloss_dindepdt_2
反卷除求导,损失函数对第二自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵,即窗口矩阵;
  2. 第二自变量矩阵,即背景矩阵;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
  6. 补齐填充元素值;
select sm_sc.fv_d_conv_de_div_dloss_dindepdt_2
(
  array[[1, 4, 7], [2, 5, 8], [3, 6, 9]] :: float[], 
  array
  [
    [1, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]
  ] :: float[], 
  array              
  [[1, 2, 3, 4, 5, 6, 7, 8, 9]                
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]                
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]                       
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]                
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]           
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[]
)

返回:
  array
  [
    [-1.000, -8.250, -22.121, -2.490, -0.918]
  , [-101.250, -159.920, -224.570, -24.478, -7.650]
  , [-25.167, -63.831, -109.202, -29.900, -5.618]
  , [-39.667, -37.222, -25.546, -9.210, -5.827]
  ]
sm_sc.
fv_d_conv_de_pow_dloss_dindepdt_1
反卷幂求导,损失函数对第一自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵,即窗口矩阵;
  2. 第二自变量矩阵,即背景矩阵;
  3. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销;
  4. 因变量矩阵高宽规格;
  5. 损失函数对因变量的导数矩阵;
  6. 滑动窗口纵向和横向步长;
  7. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_de_pow_dloss_dindepdt_1
(
  array[[1.2, 4, 7], [2, 5, 8], [3, 6, 9]] :: float[], 
  array
  [
    [1, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]
  ] :: float[], 
  sm_sc.fv_conv_de_pow
  (
    array[[1.2, 4, 7], [2, 5, 8], [3, 6, 9]] :: float[], 
    array
    [
      [1, 2, 3, 4, 5]
    , [3, 4, 5, 6, 7]
    , [2, 4, 6, 8, 5]
    , [7, 5, 3, 4, 8]
    ] :: float[], 
    array[1, 1]
  ), 
  array[6, 9]                   , 
  array
  [[1.2, 2, 3, 4, 5, 6, 7, 8, 9]
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]] :: float[], 
  array[1, 1]
)

返回:
  array
  [
    [793.584, 288768.000, 36261372.000]
  , [12536.000, 31255125.000, 819486720.000]
  , [325746.000, 64284084.000, 3261695202.000]
  ]
sm_sc.
fv_d_conv_de_pow_dloss_dindepdt_2
反卷幂求导,损失函数对第二自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵,即窗口矩阵;
  2. 第二自变量矩阵,即背景矩阵;
  3. 第二自变量矩阵高宽规格;
  4. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销。
      如传递该入参,可以不传第二个参数 - 窗口矩阵;
  5. 因变量矩阵高宽规格;
  6. 损失函数对因变量的导数矩阵;
  7. 滑动窗口纵向和横向步长;
  8. 上下左右补齐行数/列数;
  9. 补齐填充元素值;
select sm_sc.fv_d_conv_de_pow_dloss_dindepdt_2
(
  array
  [
    [1.3, 4, 7]
  , [2, 5, 8]
  , [3, 6, 9]
  ] :: float[], 
  array
  [
    [1.2, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]] :: float[], 
  array[4, 5], 
  sm_sc.fv_conv_de_pow
  (
    array
    [
      [1.3, 4, 7]
    , [2, 5, 8]
    , [3, 6, 9]
    ] :: float[], 
    array
    [
      [1.2, 2, 3, 4, 5]
    , [3, 4, 5, 6, 7]
    , [2, 4, 6, 8, 5]
    , [7, 5, 3, 4, 8]
    ] :: float[], 
    array[1, 1]        , 
    array[0, 0, 0, 0]  , 
    0.5 :: float
  ), 
  array[6, 9]                   , 
  array
  [
    [1.2, 2, 3, 4, 5, 6, 7, 8, 9]
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]
  ] :: float[], 
  array[1, 1]        , 
  array[0, 0, 0, 0]  , 
  0.5 :: float
)

返回:
  array
  [
    [0.431, 46.135, 2449.991, 30871.912, 294344.207]
  , [78.866, 23608.050, 2090611.225, 17631876.126, 145356281.366]
  , [321.314, 95958.069, 53542107.772, 4178421244.111, 7101391.389]
  , [122535.919, 738917.515, 107871.033, 941978.441, 5580415487.941]
  ]
sm_sc.
fv_d_conv_de_log_dloss_dindepdt_1
反卷对数求导,损失函数对第一自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵,即窗口矩阵;
  2. 第二自变量矩阵,即背景矩阵;
  3. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销;
  4. 损失函数对因变量的导数矩阵;
  5. 滑动窗口纵向和横向步长;
  6. 上下左右补齐行数/列数;
  7. 补齐填充元素值;
select  
    sm_sc.fv_d_conv_de_log_dloss_dindepdt_1
    (
        array
        [
            [1.3,  4,  7]
        ,  [2,  5,  8]
        ,  [3,  6,  9]
        ]  ::  float[]
    ,  array
        [
            [1.2,  2,  3,  4,  5]
        ,  [3,  4,  5,  6,  7]
        ,  [2,  4,  6,  8,  5]
        ,  [7,  5,  3,  4,  8]
        ]  ::  float[]
    ,  sm_sc.fv_conv_de_log
        (
            array
            [
                [1.3,  4,  7]
            ,  [2,  5,  8]
            ,  [3,  6,  9]
            ]  ::  float[],  
            array
            [
                [1.2,  2,  3,  4,  5]
            ,  [3,  4,  5,  6,  7]
            ,  [2,  4,  6,  8,  5]
            ,  [7,  5,  3,  4,  8]
            ]  ::  float[],  
            array[1,  1]                ,  
            array[0,  0,  0,  0]    ,  
            0.5  ::  float
        )
    ,  array                            
        [
            [1.2,  2,  3,  4,  5,  6,  7,  8,  9]                                
        ,  [11,  12,  13,  14,  15,  16,  17,  18,  19]                                
        ,  [21,  22,  23,  24,  25,  26,  27,  28,  29]                                              
        ,  [31,  32,  33,  34,  35,  36,  37,  38,  39]                                
        ,  [41,  42,  43,  44,  45,  46,  47,  48,  49]                      
        ,  [51,  52,  53,  54,  55,  56,  57,  58,  59]
        ]  ::  float[]
    ,  array[1,  1]              
    ,  array[0,  0,  0,  0]  
    ,  0.5  ::  float
    )
    
返回:  
    array
    [
        [-1692.138,  -24.293,  -8.285]
    ,  [-241.940,  -24.066,  -9.775]
    ,  [-95.275,  -18.587,  -9.217]
    ]
sm_sc.
fv_d_conv_de_log_dloss_dindepdt_2
反卷对数求导,损失函数对第二自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵,即窗口矩阵;
  2. 第二自变量矩阵,即背景矩阵;
  3. 损失函数对因变量的导数矩阵;
  4. 滑动窗口纵向和横向步长;
  5. 上下左右补齐行数/列数;
  6. 补齐填充元素值;
select sm_sc.fv_d_conv_de_log_dloss_dindepdt_2
(
  array
  [
    [1.3, 4, 7]
  , [2, 5, 8]
  , [3, 6, 9]
  ] :: float[], 
  array
  [
    [1.2, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]
  ] :: float[], 
  array              
  [
    [1.2, 2, 3, 4, 5, 6, 7, 8, 9]
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]
  ] :: float[], 
  array[1, 1]        , 
  array[0, 0, 0, 0]  , 
  0.5  :: float
)

返回:
  array
  [
    [5.063, 5.160, 6.429, 2.061, 0.799[
  , [26.712, 31.417, 34.205, 11.298, 4.084]
  , [39.674, 30.345, 29.913, 11.015, 5.808]
  , [8.736, 16.569, 30.999, 11.461, 3.153]
  ]
sm_sc.
fv_d_conv_prod_mx_dloss_dindepdt_1
卷矩阵乘法求导,损失函数对第一自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 背景矩阵滑动窗口高宽规格的高。
      该窗口规格区别于第二自变量高宽规格,两者为矩阵乘法规格关系;
  3. 第二自变量矩阵,即窗口矩阵;
  4. 损失函数对因变量的导数矩阵;
  5. 滑动窗口纵向和横向步长;
  6. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_prod_mx_dloss_dindepdt_1
(
  array[4, 5], 
  3, 
  array[[1, 4, 7, 6], [2, 5, 8, 7], [3, 6, 9, 8]] :: float[], 
  array
  [
    [1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -2, -3]
  , [11, 12, 13, 14, 15, 16, 17, 18, 19, -11, -12, -13]
  , [21, 22, 23, 24, 25, 26, 27, 28, 29, -21, -22, -23]
  , [31, 32, 33, 34, 35, 36, 37, 38, 39, -31, -32, -33]
  , [41, 42, 43, 44, 45, 46, 47, 48, 49, -41, -42, -43]
  , [51, 52, 53, 54, 55, 56, 57, 58, 59, -51, -52, -53]
  ] :: float[], 
  array[1, 1], 
  array[0, 0, 0, 0]
)

返回:
  array
  [
    [54, 190, 199, 154, -21]
  , [828, 1980, 1678, 628, -842]
  , [1188, 2780, 2318, 788, -1242]
  , [954, 2190, 1799, 554, -1021]
  ]
sm_sc.
fv_d_conv_prod_mx_dloss_dindepdt_2
卷矩阵乘法求导,损失函数对第二自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵,即背景矩阵;
  2. 背景矩阵滑动窗口高宽规格的高。
      该窗口规格区别于第二自变量高宽规格,两者为矩阵相乘关系;
  3. 第二自变量矩阵高宽规格;
  4. 损失函数对因变量的导数矩阵;
  5. 滑动窗口纵向和横向步长;
  6. 上下左右补齐行数/列数;
  7. 补齐填充元素值;
select sm_sc.fv_d_conv_prod_mx_dloss_dindepdt_2
(
  array
  [
    [1, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]
  ] :: float[], 
  3, 
  array[3, 4], 
  array
  [
    [1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -2, -3]
  , [11, 12, 13, 14, 15, 16, 17, 18, 19, -11, -12, -13]
  , [21, 22, 23, 24, 25, 26, 27, 28, 29, -21, -22, -23]
  , [31, 32, 33, 34, 35, 36, 37, 38, 39, -31, -32, -33]
  , [41, 42, 43, 44, 45, 46, 47, 48, 49, -41, -42, -43]
  , [51, 52, 53, 54, 55, 56, 57, 58, 59, -51, -52, -53]
  ] :: float[]
)

返回:
  array
  [
    [1758, 1992, 1743]
  , [2478, 2932, 2653]
  , [3198, 3872, 3563]
  ]
sm_sc.
fv_d_conv_de_prod_mx_dloss_dindepdt_1
反卷矩阵乘法求导,损失函数对第一自变量求导,即对窗口矩阵求导。
入参:
  1. 第一自变量矩阵高宽规格;
  2. 第二自变量矩阵,即背景矩阵;
  3. 背景矩阵滑动窗口高宽规格的宽。
      该窗口规格区别于第一自变量高宽规格,两者为矩阵相乘关系;
  4. 损失函数对因变量的导数矩阵;
  5. 滑动窗口纵向和横向步长;
  6. 上下左右补齐行数/列数;
  7. 补齐填充元素值;
select sm_sc.fv_d_conv_de_prod_mx_dloss_dindepdt_1
(
  array[4, 3], 
  array
  [
    [1, 2, 3, 4, 5]
  , [3, 4, 5, 6, 7]
  , [2, 4, 6, 8, 5]
  , [7, 5, 3, 4, 8]
  ] :: float[], 
  3, 
  array
  [
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]
  , [61, 62, 63, 64, 65, 66, 67, 68, 69]
  , [71, 72, 73, 74, 75, 76, 77, 78, 79]
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]
  ] :: float[]
)

返回:
  array
  [
    [2208, 2482, 2163]
  , [3378, 3912, 3493]
  , [4098, 4852, 4403]
  , [3468, 4322, 4053]
  ]
sm_sc.
fv_d_conv_de_prod_mx_dloss_dindepdt_2
反卷矩阵乘法求导,损失函数对第二自变量求导,即对背景矩阵求导。
入参:
  1. 第一自变量矩阵,即窗口矩阵;
  2. 第二自变量矩阵高宽规格;
  3. 背景矩阵滑动窗口高宽规格的宽。
      该窗口规格区别于第一自变量高宽规格,两者为矩阵相乘关系;
  4. 损失函数对因变量的导数矩阵;
  5. 滑动窗口纵向和横向步长;
  6. 上下左右补齐行数/列数;
select sm_sc.fv_d_conv_de_prod_mx_dloss_dindepdt_2
(  
  array
  [
    [1, 4, 7]
  , [6, 2, 5]
  , [8, 7, 3]
  , [6, 9, 8]] :: float[], 
  array[4, 5], 
  3, 
  array
  [
    [1, 2, 3, 4, 5, 6, 7, 8, 9]
  , [11, 12, 13, 14, 15, 16, 17, 18, 19]
  , [21, 22, 23, 24, 25, 26, 27, 28, 29]
  , [31, 32, 33, 34, 35, 36, 37, 38, 39]
  , [41, 42, 43, 44, 45, 46, 47, 48, 49]
  , [61, 62, 63, 64, 65, 66, 67, 68, 69]
  , [71, 72, 73, 74, 75, 76, 77, 78, 79]
  , [51, 52, 53, 54, 55, 56, 57, 58, 59]
  ] :: float[]
)

返回:
  array
  [
    [30, 91, 197, 236, 256]
  , [540, 1182, 2114, 2632, 2152]
  , [780, 1682, 2974, 3712, 2972]
  , [750, 1591, 2777, 3476, 2716]
  ]
sm_sc.fv_d_mx_sum 聚合函数求和的求导。
入参:
  1. 自变量高宽规格;
select 
  sm_sc.fv_d_mx_sum(array[2, 3])
  
返回:
  array[[1, 1, 1], [1, 1, 1]]
sm_sc.fv_d_mx_avg 聚合函数求平均的求导。
入参:
  1. 参与聚合的自变量矩阵数量;
  2. 自变量高宽规格;
select 
  sm_sc.fv_d_mx_avg(3, array[2, 3])

返回:
  array[[0.333, 0.333, 0.333], [0.333, 0.333, 0.333]]
sm_sc.fv_d_mx_max 聚合函数最大值的求导。
入参:
  1. 自变量矩阵;
  2. 因变量矩阵;
select 
  sm_sc.fv_d_mx_max
  (
    array[[1.2, -2.3, 3.3], [1.4, 2.3, 3.8]], 
    array[[-1.2, -2.3, -3.3], [1.3, 2.2, 3.8]]
  )

返回:
  array[[0.000, 1.000, 0.000], [0.000, 0.000, 1.000]]
sm_sc.fv_d_mx_min 聚合函数最小值的求导。
入参:
  1. 自变量矩阵;
  2. 因变量矩阵;
select 
  sm_sc.fv_d_mx_min
  (
    array[[1.2, -2.3, 3.3], [1.4, -2.3, 3.8]], 
    array[[1.3, -2.3, 3.8], [1.5, 2.3, 3.9]]
  )

返回:
  array[[0.000, 1.000, 0.000], [0.000, 0.000, 0.000]]
sm_sc.fv_d_mx_prod 聚合函数累乘的求导。
入参:
  1. 自变量矩阵;
  2. 因变量矩阵;
select 
  sm_sc.fv_d_mx_prod
  (
    array[[1.2, -2.3, 3.3], [1.4, -2.3, 3.8]], 
    array[[1.3, -2.3, 3.8], [1.5, 2.3, 3.9]]
  )

返回:
  array[[1.083, 1.000, 1.152], [1.071, -1.000, 1.026]]
sm_sc.fv_d_add 矩阵点加求导。
入参:
  1. 自变量高宽规格;
select 
  sm_sc.fv_d_add(array[2, 3])
  
返回:
  array[[1,1,1],[1,1,1]]
sm_sc.fv_d_sub_1 矩阵点减对第一入参求导。
入参:
  1. 自变量高宽规格;
select 
  sm_sc.fv_d_sub_1(array[2, 3])
  
返回:
  array[[1,1,1],[1,1,1]]
sm_sc.fv_d_sub_2 矩阵点减对第二入参求导。
入参:
  1. 自变量高宽规格;
select 
  sm_sc.fv_d_sub_2(array[2, 3])
  
返回:
  array[[-1,-1,-1],[-1,-1,-1]]
sm_sc.fv_d_mul 矩阵点乘求导。
入参:
  1. 另一个自变量矩阵;
select 
  sm_sc.fv_d_mul(array[[2.8, 3.6], [2.8, 3.6]])
  
返回:
  array[[2.8, 3.6], [2.8, 3.6]]
sm_sc.
fv_d_div_1
矩阵点除对第一入参求导。
入参:
  1. 另一个自变量矩阵;
select 
  sm_sc.fv_d_div_1(array[[2.8, 3.6], [2.4, -1.6]])
  
返回:
  array[[0.357, 0.278], [0.417, -0.625]]
sm_sc.fv_d_div_2
sm_sc.
fv_d_div_2_un_de_broadcast
矩阵点除对第二入参求导,后者不对广播逆运算。
入参:
  1. 自变量矩阵,即第二入参;
  2. 另一个自变量矩阵,即第一入参;
select 
  sm_sc.fv_d_div_2
  (
    array[[2.8, 3.6], [2.4, -1.6]]
  , array[[1.8, -4.6], [1.4, 3.6]]
  )
  
返回:
  array[[-0.230, 0.355], [-0.243, -1.406]]
sm_sc.fv_d_pow_1
sm_sc.
fv_d_pow_1_un_de_broadcast
矩阵点幂对第一入参求导,后者不对广播逆运算。
入参:
  1. 自变量矩阵,即第一入参;
  2. 另一个自变量矩阵,即第二入参;
  3. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销;
select 
  sm_sc.fv_d_pow_1
  (
    array[[2.8, 3.6], [2.4, 1.6]], 
    array[[1.8, -4.6], [1.4, 3.6]],
    array[[2.8, 3.6], [2.4, 1.6]] ^` array[[1.8, -4.6], [1.4, 3.6]]
  )

返回:
  array[[4.102, -0.004], [1.987, 12.218]]
sm_sc.fv_d_pow_2
sm_sc.
fv_d_pow_2_un_de_broadcast
矩阵点幂对第二入参求导,后者不对广播逆运算。
入参:
  1. 自变量矩阵,即第二入参;
  2. 另一个自变量矩阵,即第一入参;
  3. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销;
select 
  sm_sc.fv_d_pow_2
  (
    array[[1.8, -4.6], [1.4, 3.6]], 
    array[[2.8, 3.6], [2.4, 1.6]]
  )

返回:
  array[[6.570, 0.004], [2.982, 2.552]]
sm_sc.fv_d_exp 矩阵点自然常数幂求导。
入参:
  1. 自变量矩阵;
  2. 因变量矩阵;
      非必传入参,尽量传该入参,可节省开销。
      如果因变量不为空,可不传自变量矩阵;
select 
  sm_sc.fv_d_exp
  (
    null,
    ^` array[[1.8, -4.6], [1.4, 3.6]]
  )

返回:
  array[[6.050, 0.010], [4.055, 36.598]]
sm_sc.fv_d_log_1
sm_sc.
fv_d_log_1_un_de_broadcast
矩阵点对数对第一入参求导,后者不对广播逆运算。
入参:
  1. 自变量矩阵,即第一入参;
  2. 另一个自变量矩阵,即第二入参;
  3. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销;
select 
  sm_sc.fv_d_log_1
  (
    array[[2.8, 3.6], [2.4, 1.6]], 
    array[[1.8, 4.6], [1.4, 3.6]],
    array[[2.8, 3.6], [2.4, 1.6]] 
    ^!` array[[1.8, 4.6], [1.4, 3.6]]
  )

返回:
  array[[-0.198, -0.258], [-0.183, -3.624]]
sm_sc.fv_d_log_2
sm_sc.
fv_d_log_2_un_de_broadcast
矩阵点对数对第二入参求导,后者不对广播逆运算。
入参:
  1. 自变量矩阵,即第二入参;
  2. 另一个自变量矩阵,即第一入参;
select 
  sm_sc.fv_d_log_2
  (
    array[[1.8, 4.6], [1.4, 3.6]], 
    array[[2.8, 3.6], [2.4, 1.6]]
  )

返回:
  array[[0.540, 0.170], [0.816, 0.591]]
sm_sc.fv_d_ln 矩阵点自然常数对数求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_ln(array[[1.8, 4.6], [1.4, 3.6]])

返回:
  array[[0.556, 0.217], [0.714, 0.278]]
sm_sc.fv_d_abs 矩阵点绝对值求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_abs(array[[-1.8, 4.6], [1.4, -3.6]])

返回:
  array[[-1.0, 1.0], [1.0, -1.0]]
sm_sc.fv_d_sin 矩阵正弦求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_sin(array[[1.8, 4.6], [1.4, 3.6]])

返回:
  array[[-0.227, -0.112], [0.170, -0.897]]
sm_sc.fv_d_cos 矩阵余弦求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_cos(array[[1.8, 4.6], [1.4, 3.6]])

返回:
  array[[-0.974, 0.994], [-0.985, 0.443]]
sm_sc.fv_d_tan 矩阵正切求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_tan(array[[1.8, 4.6], [1.4, 3.6]])

返回:
  array[[19.372, 79.503], [34.615, 1.244]]
sm_sc.fv_d_cot 矩阵余切求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_cot(array[[1.8, 4.6], [1.4, 3.6]])

返回:
  array[[-1.054, -1.013], [-1.030, -5.107]]
sm_sc.fv_d_sec 矩阵正割求导。
入参:
  1. 自变量矩阵;
  2. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销;
select 
  sm_sc.fv_d_sec(array[[0.8, -0.6], [0.4, 0.3]])

返回:
  array[[1.478, -0.829], [0.459, 0.324]]
sm_sc.fv_d_csc 矩阵余割求导。
入参:
  1. 自变量矩阵;
  2. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销;
select 
  sm_sc.fv_d_csc
  (
    array[[0.8, -0.6], [0.4, 0.3]], 
    sm_sc.fv_csc(array[[0.8, -0.6], [0.4, 0.3]])
  )

返回:
  array[[-1.354, -2.589], [-6.074, -10.939]]
sm_sc.fv_d_sinh 矩阵双曲正弦求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_sinh(array[[1.8, 3.6], [2.4, 1.6]])

返回:
  array[[3.107, 18.313], [5.557, 2.577]]
sm_sc.fv_d_cosh 矩阵双曲余弦求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_cosh(array[[1.8, 3.6], [2.4, 1.6]])

返回:
  array[[2.942, 18.285], [5.466, 2.376]]
sm_sc.fv_d_tanh 矩阵双曲正切求导。
入参:
  1. 自变量矩阵;
  2. 因变量矩阵。
      非必传入参,尽量传该入参,可节省开销;
      如果因变量不为空,可不传自变量矩阵;
select 
  sm_sc.fv_d_tanh
  (
    null, 
    sm_sc.fv_tanh(array[[1.8, 3.6], [2.4, 1.6]])
  )

返回:
  array[[0.104, 0.003], [0.032, 0.151]]
sm_sc.fv_d_asin 矩阵反正弦求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_asin(array[[0.8, 0.6], [0.4, -0.6]])

返回:
  array[[1.667, 1.250], [1.091, 1.250]]
sm_sc.fv_d_acos 矩阵反余弦求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_acos(array[[0.8, 0.6], [0.4, -0.6]])

返回:
  array[[-1.667, -1.250], [-1.091, -1.250]]
sm_sc.fv_d_atan 矩阵反正切求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_atan(array[[0.8, 0.6], [0.4, -0.6]])

返回:
  array[[0.610, 0.735], [0.862, 0.735]]
sm_sc.fv_d_acot 矩阵反余切求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_acot(array[[0.8, 0.6], [0.4, -0.6]])

返回:
  array[[-0.610, -0.735], [-0.862, -0.735]]
sm_sc.fv_d_asec 矩阵反正割求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_asec(array[[1.8, 3.6], [2.4, 1.6]])

返回:
  array[[0.371, 0.080], [0.191, 0.500]]
sm_sc.fv_d_acsc 矩阵反余割求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_acsc(array[[1.8, 3.6], [2.4, 1.6]])
  
返回:
  array[[-0.371, -0.080], [-0.191, -0.500]]
sm_sc.fv_d_asinh 矩阵反双曲正弦求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_asinh(array[[0.8, 0.6], [0.4, -0.6]])
  
返回:
  array[[0.781, 0.857], [0.928, 0.857]]
sm_sc.fv_d_acosh 矩阵反双曲余弦求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_acosh(array[[1.8, 1.6], [1.4, 2.6]])
  
返回:
  array[[0.668, 0.801], [1.021, 0.417]]
sm_sc.fv_d_atanh 矩阵反双曲正切求导。
入参:
  1. 自变量矩阵;
select 
  sm_sc.fv_d_atanh(array[[1.8, 1.6], [1.4, 2.6]])
  
返回:
  array[[-0.446, -0.641], [-1.042, -0.174]]
sm_sc.
fv_d_transpose_dloss_dindepdt
矩阵转置的损失函数对自变量求导。
入参:
  1. 损失函数对因变量的导数矩阵;
select 
  sm_sc.fv_d_transpose_dloss_dindepdt
  (
    array[[12.3, -12.3], [45.6, -45.6], [1.2, 2.3]]
  )

返回:
  array[[12.3, 45.6, 1.2], [-12.3, -45.6, 2.3]]
sm_sc.
fv_d_transpose_3d_dloss_dindepdt
3d矩阵转置的损失函数对自变量求导。
入参:
  1. 损失函数对因变量的导数矩阵;
  2. 参与转置的两个维度;
select 
  sm_sc.fv_d_transpose_3d_dloss_dindepdt
  (
    array
    [
      [
        [1, 2, 3, 4], 
        [5, 6, 7, 8], 
        [9, 10, 11, 12]
      ], 
      [
        [21, 22, 23, 24], 
        [25, 26, 27, 28], 
        [29, 30, 31, 32]
      ]
    ]
    , array[1, 2]
  )

返回:
  array
  [
    [[1, 2, 3, 4], [21, 22, 23, 24]], 
    [[5, 6, 7, 8], [25, 26, 27, 28]], 
    [[9, 10, 11, 12], [29, 30, 31, 32]]
  ]
sm_sc.
fv_d_mx_ele_2d_2_3d_dloss_dindepdt
二维数组转三维数组的损失函数对自变量求导。
入参:
  1. 损失函数对因变量的导数矩阵;
  2. 自变量被定住的维度,1 或 2;
select 
  sm_sc.fv_d_mx_ele_2d_2_3d_dloss_dindepdt
  (
    sm_sc.fv_mx_ele_2d_2_3d
    (
      array
      [
        [1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], 
        [21, 22], [23, 24], [25, 26], [27, 28], [29, 30], [31, 32]
      ]
      , 3
      , 2
    )
    , 2
  );

返回:
  array
  [
    [1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], 
    [21, 22], [23, 24], [25, 26], [27, 28], [29, 30], [31, 32]
  ]
sm_sc.
fv_d_mx_ele_3d_2_2d_dloss_dindepdt
三维数组转二维数组的损失函数对自变量求导。
入参:
  1. 损失函数对因变量的导数矩阵;
  2. ((参与降维(但被定住元素顺序)的自变量)的维度)的长度;
  3. 自变量参与合并两个维度。
      该参数第一个元素数字为 from 维度,
            第二个元素数字为 to 维度。
      合并后的新维度在 to 的顺序位置;
  4. 被定住元素顺序的自变量旧维度。
      该旧维度下的元素顺序,将保留至新维度。
      该参数为第三个入参数组两个元素之一;
select 
  sm_sc.fv_d_mx_ele_3d_2_2d_dloss_dindepdt
  (
    array
    [
      [1, 21, 2, 22, 3, 23, 4, 24]
    , [5, 25, 6, 26, 7, 27, 8, 28]
    , [9, 29, 10, 30, 11, 31, 12, 32]
    ]
    , 2
    , array[1, 3]
    , 1
  )

返回:
  array
  [
    [
      [1, 2, 3, 4]
    , [5, 6, 7, 8]
    , [9, 10, 11, 12]
    ], 
    [
      [21, 22, 23, 24] 
    , [25, 26, 27, 28]
    , [29, 30, 31, 32]
    ]
  ]
sm_sc.
fv_d_mx_slice_3d_2_2d_dloss_dindepdt
三维至二维去壳的损失函数对自变量求导。
入参:
  1. 损失函数对因变量的导数矩阵;
  2. 自变量规格;
  3. 被切片维度;
  4. 切片位置编号;
select  
    sm_sc.fv_d_mx_slice_3d_2_2d_dloss_dindepdt
    (
        (
            array
            [
                [1,  2,  3,  4,  5]          ,
                [11,  12,  13,  14,  15],
                [21,  22,  23,  24,  25],  
                [31,  32,  33,  34,  35]  
            ]
        )
        ,  array[3,  4,  5]
        ,  1
        ,  2
    )

返回:  
    array
    [
        [[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]
    ,  [[1,2,3,4,5],[11,12,13,14,15],[21,22,23,24,25],[31,32,33,34,35]]
    ,  [[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]
    ]
sm_sc.
fv_d_mx_slice_4d_2_2d_dloss_dindepdt
四维至二维去壳的损失函数对自变量求导。
入参:
  1. 损失函数对因变量的导数矩阵;
  2. 自变量规格;
  3. 被切片的两个维度;
  4. 两个维度上切片位置编号;
select  
    sm_sc.fv_d_mx_slice_4d_2_2d_dloss_dindepdt
    (
        (
            array
            [[
                [1,  2,  3,  4,  5]          ,
                [11,  12,  13,  14,  15],
                [21,  22,  23,  24,  25],  
                [31,  32,  33,  34,  35]  
            ]]
        )
        ,  array[2,  3,  4,  5]
        ,  array[1,  2]
        ,  array[2,  3]
    )

返回:  
    array
    [
        [
            [[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]
        ,  [[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]
        ,  [[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]
        ]
    ,  [
            [[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]
        ,  [[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]
        ,  [[1,2,3,4,5],[11,12,13,14,15],[21,22,23,24,25],[31,32,33,34,35]]
        ]
    ]
sm_sc.
fv_d_mx_slice_4d_2_3d_dloss_dindepdt
四维至三维去壳的损失函数对自变量求导。
入参:
  1. 损失函数对因变量的导数矩阵;
  2. 自变量规格;
  3. 被切片维度;
  4. 切片位置编号;
select  
    sm_sc.fv_d_mx_slice_4d_2_3d_dloss_dindepdt
    (
        (
            array
            [[
                [1,  2,  3,  4,  5]          ,
                [11,  12,  13,  14,  15],
                [21,  22,  23,  24,  25],  
                [31,  32,  33,  34,  35]  
            ]]
        )
        ,  array[2,  1,  4,  5]
        ,  1
        ,  2
    )

返回:  
    array
    [
        [[[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]]
    ,  [[[1,2,3,4,5],[11,12,13,14,15],[21,22,23,24,25],[31,32,33,34,35]]]
    ]
sm_sc.
fv_d_mx_ascend_dim_dloss_dindepdt
加壳升维的损失函数对自变量求导。
入参:
  1. 损失函数对因变量的导数矩阵;
  2. 升维次数;
select  
    sm_sc.fv_d_mx_ascend_dim_dloss_dindepdt
    (
        array[[[[1,  2]]]]
    ,  2
    )

返回:  
    array
    [[1,  2]]
sm_sc.
fv_d_apad_dloss_dindepdt_1
下对齐上填充的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量在视觉平面的高;
select  
    sm_sc.fv_d_apad_dloss_dindepdt_1
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [11,  12,  13,  14,  15]
        ,  [21,  22,  23,  24,  25]
        ,  [31,  32,  33,  34,  35]
        ,  [41,  42,  43,  44,  45]
        ]
    ,  2
    )
    
返回:  
    array
    [
        [31,  32,  33,  34,  35]
    ,  [41,  42,  43,  44,  45]
    ]
sm_sc.
fv_d_apad_dloss_dindepdt_2
下对齐上填充的损失函数对第二自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量在视觉平面的高;
    3.  填充重复次数;
select  
    sm_sc.fv_d_apad_dloss_dindepdt_2
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [11,  12,  13,  14,  15]
        ,  [21,  22,  23,  24,  25]
        ,  [31,  32,  33,  34,  35]
        ,  [41,  42,  43,  44,  45]
        ],
        2,
        2
    )
    
返回:  
    array
    [
        [22,  24,  26,  28,  30]
    ,  [42,  44,  46,  48,  50]
    ]
sm_sc.
fv_d_bpad_dloss_dindepdt_1
上对齐下填充的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量在视觉平面的高;
select  
    sm_sc.fv_d_bpad_dloss_dindepdt_1
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [11,  12,  13,  14,  15]
        ,  [21,  22,  23,  24,  25]
        ,  [31,  32,  33,  34,  35]
        ,  [41,  42,  43,  44,  45]
        ]
    ,  2
    )
    
返回:  
    array
    [
        [1,  2,  3,  4,  5]
    ,  [11,  12,  13,  14,  15]
    ]
sm_sc.
fv_d_bpad_dloss_dindepdt_2
上对齐下填充的损失函数对第二自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量在视觉平面的高;
    3.  填充重复次数;
select  
    sm_sc.fv_d_bpad_dloss_dindepdt_2
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [11,  12,  13,  14,  15]
        ,  [21,  22,  23,  24,  25]
        ,  [31,  32,  33,  34,  35]
        ,  [41,  42,  43,  44,  45]
        ],
        2,
        2
    )
    
返回:  
    array
    [
        [42,  44,  46,  48,  50]
    ,  [62,  64,  66,  68,  70]
    ]
sm_sc.
fv_d_lpad_dloss_dindepdt_1
右对齐左填充的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量在视觉平面的宽;
select  
    sm_sc.fv_d_lpad_dloss_dindepdt_1
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [11,  12,  13,  14,  15]
        ,  [21,  22,  23,  24,  25]
        ,  [31,  32,  33,  34,  35]
        ,  [41,  42,  43,  44,  45]
        ],
        2
    )
    
返回:  
    array
    [
        [4,  5]
    ,  [14,  15]
    ,  [24,  25]
    ,  [34,  35]
    ,  [44,  45]
    ]
sm_sc.
fv_d_lpad_dloss_dindepdt_2
右对齐左填充的损失函数对第二自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量在视觉平面的宽;
    3.  填充重复次数;
select  
    sm_sc.fv_d_lpad_dloss_dindepdt_2
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [11,  12,  13,  14,  15]
        ,  [21,  22,  23,  24,  25]
        ,  [31,  32,  33,  34,  35]
        ,  [41,  42,  43,  44,  45]
        ],
        2,
        2
    )
    
返回:  
    array
    [
        [4,  6]
    ,  [24,  26]
    ,  [44,  46]
    ,  [64,  66]
    ,  [84,  86]
    ]
sm_sc.
fv_d_rpad_dloss_dindepdt_1
左对齐右填充的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量在视觉平面的宽;
select  
    sm_sc.fv_d_rpad_dloss_dindepdt_1
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [11,  12,  13,  14,  15]
        ,  [21,  22,  23,  24,  25]
        ,  [31,  32,  33,  34,  35]
        ,  [41,  42,  43,  44,  45]
        ],
        2
    )
    
返回:  
    array
    [
        [1,  2]
    ,  [11,  12]
    ,  [21,  22]
    ,  [31,  32]
    ,  [41,  42]
    ]
sm_sc.
fv_d_rpad_dloss_dindepdt_2
左对齐右填充的损失函数对第二自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量在视觉平面的宽;
    3.  填充重复次数;
select  
    sm_sc.fv_d_rpad_dloss_dindepdt_2
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [11,  12,  13,  14,  15]
        ,  [21,  22,  23,  24,  25]
        ,  [31,  32,  33,  34,  35]
        ,  [41,  42,  43,  44,  45]
        ],
        2,
        2
    )
    
返回:  
    array
    [
        [6,  8]
    ,  [26,  28]
    ,  [46,  48]
    ,  [66,  68]
    ,  [86,  88]
    ]
sm_sc.
fv_d_chunk_dloss_dindepdt
切片(切块儿)的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量规格;
    3.  切片(切块儿)位置各维度下标;
select  
    sm_sc.fv_d_chunk_dloss_dindepdt
    (
        array[[2,1],[3,2]]
    ,  array[4,3]
    ,  array[2,2]
    )

返回:  
    array[[0,0,0],[0,2,1],[0,3,2],[0,0,0]]
sm_sc.
fv_d_slice_y_dloss_dindepdt
第一维切片的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量第一维长度;
    3.  切片位置编号范围;
select  
    sm_sc.fv_d_slice_y_dloss_dindepdt
    (
        array[[1,  2],  [3,  4],  [5,  11],  [12,  13],  [14,  15]]
    ,  7
    ,  array[int4range(1,  3,  '[]'),  int4range(2,  3,  '[]')]
    )

返回:  
    array
    [[1,2],[15,17],[19,26],[0,0],[0,0],[0,0],[0,0]]
sm_sc.
fv_d_slice_x_dloss_dindepdt
第二维切片的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量第二维长度;
    3.  切片位置编号范围;
select  
    sm_sc.fv_d_slice_x_dloss_dindepdt
    (
        array[[1,  2,  3,  4,  5],  [11,  12,  13,  14,  15]]
    ,  7
    ,  array[int4range(1,  3,  '[]'),  int4range(2,  3,  '[]')]
    )

返回:  
    array
    [[1,6,8,0,0,0,0],[11,26,28,0,0,0,0]]
sm_sc.
fv_d_slice_x3_dloss_dindepdt
第三维切片的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量第三维长度;
    3.  切片位置编号范围;
select  
    sm_sc.fv_d_slice_x3_dloss_dindepdt
    (
        array
        [
            [
                [1,  2,  3,  4,  5]
            ,  [11,  12,  13,  14,  15]
            ]
        ,  [
                [21,  22,  23,  24,  25]
            ,  [31,  32,  33,  34,  35]
            ]
        ]
    ,  7
    ,  array[int4range(1,  3,  '[]'),  int4range(2,  3,  '[]')]
    )

返回:  
    array
    [
        [
            [1,  6,  8,  0,  0,  0,  0]
        ,  [11,  26,  28,  0,  0,  0,  0]
        ]
    ,  [
            [21,  46,  48,  0,  0,  0,  0]
        ,  [31,  66,  68,  0,  0,  0,  0]
        ]
    ]
sm_sc.
fv_d_slice_x4_dloss_dindepdt
第四维切片的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量第四维长度;
    3.  切片位置编号范围;
select  
    sm_sc.fv_d_slice_x4_dloss_dindepdt
    (
        array
        [
            [
                [[1,  2,  3,  4,  5],[11,  12,  13,  14,  15]]
            ]
        ,  [
                [[21,  22,  23,  24,  25],[31,  32,  33,  34,  35]]
            ]
        ]
    ,  7
    ,  array[int4range(1,  3,  '[]'),  int4range(2,  3,  '[]')]
    )

返回:  
    array
    [
        [[
            [1,  6,  8,  0,  0,  0,  0]
        ,  [11,  26,  28,  0,  0,  0,  0]
        ]]
    ,  [[
            [21,  46,  48,  0,  0,  0,  0]
        ,  [31,  66,  68,  0,  0,  0,  0]
        ]]
    ]
sm_sc.
fv_d_sample_y_dloss_dindepdt_1
第一维采样的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量第一维长度;
    3.  每个采样周期约束窗口宽度;
    4.  每个采样周期采样序号(多)区间;
select  
    sm_sc.fv_d_sample_y_dloss_dindepdt_1
    (
        array
        [
            [1,  2,  3,  4]
        ,  [11,  12,  13,  14]
        ,  [21,  22,  23,  24]

        ,  [31,  32,  33,  34]
        ,  [41,  42,  43,  44]

        ,  [51,  52,  53,  54]
        ,  [61,  62,  63,  64]
        ,  [71,  72,  73,  74]

        ,  [81,  82,  83,  84]
        ,  [91,  92,  93,  94]
        ]
    ,  15
    ,  3
    ,  array[int4range(1,  3,  '[]'),  int4range(2,  5,  '[]')]
    )

返回:  
    array
    [
        [1,2,3,4]
    ,  [42,44,46,48]
    ,  [62,64,66,68]
    ,  [0,0,0,0]
    ,  [0,0,0,0]
    ,  [1,2,3,4]
    ,  [42,44,46,48]
    ,  [62,64,66,68]
    ,  [0,0,0,0]
    ,  [0,0,0,0]
    ,  [1,2,3,4]
    ,  [42,44,46,48]
    ,  [62,64,66,68]
    ,  [0,0,0,0]
    ,  [0,0,0,0]
    ]
sm_sc.
fv_d_sample_x_dloss_dindepdt_1
第二维采样的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量第二维长度;
    3.  每个采样周期约束窗口宽度;
    4.  每个采样周期采样序号(多)区间;
select  
    sm_sc.fv_d_sample_x_dloss_dindepdt_1
    (
        array
        [
            [1,  2,  3,  4,  5,  6,  7,  8,  9]
        ,  [11,  12,  13,  14,  15,  16  ,17  ,18  ,19]
        ]
    ,  15
    ,  3
    ,  array[int4range(1,  3,  '[]'),  int4range(2,  5,  '[]')]
    )

返回:  
    array
    [
        [1,6,8,0,0,1,6,8,0,0,1,6,8,0,0]
    ,  [11,26,28,0,0,11,26,28,0,0,11,26,28,0,0]
    ]
sm_sc.
fv_d_sample_x3_dloss_dindepdt_1
第三维采样的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量第三维长度;
    3.  每个采样周期约束窗口宽度;
    4.  每个采样周期采样序号(多)区间;
select  
    sm_sc.fv_d_sample_x3_dloss_dindepdt_1
    (
        array
        [[
            [1,  2,  3,  4,  5,  6,  7,  8,  9]
        ,  [11,  12,  13,  14,  15,  16  ,17  ,18  ,19]
        ]]
    ,  15
    ,  3
    ,  array[int4range(1,  3,  '[]'),  int4range(2,  5,  '[]')]
    )

返回:  
    array
    [[
        [1,6,8,0,0,1,6,8,0,0,1,6,8,0,0]
    ,  [11,26,28,0,0,11,26,28,0,0,11,26,28,0,0]
    ]]
sm_sc.
fv_d_sample_x4_dloss_dindepdt_1
第四维采样的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量第四维长度;
    3.  每个采样周期约束窗口宽度;
    4.  每个采样周期采样序号(多)区间;
select  
    sm_sc.fv_d_sample_x4_dloss_dindepdt_1
    (
        array
        [[[
            [1,  2,  3,  4,  5,  6,  7,  8,  9]
        ,  [11,  12,  13,  14,  15,  16  ,17  ,18  ,19]
        ]]]
    ,  15
    ,  3
    ,  array[int4range(1,  3,  '[]'),  int4range(2,  5,  '[]')]
    )

返回:  
    array
    [[[
        [1,6,8,0,0,1,6,8,0,0,1,6,8,0,0]
    ,  [11,26,28,0,0,11,26,28,0,0,11,26,28,0,0]
    ]]]
sm_sc.
fv_d_lower_tri_mx_dloss_dindepdt
下三角矩阵的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
select  
    sm_sc.fv_d_lower_tri_mx_dloss_dindepdt
    (
        array
        [
            [
                [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ,  [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ]
        ,  [
                [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ,  [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ]
        ]
    );

返回:  
    array
    [
        [
            [[1,  0,  0],[-1,  -2,  0],[-1,  2,  -3],[1,  -2,  3]]
        ,  [[1,  0,  0],[-1,  -2,  0],[-1,  2,  -3],[1,  -2,  3]]
        ]
    ,  [
        [  [1,  0,  0],[-1,  -2,  0],[-1,  2,  -3],[1,  -2,  3]]
        ,  [[1,  0,  0],[-1,  -2,  0],[-1,  2,  -3],[1,  -2,  3]]
        ]
    ]
sm_sc.
fv_d_upper_tri_mx_dloss_dindepdt
上三角矩阵的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
select  
    sm_sc.fv_d_upper_tri_mx_dloss_dindepdt
    (
        array
        [
            [
                [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ,  [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ]
        ,  [
                [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ,  [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ]
        ]
    );

返回:  
    array
    [
        [
            [[1,2,3],[0,-2,-3],[0,0,-3],[0,0,0]]
        ,  [[1,2,3],[0,-2,-3],[0,0,-3],[0,0,0]]
        ]
    ,  [
            [[1,2,3],[0,-2,-3],[0,0,-3],[0,0,0]]
        ,  [[1,2,3],[0,-2,-3],[0,0,-3],[0,0,0]]
        ]
    ]
sm_sc.
fv_d_lower_tri_mx_ex_dloss_dindepdt
欠下三角矩阵的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
select  
    sm_sc.fv_d_lower_tri_mx_ex_dloss_dindepdt
    (
        array
        [
            [
                [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ,  [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ]
        ,  [
                [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ,  [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ]
        ]
    );

返回:  
    array
    [
        [
            [[0,  0,  0],[-1,  0,  0],[-1,  2,  0],[1,  -2,  3]]
        ,  [[0,  0,  0],[-1,  0,  0],[-1,  2,  0],[1,  -2,  3]]
        ]
    ,  [
        [  [0,  0,  0],[-1,  0,  0],[-1,  2,  0],[1,  -2,  3]]
        ,  [[0,  0,  0],[-1,  0,  0],[-1,  2,  0],[1,  -2,  3]]
        ]
    ]
sm_sc.
fv_d_upper_tri_mx_ex_dloss_dindepdt
欠上三角矩阵的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
select  
    sm_sc.fv_d_upper_tri_mx_ex_dloss_dindepdt
    (
        array
        [
            [
                [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ,  [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ]
        ,  [
                [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ,  [[1,  2,  3],  [-1,  -2,  -3],  [-1,  2,  -3],  [1,  -2,  3]]
            ]
        ]
    );

返回:  
    array
    [
        [
            [[0,2,3],[0,0,-3],[0,0,0],[0,0,0]]
        ,  [[0,2,3],[0,0,-3],[0,0,0],[0,0,0]]
        ]
    ,  [
            [[0,2,3],[0,0,-3],[0,0,0],[0,0,0]]
        ,  [[0,2,3],[0,0,-3],[0,0,0],[0,0,0]]
        ]
    ]
sm_sc.
fv_d_lmask_dloss_dindepdt_1
高宽二维面左掩码的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  各行左侧掩码长度;
select  
    sm_sc.fv_d_lmask_dloss_dindepdt_1
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [2,  3,  4,  5,  6]
        ,  [3,  4,  5,  6,  7]
        ,  [4,  5,  6,  7,  8]
        ]
    ,  array[[3],  [0],  [2],  [1]]
    )

返回:  
    array
    [
        [0,  0,  0,  4,  5]
    ,  [2,  3,  4,  5,  6]
    ,  [0,  0,  5,  6,  7]
    ,  [0,  5,  6,  7,  8]
    ]
sm_sc.
fv_d_rmask_dloss_dindepdt_1
高宽二维面右掩码的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  各行右侧掩码长度;
select  
    sm_sc.fv_d_rmask_dloss_dindepdt_1
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [2,  3,  4,  5,  6]
        ,  [3,  4,  5,  6,  7]
        ,  [4,  5,  6,  7,  8]
        ]
    ,  array[[3],  [0],  [2],  [1]]
    )

返回:  
    array
    [
        [1,  2,  0,  0,  0]
    ,  [2,  3,  4,  5,  6]
    ,  [3,  4,  5,  0,  0]
    ,  [4,  5,  6,  7,  0]
    ]
sm_sc.
fv_d_amask_dloss_dindepdt_1
高宽二维面上掩码的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  各列上方掩码长度;
select  
    sm_sc.fv_d_amask_dloss_dindepdt_1
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [2,  3,  4,  5,  6]
        ,  [3,  4,  5,  6,  7]
        ,  [4,  5,  6,  7,  8]
        ]
    ,  array[[3,  0,  2,  1,  3]]
    )

返回:  
    array
    [
        [0,  2,  0,  0,  0]
    ,  [0,  3,  0,  5,  0]
    ,  [0,  4,  5,  6,  0]
    ,  [4,  5,  6,  7,  8]
    ]
sm_sc.
fv_d_bmask_dloss_dindepdt_1
高宽二维面下掩码的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  各列下方掩码长度;
select  
    sm_sc.fv_b_amask_dloss_dindepdt_1
    (
        array
        [
            [1,  2,  3,  4,  5]
        ,  [2,  3,  4,  5,  6]
        ,  [3,  4,  5,  6,  7]
        ,  [4,  5,  6,  7,  8]
        ]
    ,  array[[3,  0,  2,  1,  3]]
    )

返回:  
    array
    [
        [1,  2,  3,  4,  5]
    ,  [0,  3,  4,  5,  0]
    ,  [0,  4,  0,  6,  0]
    ,  [0,  5,  0,  0,  0]
    ]
sm_sc.
fv_d_aggr_slice_sum_dloss_dindepdt
切片合计聚合的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  切片分组规格;
select  
    sm_sc.fv_d_aggr_slice_sum_dloss_dindepdt
    (
        array
        [
            [
                [2.3,  5.1,  8.2]
            ,  [-2.3,  5.1,  -8.2]
            ]
        ,  [
                [2.3,  -5.1,  -8.2]
            ,  [-2.3,  -5.1,  8.2]
            ]
        ]
    ,  array[2,  1,  3]
    )

返回:  
    array
    [
        [
            [2.3,2.3,2.3,5.1,5.1,5.1,8.2,8.2,8.2]
        ,  [-2.3,-2.3,-2.3,5.1,5.1,5.1,-8.2,-8.2,-8.2]
        ]
    ,  [
            [2.3,2.3,2.3,5.1,5.1,5.1,8.2,8.2,8.2]
        ,  [-2.3,-2.3,-2.3,5.1,5.1,5.1,-8.2,-8.2,-8.2]
        ]
    ,  [
            [2.3,2.3,2.3,-5.1,-5.1,-5.1,-8.2,-8.2,-8.2]
        ,  [-2.3,-2.3,-2.3,-5.1,-5.1,-5.1,8.2,8.2,8.2]
        ]
    ,  [
            [2.3,2.3,2.3,-5.1,-5.1,-5.1,-8.2,-8.2,-8.2]
        ,  [-2.3,-2.3,-2.3,-5.1,-5.1,-5.1,8.2,8.2,8.2]
        ]
    ]
sm_sc.
fv_d_aggr_slice_avg_dloss_dindepdt
切片平均聚合的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  切片分组规格;
select  
    sm_sc.fv_d_aggr_slice_avg_dloss_dindepdt
    (
        array
        [
            [
                [2.3,  5.1,  8.2]
            ,  [-2.3,  5.1,  -8.2]
            ]
        ,  [
                [2.3,  -5.1,  -8.2]
            ,  [-2.3,  -5.1,  8.2]
            ]
        ]
    ,  array[2,  1,  3]
    )

返回:  
    array
    [
        [
            [0.383,0.383,0.383,0.850,0.850,0.850,1.367,1.367,1.367]
        ,  [-0.383,-0.383,-0.383,0.850,0.850,0.850,-1.367,-1.367,-1.367]
        ]
    ,  [
            [0.383,0.383,0.383,0.850,0.850,0.850,1.367,1.367,1.367]
        ,  [-0.383,-0.383,-0.383,0.850,0.850,0.850,-1.367,-1.367,-1.367]
        ]
    ,  [
            [0.383,0.383,0.383,-0.850,-0.850,-0.850,-1.367,-1.367,-1.367]
        ,  [-0.383,-0.383,-0.383,-0.850,-0.850,-0.850,1.367,1.367,1.367]
        ]
    ,  [
            [0.383,0.383,0.383,-0.850,-0.850,-0.850,-1.367,-1.367,-1.367]
        ,  [-0.383,-0.383,-0.383,-0.850,-0.850,-0.850,1.367,1.367,1.367]
        ]
    ]
sm_sc.
fv_d_aggr_slice_prod_dloss_dindepdt
切片累乘聚合的损失函数对第一自变量求导。
入参:
    1.  自变量;
    2.  因变量;
    3.  损失函数对因变量的导数矩阵;
    4.  切片分组规格;
with  
cte_rand  as  
(
    select  
        sm_sc.fv_new_rand(array[4,  3])  as  a_indepdt
)
select  
    array_dims
    (
        sm_sc.fv_d_aggr_slice_prod_dloss_dindepdt
        (
            a_indepdt
        ,  sm_sc.fv_aggr_slice_prod(a_indepdt,  array[2,  1])
        ,  sm_sc.fv_new_rand(array[2,  3])
        ,  array[2,  1]
        )
    )
from  cte_rand

返回:  
    [1:4][1:3]
sm_sc.
fv_d_aggr_slice_max_dloss_dindepdt
切片最大聚合的损失函数对第一自变量求导。
入参:
    1.  自变量;
    2.  因变量;
    3.  损失函数对因变量的导数矩阵;
    4.  切片分组规格;
with  
cte_rand  as  
(
    select  
        sm_sc.fv_new_rand(array[4,  3])  as  a_indepdt
)
select  
    array_dims
    (
        sm_sc.fv_d_aggr_slice_max_dloss_dindepdt
        (
            a_indepdt
        ,  sm_sc.fv_aggr_slice_max(a_indepdt,  array[2,  1])
        ,  sm_sc.fv_new_rand(array[2,  3])
        ,  array[2,  1]
        )
    )
from  cte_rand

返回:  
    [1:4][1:3]
sm_sc.
fv_d_aggr_slice_min_dloss_dindepdt
切片最小聚合的损失函数对第一自变量求导。
入参:
    1.  自变量;
    2.  因变量;
    3.  损失函数对因变量的导数矩阵;
    4.  切片分组规格;
with  
cte_rand  as  
(
    select  
        sm_sc.fv_new_rand(array[4,  3])  as  a_indepdt
)
select  
    array_dims
    (
        sm_sc.fv_d_aggr_slice_min_dloss_dindepdt
        (
            a_indepdt
        ,  sm_sc.fv_aggr_slice_min(a_indepdt,  array[2,  1])
        ,  sm_sc.fv_new_rand(array[2,  3])
        ,  array[2,  1]
        )
    )
from  cte_rand

返回:  
    [1:4][1:3]
sm_sc.
fv_d_aggr_chunk_sum_dloss_dindepdt
切块儿合计聚合的损失函数对第一自变量求导。
入参:
    1.  自变量规格;
    2.  损失函数对因变量的导数矩阵;
select  
    array_dims
    (
        sm_sc.fv_d_aggr_chunk_sum_dloss_dindepdt
        (
            array[6,  8,  8,  6]
        ,  sm_sc.fv_new_rand(array[3,  2,  2,  3])
        )
    )

返回:  
    [1:6][1:8][1:8][1:6]
sm_sc.
fv_d_aggr_chunk_prod_dloss_dindepdt
切块儿累乘聚合的损失函数对第一自变量求导。
入参:
    1.  自变量;
    2.  因变量;
    3.  损失函数对因变量的导数矩阵;
with  
cte_rand  as  
(
    select  
        sm_sc.fv_new_rand(array[6,  8,  8])  as  a_indepdt
)
select  
    array_dims
    (
        sm_sc.fv_d_aggr_chunk_prod_dloss_dindepdt
        (
            a_indepdt
        ,  sm_sc.fv_aggr_chunk_prod(a_indepdt,  array[3,  2,  2])
        ,  sm_sc.fv_new_rand(array[3,  2,  2])
        )
    )
from  cte_rand

返回:  
    [1:6][1:8][1:8]
sm_sc.
fv_d_aggr_chunk_avg_dloss_dindepdt
切块儿平均聚合的损失函数对第一自变量求导。
入参:
    1.  自变量规格;
    2.  损失函数对因变量的导数矩阵;
select  
    array_dims
    (
        sm_sc.fv_d_aggr_chunk_avg_dloss_dindepdt
        (
            array[6,  8,  8,  6]
        ,  sm_sc.fv_new_rand(array[3,  2,  2,  3])
        )
    )

返回:  
    [1:6][1:8][1:8][1:6]
sm_sc.
fv_d_aggr_chunk_max_dloss_dindepdt
切块儿最大聚合的损失函数对第一自变量求导。
入参:
    1.  自变量;
    2.  因变量;
    3.  损失函数对因变量的导数矩阵;
with  
cte_rand  as  
(
    select  
        sm_sc.fv_new_rand(array[6,  8,  8])  as  a_indepdt
)
select  
    array_dims
    (
        sm_sc.fv_d_aggr_chunk_max_dloss_dindepdt
        (
            a_indepdt
        ,  sm_sc.fv_aggr_chunk_max(a_indepdt,  array[3,  2,  2])
        ,  sm_sc.fv_new_rand(array[3,  2,  2])
        )
    )
from  cte_rand

返回:  
    [1:6][1:8][1:8]
sm_sc.
fv_d_aggr_chunk_min_dloss_dindepdt
切块儿最小聚合的损失函数对第一自变量求导。
入参:
    1.  自变量;
    2.  因变量;
    3.  损失函数对因变量的导数矩阵;
with  
cte_rand  as  
(
    select  
        sm_sc.fv_new_rand(array[6,  8,  8])  as  a_indepdt
)
select  
    array_dims
    (
        sm_sc.fv_d_aggr_chunk_min_dloss_dindepdt
        (
            a_indepdt
        ,  sm_sc.fv_aggr_chunk_min(a_indepdt,  array[3,  2,  2])
        ,  sm_sc.fv_new_rand(array[3,  2,  2])
        )
    )
from  cte_rand

返回:  
    [1:6][1:8][1:8]
sm_sc.
fv_d_prod_mx_1
矩阵乘法的因变量对第一自变量求导。
入参:
    1.  另一个自变量,即第二个自变量;
    2.  自变量规格;
select  
    array_dims
    (
        sm_sc.fv_d_prod_mx_1
        (
            sm_sc.fv_new_rand(array[4,  3,  2,  5])
        ,  array[3,  6,  5]
        )
    )

返回:  
    [1:3][1:2][1:5]
sm_sc.
fv_d_prod_mx_2
矩阵乘法的因变量对第二自变量求导。
入参:
    1.  另一个自变量,即第一个自变量;
    2.  自变量规格;
select  
    array_dims
    (
        sm_sc.fv_d_prod_mx_2
        (
            sm_sc.fv_new_rand(array[4,  3,  2,  5])
        ,  array[3,  3,  5]
        )
    )
    
返回:  
    [1:3][1:5][1:2]
sm_sc.
fv_d_prod_mx_dloss_dindepdt_1
矩阵乘法的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  另一个自变量,即第二个自变量;
    3.  自变量规格;
select  
    array_dims
    (
        sm_sc.fv_d_prod_mx_dloss_dindepdt_1
        (
            sm_sc.fv_new_rand(array[5,  6,  2,  4])
        ,  sm_sc.fv_new_rand(array[6,  3,  4])      
        ,  array[5,  6,  2,  3]
        )
    )
    
返回:  
    [1:5][1:6][1:2][1:3]
sm_sc.
fv_d_prod_mx_dloss_dindepdt_2
矩阵乘法的损失函数对第二自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  另一个自变量,即第一个自变量;
    3.  自变量规格;
select  
    array_dims
    (
        sm_sc.fv_d_prod_mx_dloss_dindepdt_2
        (
            sm_sc.fv_new_rand(array[5,  2,  4])
        ,  sm_sc.fv_new_rand(array[2,  3])      
        ,  array[5,  3,  4]
        )
    )
    
返回:  
    [1:5][1:3][1:4]
sm_sc.
fv_d_chunk_prod_mx_dloss_dindepdt_1
切块儿矩阵乘法的损失函数对第一自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  另一个自变量,即第二个自变量;
    3.  分块儿规格;
         即矩阵乘法的入参一的高、入参一的宽,入参二的宽
select  
    array_dims
    (
        sm_sc.fv_d_chunk_prod_mx_dloss_dindepdt_1
        (
            sm_sc.fv_new_rand(array[3,  2    7,  5    11])
        ,  sm_sc.fv_new_rand(array[3,  3    7,  5    11])
        ,  array[2,  3,  5]
        )
    )
    
返回:  
    [1:3][1:14][1:33]
sm_sc.
fv_d_chunk_prod_mx_dloss_dindepdt_2
切块儿矩阵乘法的损失函数对第二自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  另一个自变量,即第一个自变量;
    3.  分块儿规格;
         即矩阵乘法的入参一的高、入参一的宽,入参二的宽
select  
    array_dims
    (
        sm_sc.fv_d_chunk_prod_mx_dloss_dindepdt_2
        (
            sm_sc.fv_new_rand(array[2    7,  5    11])
        ,  sm_sc.fv_new_rand(array[2    7,  3    11])
        ,  array[2,  3,  5]
        )
    )
    
返回:  
    [1:21][1:55]
sm_sc.
fv_d_mx_concat_y_dloss_dindepdt_n
第一维度拼接聚合的损失函数对某位置自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量被拼接进因变量的位置下限;
    3.  自变量被拼接进因变量的位置上限;
select  
    sm_sc.fv_d_mx_concat_y_dloss_dindepdt_n
    (
        array
        [
            [1.0,  2.0,  3.0,  4.0,  5.0,  6.0]
        ,  [1.1,  2.1,  3.1,  4.1,  5.1,  6.1]
        ,  [1.2,  2.2,  3.2,  4.2,  5.2,  6.2]
        ,  [1.3,  2.3,  3.3,  4.3,  5.3,  6.3]
        ,  [1.4,  2.4,  3.4,  4.4,  5.4,  6.4]
        ]
    ,  2
    ,  3
    )
    
返回:  
    array
    [
      [1.1,  2.1,  3.1,  4.1,  5.1,  6.1]
    ,[1.2,  2.2,  3.2,  4.2,  5.2,  6.2]
    ]
sm_sc.
fv_d_mx_concat_x_dloss_dindepdt_n
第二维度拼接聚合的损失函数对某位置自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量被拼接进因变量的位置下限;
    3.  自变量被拼接进因变量的位置上限;
select  
    sm_sc.fv_d_mx_concat_x_dloss_dindepdt_n
    (
        array
        [
            [1.0,  2.0,  3.0,  4.0,  5.0,  6.0]
        ,  [1.1,  2.1,  3.1,  4.1,  5.1,  6.1]
        ,  [1.2,  2.2,  3.2,  4.2,  5.2,  6.2]
        ,  [1.3,  2.3,  3.3,  4.3,  5.3,  6.3]
        ,  [1.4,  2.4,  3.4,  4.4,  5.4,  6.4]
        ]
    ,  2
    ,  3
    )
    
返回:  
    array
    [
        [2,  3]
    ,  [2.1,  3.1]
    ,  [2.2,  3.2]
    ,  [2.3,  3.3]
    ,  [2.4,  3.4]
    ]
sm_sc.
fv_d_mx_concat_x3_dloss_dindepdt_n
第三维度拼接聚合的损失函数对某位置自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量被拼接进因变量的位置下限;
    3.  自变量被拼接进因变量的位置上限;
select  
    sm_sc.fv_d_mx_concat_x3_dloss_dindepdt_n
    (
        array
        [[
            [[1.0],  [2.0],  [3.0],  [4.0],  [5.0],  [6.0]]
        ,  [[1.1],  [2.1],  [3.1],  [4.1],  [5.1],  [6.1]]
        ,  [[1.2],  [2.2],  [3.2],  [4.2],  [5.2],  [6.2]]
        ,  [[1.3],  [2.3],  [3.3],  [4.3],  [5.3],  [6.3]]
        ,  [[1.4],  [2.4],  [3.4],  [4.4],  [5.4],  [6.4]]
        ]]
    ,  2
    ,  4
    )
    
返回:  
    array
    [
        [
            [[2],  [3],  [4]]
        ,  [[2.1],  [3.1],  [4.1]]
        ,  [[2.2],  [3.2],  [4.2]]
        ,  [[2.3],  [3.3],  [4.3]]
        ,  [[2.4],  [3.4],  [4.4]]
        ]
    ]
sm_sc.
fv_d_mx_concat_x4_dloss_dindepdt_n
第四维度拼接聚合的损失函数对某位置自变量求导。
入参:
    1.  损失函数对因变量的导数矩阵;
    2.  自变量被拼接进因变量的位置下限;
    3.  自变量被拼接进因变量的位置上限;
select  
    sm_sc.fv_d_mx_concat_x4_dloss_dindepdt_n
    (
        array
        [[[
            [1.0,  2.0,  3.0,  4.0,  5.0,  6.0]
        ,  [1.1,  2.1,  3.1,  4.1,  5.1,  6.1]
        ,  [1.2,  2.2,  3.2,  4.2,  5.2,  6.2]
        ,  [1.3,  2.3,  3.3,  4.3,  5.3,  6.3]
        ,  [1.4,  2.4,  3.4,  4.4,  5.4,  6.4]
        ]]]
    ,  2
    ,  3
    )

返回:  
    array
    [[[
            [2,  3]
        ,  [2.1,  3.1]
        ,  [2.2,  3.2]
        ,  [2.3,  3.3]
        ,  [2.4,  3.4]
    ]]]
sm_sc.fv_dloss_dz_least_square 最小二乘法损失函数求导。
  1. 训练输出预测值矩阵;
  2. 训练集的真实值编码;
select  
    sm_sc.fv_dloss_dz_least_square
    (
        array[[1.0,  2,  3],  [2,  3,  4]]
    ,  array[[1.1,  2.1,  3.2],  [2.2,  3.3,  4.2]]
    )
    
返回:  
    array[[-0.071,-0.071,-0.141], [-0.141,-0.212,-0.141]]
sm_sc.fv_dloss_dz_cross_entropy 交叉熵损失函数求导
  1. 训练输出预测值矩阵;
  2. 训练集的真实值编码;
select  
    sm_sc.fv_dloss_dz_cross_entropy
    (
        array[[0.3,  0.5,  0.2],  [0.1,  0.8,  0.1]]
    ,  array[[0.0,  1.0,  0.0],  [0.0,  1.0,  0.0]]
    )
    
返回:  
    array[[0.000,-1.000,0.000],[0.000,-0.625,0.000]]

s. 线性代数:

函数名 函数说明 调用举例
sm_sc.fv_mx_col_mix 初等列变换,某一位置参照同行另一位置清零。
入参:
  1. 原始矩阵:
  2. 将要被清零位置的列序号;
  3. 将要被清零位置的行序号:
  4. 做倍数的列号:
select
  sm_sc.fv_mx_col_mix
  (
    array[[1.9, 34.5, 0.55, 45.7, 400.5]
            ,[45.9, 4.6, 34.5, 0.55, 45.7]
            ,[3.2, 7.7, 1.9, 34.5, 0.55]
            ,[4.7, 9.0, 4.6, 34.5, 0.55]]
    , 2
    , 3
    , 4
  );

返回:
  array[[1.9000, 24.3003, 0.5500, 45.7000, 400.5000]
          ,[45.9000, 4.4772, 34.5000, 0.5500, 45.7000]
          ,[3.2000, 0.0000, 1.9000, 34.5000, 0.5500]
          ,[4.7000, 1.3000, 4.6000, 34.5000, 0.5500]]
sm_sc.fv_mx_row_mix 初等行变换,某一位置参照同列另一位置清零。
入参:
  1. 原始矩阵:
  2. 将要被清零位置的行序号;
  3. 将要被清零位置的列序号:
  4. 做倍数的行号:
select
  sm_sc.fv_mx_row_mix
  (
    array[[1.9, 34.5, 0.55, 45.7, 400.5]
            ,[45.9, 4.6, 34.5, 0.55, 45.7]
            ,[3.2, 7.7, 1.9, 34.5, 0.55]
            ,[4.7, 9.0, 4.6, 34.5, 0.55]]
    , 2
    , 3
    , 4
  );

返回:
  array[[1.9000, 34.5000, 0.5500 ,45.7000, 400.5000]
          ,[10.6500, -62.9000, 0.0000, -258.2000, 41.5750]
          ,[3.2000, 7.7000, 1.9000, 34.5000, 0.5500]
          ,[4.7000, 9.0000, 4.6000, 34.5000, 0.5500]]
sm_sc.fv_mx_determinant 矩阵行列式。
本函数依托于临时表 sm_sc.__vt_tmp_matrix 实现。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_determinant
  (
    array[[1, 2, 3],[0, 8, 9],[4, 5, 6]]
  );

返回:-21.0
sm_sc.fv_mx_inversion 逆矩阵。
本函数依托于临时表 sm_sc.__vt_tmp_matrix 实现。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_inversion
  (
    array[[1, 2, 3],[0, 8, 9],[4, 5, 6]]
  );

返回:
  array[[-0.1429, -0.1429, 0.2857]
          ,[-1.7143, 0.2857, 0.4286]
          ,[1.5238, -0.1429, -0.3810]]
sm_sc.fv_arr_norm_1 向量1范数。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_arr_norm_1
  (
    array[1, 2, 3]
  );

返回:6.0
sm_sc.fv_arr_norm_2 向量2范数。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_arr_norm_2
  (
    array[1, 2, 3]
  );

返回:3.7417
sm_sc.fv_arr_norm_nega_inf 向量负无穷范数。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_arr_norm_nega_inf
  (
    array[1, 2, 3]
  );

返回:1.0
sm_sc.fv_arr_norm_posi_inf 向量正无穷范数。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_arr_norm_posi_inf
  (
    array[1, 2, 3]
  );

返回:3.0
sm_sc.fv_arr_norm_p 向量p范数。
入参:
  1. 原始矩阵:
  2. 范数级数 p:
select
  sm_sc.fv_arr_norm_p
  (
    array[1, 2, 3]
  , 3
  );

返回:3.3079
sm_sc.fv_mx_norm_col 列和范数 1-范数 列模。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_norm_col
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  );

返回:17.0
sm_sc.fv_mx_norm_inf 行和范数 无穷-范数 行模。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_norm_inf
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  );

返回:12.0
sm_sc.fv_mx_norm_l0 L0-范数。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_norm_l0
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  );

返回:8.0
sm_sc.fv_mx_norm_l1 L1-范数。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_norm_l1
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  );

返回:30.0
sm_sc.fv_mx_norm_l2_f L2(F)-范数。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_norm_l2_f
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  );

返回:12.0
sm_sc.fv_mx_norm_l21 L21-范数。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_norm_l21
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  );

返回:20.9773
sm_sc.fv_mx_is_symmetry 判断矩阵是否对称矩阵。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_is_symmetry
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  );

返回:false
sm_sc.fv_mx_rank 矩阵的秩。
本函数依托于临时表 sm_sc.__vt_tmp_matrix 实现。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_rank
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  );

返回:3
sm_sc.fv_mx_row_step 行阶梯矩阵,上梯形。
本函数依托于临时表 sm_sc.__vt_tmp_matrix 实现。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_row_step
  (
    array[1, 2, 3]
  );

返回:
  array[[1.0000, 2.0000, 3.0000]
          ,[0.0000, 8.0000, 9.0000]
          ,[0.0000, 0.0000, -2.6250]]
sm_sc.fv_mx_rows_step_simple 行阶梯最简矩阵,也即:等价对角线矩阵,也即:矩阵的线性方程组求解。
本函数依托于临时表 sm_sc.__vt_tmp_matrix 实现。
入参:
  1. 原始矩阵:
select
  sm_sc.fv_mx_rows_step_simple
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  );

返回:
  array[[1.0000, 0.0000, 0.0000, 13.0000]
          ,[0.0000, 1.0000, 0.0000, 3.0000]
          ,[0.0000, 0.0000, 1.0000, -20.3333]
          ,[0.0000, 0.0000, 0.0000, 0.0000]]
sm_sc.fv_mx_times_col 指定某列乘系数。
入参:
  1. 原始矩阵:
  2. 乘系数的列序号:
  3. 乘系数值:
select
  sm_sc.fv_mx_times_col
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  , 4
  , 1.5
  );

返回:
  array[[1, -2, 0, 10.5]
          ,[5, 0, 3, 6.0]
          ,[0, 0, 0, 0.0]
          ,[0, -2, 0, -9.0]]
sm_sc.fv_mx_times_row 指定某行乘系数。
入参:
  1. 原始矩阵:
  2. 乘系数的行序号:
  3. 乘系数值:
select
  sm_sc.fv_mx_times_row
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  , 4
  , 1.5
  );

返回:
  array[[1, -2, 0, 7]
          ,[5, 0, 3, 4]
          ,[0, 0, 0, 0]
          ,[0.0, -3.0, 0.0, -9.0]]
sm_sc.fv_mx_reorder_col 列序重排。
入参:
  1. 原始矩阵:
  2. 旧列序号重新排列,存放在新列位置:
select
  sm_sc.fv_mx_reorder_col
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  , array[null,3,4,2]
  );

返回:
  array[[1, 0, 7, -2]
          ,[5, 3, 4, 0]
          ,[0, 0, 0, 0]
          ,[0, 0, -6, -2]]
sm_sc.fv_mx_reorder_row 行序重排。
入参:
  1. 原始矩阵:
  2. 旧行序号重新排列,存放在新行位置:
select
  sm_sc.fv_mx_reorder_row
  (
    array[[1, -2, 0, 7],[5, 0, 3, 4]
            ,[0, 0, 0, 0],[0, -2, 0, -6]]
  , array[null,3,4,2]
  );

返回:
  array[[1, -2, 0, 7]
          ,[0, 0, 0, 0]
          ,[0, -2, 0, -6]
          ,[5, 0, 3, 4]]
sm_sc.ft_mx_lu lu 分解。
入参:
  1. 原始矩阵:
出参列:
  1. q 矩阵;
  2. r 矩阵;
select
  o_mx_l, o_mx_u
from
  sm_sc.ft_mx_lu
  (
    array[[1, 2, 3, 4],[0, 8, 9, 10]
            ,[4, 5, 6, 7],[5, 7, 2, 10]]
  );

返回:
  o_mx_l:
    array[1.0000, 0.0000, 0.0000, 0.0000]
           ,[0.0000, 1.0000, 0.0000, 0.0000]
           ,[4.0000, -0.3750, 1.0000, 0.0000]
           ,[5.0000, -0.3750, 3.6667, 1.0000]]
  o_mx_u:
    array[1.0000, 2.0000, 3.0000, 4.0000]
           ,[0.0000, 8.0000, 9.0000, 10.0000]
           ,[0.0000, 0.0000, -2.6250, -5.2500]
           ,[0.0000, 0.0000, 0.0000, 13.0000]]
sm_sc.ft_mx_qr qr 分解。
入参:
  1. 原始矩阵:
出参列:
  1. q 矩阵;
  2. r 矩阵;
select
  o_mx_q, o_mx_r
from
  sm_sc.ft_mx_qr
  (
    array[[1, 2, 3, 4],[0, 8, 9, 10]
            ,[4, 5, 6, 7],[5, 7, 2, 10]]
  );

返回:
  o_mx_q:
    array[0.1543, 0.0800, 0.3341, 0.9264]
           ,[0.0000, 0.9950, 0.0276, -0.0958]
           ,[0.6172, -0.0533, 0.7020, -0.3514]
           ,[0.7715, 0.0267, -0.6284, 0.0958]]
  o_mx_r:
    array[6.4807, 8.7953, 5.7092, 12.6529]
           ,[0.0000, 8.0401, 8.9285, 10.1634]
           ,[0.0000, 0.0000, 4.2056, 0.2422]
           ,[0.0000, 0.0000, 0.0000, 1.2458]]

2. 运算符列表

提醒:在 postgresql v 14 以及以上版本,不支持单目右侧运算符的定义。

运算符 运算符位置 运算符说明 举例
+` 双目 元素、点(广播)加。
等价函数: sm_sc.fv_opr_add
select
  array[[1.3, -8.8],[2.2, -3.0]]
  +`
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[-1.3, 2.5],[-2.4, 2.1]]
-` 双目 元素、点(广播)减。
等价函数: sm_sc.fv_opr_sub
select
  array[[1.3, -8.8],[2.2, -3.0]]
  -`
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[3.9, -20.1],[6.8, -8.1]]
-` 单目左侧 元素、点(广播)相反数。
等价函数: sm_sc.fv_opr_sub
select
  -`
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[2.6, -11.3],[4.6, -5.1]]
*` 双目 元素、点(广播)乘。
等价函数: sm_sc.fv_opr_mul
select
  array[[1.3, -8.8],[2.2, -3.0]]
  *`
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[-3.38, -99.44],[-10.12, -15.30]]
/` 双目 元素、点(广播)除。
等价函数: sm_sc.fv_opr_div
select
  array[[1.3, -8.8],[2.2, -3.0]]
  /`
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[-0.5000, -0.7788],[-0.4783, -0.5882]]
/` 单目左侧 元素、点(广播)倒数。
等价函数: sm_sc.fv_opr_div
select
  /`
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[-0.3846, 0.0885],[-0.2174, 0.1961]]
%` 双目 元素、点(广播)求余。
等价函数: sm_sc.fv_opr_mod
select
  array[[10, -29],[12, -33]]
  %`
  array[[-3, 11],[-5, 5]];

返回:
  array[[1, -7],[2, -3]]
^` 双目 元素、点(广播)幂。
等价函数: sm_sc.fv_opr_pow
select
  array[[1.3, 8.8],[2.2, 3.0]]
  ^`
  array[[-2.6, 1.3],[-4.6, 5.1]];

返回:
  array[[0.5055, 16.8977],[0.0266, 271.2179]]
^` 单目左侧 元素、点(广播)自然常数幂。
等价函数: sm_sc.fv_opr_exp
select
  ^`
  array[[1.3, -8.8],[2.2, -3.0]];

返回:
  array[[3.6693, 0.0002],[9.0250, 0.0498]]
^!` 双目 元素、点(广播)对数。
等价函数: sm_sc.fv_opr_log
select
  array[[1.3, 8.8],[2.2, 3.0]]
  ^!`
  array[[2.6, 11.3],[4.6, 5.1]];

返回:
  array[[3.6419, 1.1150],[1.9355, 1.4830]]
^!` 单目左侧 元素、点(广播)自然对数。
等价函数: sm_sc.fv_opr_ln
select
  ^!`
  array[[2.6, 11.3],[4.6, 5.1]];

返回:
  array[[0.9555, 2.4248},{1.5261, 1.6292]]
|` 双目 元素、点(广播)位或、逻辑或操作。
等价函数: sm_sc.fv_opr_or
select
  array[[true, false],[true, false]]
  |`
  array[[false, true],[false, true]];

返回:
  array[[true, true],[true, true]]
--------------------------
select
  array[[B'010', B'011'],[B'101', B'011']]
  |`
  array[[B'011', B'101'],[B'011', B'101']];

返回:
  array[[B'011', B'111'],[B'111', B'111']]
&` 双目 元素、点(广播)位与、逻辑且操作。
等价函数: sm_sc.fv_opr_and
select
  array[[true, false],[true, false]]
  &`
  array[[false, true],[false, true]];

返回:
  array[[false, false],[false, false]]
--------------------------
select
  array[[B'010', B'011'],[B'101', B'011']]
  &`
  array[[B'011', B'101'],[B'011', B'101']];

返回:
  array[[B'010', B'001'],[B'001', B'001']]
~` 单目左侧 元素、点(广播)位非、逻辑非操作。
等价函数: sm_sc.fv_opr_not
select
  ~`
  array[[false, true],[false, true]];

返回:
  array[[true, false],[true, false]]
--------------------------
select
  ~`
  array[[B'011', B'101'],[B'011', B'101']];

返回:
  array[[B'100', B'010'],[B'100', B'010']]
#` 双目 元素、点(广播)位异或、逻辑异或操作。
等价函数: sm_sc.fv_opr_xor
select
  array[[true, false],[true, false]]
  #`
  array[[false, true],[false, true]];

返回:
  array[[true, true],[true, true]]
--------------------------
select
  array[[B'010', B'011'],[B'101', B'011']]
  #`
  array[[B'011', B'101'],[B'011', B'101']];

返回:
  array[[B'001', B'110'],[B'110', B'110']]
!#` 双目 元素、点(广播)位同或、逻辑同或操作。
等价函数: sm_sc.fv_opr_xnor
select
  array[[true, false],[true, false]]
  !#`
  array[[false, true],[false, true]];

返回:
  array[[false, false],[false, false]]
--------------------------
select
  array[[B'010', B'011'],[B'101', B'011']]
  !#`
  array[[B'011', B'101'],[B'011', B'101']];

返回:
  array[[B'110', B'001'],[B'001', B'001']]
~` 双目 元素、点(广播)文本正则是否匹配。
等价函数: sm_sc.fv_opr_is_regexp_match
select
  array[['abbbbbc122223', 'abc123'],['abc123', 'ac13']]
  ~`
  array[['a.c', '1.*?3'],['1.3', 'a.*?c']];

返回:
  array[[false, true],[true, true]]
~` 单目左侧 元素、点(广播)复元素共轭。
等价函数: sm_sc.fv_opr_conjugate
select
  ~`
  array[[(12.3, -25.1), (-2.56, 3.25)]
          ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[];

返回:
  array[[(12.3, 25.1), (-2.56, -3.25)]
           ,[(12.3, 0.0), (0.0, -3.25)]] :: sm_sc.typ_l_complex[]
@~` 单目左侧 元素、点(广播)复元素实部。
等价函数: sm_sc.fv_opr_real
select
  @~`
  array[[(12.3, -25.1), (-2.56, 3.25)]
          ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[];

返回:
  array[[12.3000, -2.5600],[12.3000, 0.0000]]
~@` 单目左侧 元素、点(广播)复元素虚部。
等价函数: sm_sc.fv_opr_imaginary
select
  ~@`
  array[[(12.3, -25.1), (-2.56, 3.25)]
          ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[];

返回:
  array[[-25.1000, 3.2500],[0.0000, 3.2500]]
~^` 单目左侧 元素、点(广播)复元素实虚对换。
等价函数: sm_sc.fv_opr_conjugate_45
select
  ~^`
  array[[(12.3, -25.1), (-2.56, 3.25)]
          ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[];

返回:
  array[[(-25.1, 12.3), (3.25, -2.56)]
           ,[(0.0, 12.3), (3.25, 0.0)]] :: sm_sc.typ_l_complex[]
||` 双目 元素、点(广播)位、字串拼接操作。
等价函数: sm_sc.fv_opr_concat
select
  array[['abc', 'efgh'],['hijk', 'lm']]
  ||`
  array[['no', 'pqr'],['stu', 'vwxyz']];

返回:
  array[['abcno', 'efghpqr'],['hijkstu', 'lmvwxyz']]
==` 双目 元素、点(广播)相等判断。
等价函数: sm_sc.fv_opr_is_equal
select
  array[[1.3, -8.8],[2.2, -3.0]]
  ==`
  array[[-2.6, 11.3],[-4.6, -3.0]];

返回:
  array[[false, false],[false, true]]
<` 双目 元素、点(广播)小于判断。
等价函数: sm_sc.fv_opr_is_less
select
  array[[1.3, -8.8],[2.2, -3.0]]
  <`
  array[[-2.6, 11.3],[-4.6, -3.0]];

返回:
  array[[false, true],[false, false]]
>` 双目 元素、点(广播)大于判断。
等价函数: sm_sc.fv_opr_is_greater
select
  array[[1.3, -8.8],[2.2, -3.0]]
  >`
  array[[-2.6, 11.3],[-4.6, -3.0]];

返回:
  array[[true, false],[true, false]]
<=` 双目 元素、点(广播)小于等于判断。
等价函数: sm_sc.fv_opr_is_less_ex
select
  array[[1.3, -8.8],[2.2, -3.0]]
  <=`
  array[[-2.6, 11.3],[-4.6, -3.0]];

返回:
  array[[false, true],[false, true]]
>=` 双目 元素、点(广播)大于等于判断。
等价函数: sm_sc.fv_opr_is_greater_ex
select
  array[[1.3, -8.8],[2.2, -3.0]]
  >=`
  array[[-2.6, 11.3],[-4.6, -3.0]];

返回:
  array[[true, false],[true, true]]
<>` 双目 元素、点(广播)比较大小。
等价函数: sm_sc.fv_opr_compare
select
  array[[1.3, -8.8],[2.2, -3.0]]
  <>`
  array[[-2.6, 11.3],[-4.6, -3.0]];

返回:
  array[[1, -1],[1, 0]]
<>` 单目左侧 元素、点(广播)实元素正负判断。
等价函数: sm_sc.fv_opr_sign
select
  <>`
  array[[-2.6, 11.3],[-4.6, 0.0]];

返回:
  array[[-1, 1],[-1, 0]]
@<` 双目 元素、点(广播)元素值取小。
等价函数: sm_sc.fv_opr_least
select
  array[[1.3, -8.8],[2.2, -3.0]]
  @<`
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[-2.6, -8.8],[-4.6, -3.0]]
@>` 双目 元素、点(广播)元素值取大。
等价函数: sm_sc.fv_opr_greatest
select
  array[[1.3, -8.8],[2.2, -3.0]]
  @>`
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[1.3, 11.3],[2.2, 5.1]]
@` 单目左侧 元素、点(广播)实元素绝对值、复数的模。
等价函数: sm_sc.fv_opr_abs
select
  @`
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[2.6, 11.3],[4.6, 5.1]]
--------------------------
select
  @`
  array[[(12.3, -25.1), (-2.56, 3.25)]
          ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[];

返回:
  array[[27.9517, 4.1372],[12.3, 3.25]]
~=` 双目 元素、点(广播)四舍五入。
等价函数: sm_sc.fv_opr_round
select
  array[[1.327, -8.886],[2.2, -3.036]]
  ~=`
  2;

返回:
  array[[1.33, -8.89],[2.20, -3.04]]
~<` 双目 元素、点(广播)数位地板值。
等价函数: sm_sc.fv_opr_floor
select
  array[[1.327, -8.886],[2.2, -3.036]]
  ~<`
  2;

返回:
  array[[1.32, -8.89],[2.2, -3.04]]
~>` 双目 元素、点(广播)数位天花板值。
等价函数: sm_sc.fv_opr_ceil
select
  array[[1.327, -8.886],[2.2, -3.036]]
  ~>`
  2;

返回:
  array[[1.33, -8.88],[2.2, -3.03]]
><` 双目 元素、点(广播)数位截取值。
等价函数: sm_sc.fv_opr_trunc
select
  array[[1.327, -8.886],[2.2, -3.036]]
  ><`
  2;

返回:
  array[[1.32, -8.88],[2.20, -3.03]]
||~| 单目左侧 二维数组上下对称翻转。
等价函数: sm_sc.fv_opr_mirror_heigh
select
  ||~|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[-4.6, 5.1],[-2.6, 11.3]]
|-~| 单目左侧 二维数组左右对称翻转。
等价函数: sm_sc.fv_opr_mirror_width
select
  |-~|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[11.3, -2.6],[5.1, -4.6]]
|+~| 双目 高维数组指定维度对称翻转。
等价函数: sm_sc.fv_opr_mirror
select
  array[[[-2.6, 11.3],[-4.6, 5.1]],[[2.6, -11.3],[4.6, -5.1]]]
  |+~|
  3;

返回:
  array[[[11.3, -2.6],[5.1, -4.6]],[[-11.3, 2.6],[-5.1, 4.6]]]
|<~| 单目左侧 二维数组向左旋转90°(逆时针)。
等价函数: sm_sc.__fv_turn_x_y_90
select
  |<~|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[11.3, 5.1],[-2.6, -4.6]]
|>~| 单目左侧 二维数组向右旋转90°(顺时针)。
等价函数: sm_sc.__fv_turn_y_x_90
select
  |>~|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[-4.6, -2.6],[5.1, 11.3]]
|~~| 单目左侧 二维数组旋转180°(相当于双对角转置)。
等价函数: sm_sc.fv_opr_turn_heigh_width_180
select
  |~~|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[5.1, -4.6],[11.3, -2.6]]
|*~| 双目 高维数组指定起止维度旋转90°。
等价函数: sm_sc.fv_opr_turn_90
select
  array[[[-2.6, 11.3],[-4.6, 5.1]],[[2.6, -11.3],[4.6, -5.1]]]
  |*~|
  array[2, 3];

返回:
  array[[[11.3, 5.1],[-2.6, -4.6]],[[-11.3, -5.1],[2.6, 4.6]]]
|~~| 双目 高维数组指定起止维度旋转180°。
等价函数: sm_sc.fv_opr_turn_180
select
  array[[[-2.6, 11.3],[-4.6, 5.1]],[[2.6, -11.3],[4.6, -5.1]]]
  |~~|
  array[2, 3];

返回:
  array[[[5.1, -4.6],[11.3, -2.6]],[[-5.1, 4.6],[-11.3, 2.6]]]
|^~| 单目左侧 正转置(左下右上互换)。
等价函数: sm_sc.fv_opr_transpose
select
  |^~|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[-2.6, -4.6],[11.3, 5.1]]
|^~| 双目 三维数组指定两维度正转置。
等价函数: sm_sc.fv_opr_transpose_3d
select
  array[[[1.3, -8.8, 2.25],[2.2, -3.0, -0.95]],[[-1.3, 8.8, -2.25],[-2.2, 3.0, 0.95]]]
  |^~|
  array[2, 3];

返回:
  array[[[1.3, 2.2],[-8.8, -3.0],[2.25, -0.95]],[[-1.3, -2.2],[8.8, 3.0],[-2.25, 0.95]]]
|^~`| 单目左侧 共轭矩阵(区别于正转置)。
等价函数: sm_sc.fv_opr_conjugate_i
select
  |^~`|
  array[[(12.3, -25.1), (-2.56, 3.25)]
          ,[(12.3, 0.0), (0.0, 3.25)]] :: sm_sc.typ_l_complex[];

返回:
  array[[(12.30, 25.10), (12.30, 0.00)]
           ,[(-2.56, -3.25), (0.00, -3.25)]] :: sm_sc.typ_l_complex[]
|~^| 单目左侧 右下左上互换转置。
等价函数: sm_sc.fv_opr_transpose_i
select
  |~^|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[5.1, 11.3],[-4.6, -2.6]]
|-|| 双目 二维平面上下(高度方向)拼接。
等价函数: sm_sc.fv_opr_concat_heigh
select
  array[[1.3, -8.8],[2.2, -3.0]]
  |-||
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[1.3, -8.8],[2.2, -3.0],[-2.6, 11.3],[-4.6, 5.1]]
|||| 双目 二维平面左右(宽度方向)拼接。
等价函数: sm_sc.fv_opr_concat_width
select
  array[[1.3, -8.8],[2.2, -3.0]]
  ||||
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[1.3, -8.8, -2.6, 11.3],[2.2, -3.0, -4.6, 5.1]]
|`| 双目 内积,对应元素乘积合计。
等价函数: sm_sc.fv_opr_prod_inner
select
  array[[1.3, -8.8],[2.2, -3.0]]
  |`|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:-128.24
|`^| 双目 内积幂,对应元素连乘合计。
等价函数: sm_sc.fv_opr_prod_inner_pow
select
  array[[1.3, -8.8],[2.2, -3.0]]
  |`^|
  3.0;

返回:-695.627
|**| 双目 矩阵乘法:乘、点积、数量积。
等价函数: sm_sc.fv_opr_prod_mx
select
  array[[1.3, -8.8],[2.2, -3.0]]
  |**|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[37.1000, -30.1900],[8.0800, 9.5600]]
|**| 单目左侧 矩阵转置与原矩阵做矩阵乘法运算。
等价函数: sm_sc.fv_opr_prod_mx_right
select
  |**|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:
  array[[27.9200, -52.8400],[-52.8400, 153.7000]]
|*^| 双目 方阵矩阵乘法幂,方阵矩阵与自身做 N 次矩阵乘法。
等价函数: sm_sc.fv_opr_prod_mx_pow
select
  array[[1.3, -8.8],[2.2, -3.0]]
  |*^|
  3;

返回:
  array[[1.3000,-8.8000],[2.2000,-3.0000]]
|@+| 单目左侧
双目
元素聚合合计。
等价函数: sm_sc.fv_aggr_slice_sum
select
  |@+|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:9.2
|@*| 单目左侧
双目
元素聚合累乘。
等价函数: sm_sc.fv_aggr_slice_prod
select
  |@*|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:689.2548
|@/| 单目左侧
双目
元素聚合平均。
等价函数: sm_sc.fv_aggr_slice_avg
select
  |@/|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:2.3
|@>| 单目左侧
双目
元素聚合最大。
等价函数: sm_sc.fv_aggr_slice_max
select
  |@>|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:11.3
|@<| 单目左侧
双目
元素聚合最小。
等价函数: sm_sc.fv_aggr_slice_min
select
  |@<|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:-4.6
|@/=| 单目左侧
双目
元素聚合跨度(最大-最小)。
等价函数: sm_sc.fv_aggr_slice_ptp
select
  |@/=|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:15.9
|@#| 单目左侧
双目
元素聚合总体方差。
等价函数: sm_sc.fv_aggr_slice_var_pop
select
  |@#|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:40.115
|@#`| 单目左侧
双目
元素聚合样本方差。
等价函数: sm_sc.fv_aggr_slice_var_samp
select
  |@#`|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:53.4867
|@%| 单目左侧
双目
元素聚合总体标准差。
等价函数: sm_sc.fv_aggr_slice_stddev_pop
select
  |@%|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:6.3336
|@%`| 单目左侧
双目
元素聚合样本标准差。
等价函数: sm_sc.fv_aggr_slice_stddev_samp
select
  |@%`|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:7.3135
|@/>| 单目左侧
双目
元素聚合众数。
等价函数: sm_sc.fv_aggr_slice_mode
select
  |@/>|
  array[[-4.6, 11.3],[-4.6, 5.1]];

返回:-4.6
|@/<| 单目左侧
双目
元素聚合中位数。
等价函数: sm_sc.fv_aggr_slice_median
select
  |@/<|
  array[[-2.6, 11.3],[-4.6, 5.1]];

返回:1.25
|@||| 单目左侧
双目
元素聚合位元拼接。
等价函数: sm_sc.fv_aggr_slice_concat
select
  |@|||
  array[[B'10', B'001'],[B'01', B'1']];

返回:B'10001011'
|@|`| 单目左侧
双目
元素聚合位元、逻辑求或。
等价函数: sm_sc.fv_aggr_slice_or
select
  |@|`|
  array[[B'001', B'101'],[B'100', B'010']];

返回:B'111'
--------------------------
select
  |@|`|
  array[[true, false],[true, true]];

返回:true
|@&`| 单目左侧
双目
元素聚合位元、逻辑求与。
等价函数: sm_sc.fv_aggr_slice_and
select
  |@&`|
  array[[B'001', B'101'],[B'100', B'010']];

返回:B'000'
--------------------------
select
  |@&`|
  array[[true, false],[true, true]];

返回:false
|@=| 单目左侧
双目
元素聚合免空。
等价函数: sm_sc.fv_aggr_slice_coalesce
select
  |@=|
  array[[null, 11.3],[null, 5.1]];

返回:11.3
+`| 双目 矩阵组播 - 单步卷加。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_add_stride_1
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]
  +`|
  array[[0.7, 2.9], [0.68, 4.5]]

返回:
  array[[3.2, 4.16, 1.96, 6.2]
          ,[9.28, 9.19, 5.37, 14.2]
          ,[9.3, 7.59, 5.39, 12.6]
          ,[9.28, 9.19, 5.37, 14.2]]
--------------------------
select
  array[2.5, 1.26, 3.3, 8.6, 4.69, 9.7, 8.6, 4.69, 9.7]
  +`|
  array[0.7, 2.9, 0.68, 4.5]

返回:
  array[3.2, 4.16, 1.96, 6.2
          ,9.28, 9.19, 5.37, 14.2
          ,9.3, 7.59, 5.39, 12.6
          ,9.28, 9.19, 5.37, 14.2]
-`| 双目 矩阵组播 - 单步卷减。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_sub_stride_1
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]
  -`|
  array[[0.7, 2.9], [0.68, 4.5]]

返回:
  array[[1.8,-1.64,0.56,0.4]
          ,[7.92,0.19,4.01,5.2]
          ,[7.9,1.79,3.99,6.8]
          ,[7.92,0.19,4.01,5.2]]
|-` 双目 矩阵组播 - 单步反卷减。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_de_sub_stride_1
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select
  array[[0.7, 2.9], [0.68, 4.5]]
  |-`
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]

返回:
  array[[-1.8, 1.64, -0.56, -0.4]
          ,[-7.92, -0.19, -4.01, -5.2]
          ,[-7.9, -1.79, -3.99, -6.8]
          ,[-7.92, -0.19, -4.01, -5.2]]
--------------------------
select
  array[0.7, 2.9, 0.68, 4.5]
  |-`
  array[2.5, 1.26, 3.3, 8.6, 4.69, 9.7, 8.6, 4.69, 9.7]

返回:
  array[-1.8, 1.64, -0.56, -0.4
          ,-7.92, -0.19, -4.01, -5.2
          ,-7.9, -1.79, -3.99, -6.8
          ,-7.92, -0.19, -4.01, -5.2]
*`| 双目 矩阵组播 - 单步卷乘。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_mul_stride_1
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]
  *`|
  array[[0.7, 2.9], [0.68, 4.5]]

返回:
  array[[1.75, 3.654, 0.882, 9.57]
          ,[5.848, 21.105, 3.1892, 43.65]
          ,[6.02, 13.601, 3.283, 28.13]
          ,[5.848, 21.105, 3.1892, 43.65]]
/`| 双目 矩阵组播 - 单步卷除。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_div_stride_1
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]
  /`|
  array[[0.7, 2.9], [0.68, 4.5]]

返回:
  array[[3.571, 0.434, 1.800, 1.138]
          ,[12.647, 1.042, 6.897, 2.156]
          ,[12.286, 1.617, 6.700, 3.345]
          ,[12.647, 1.042, 6.897, 2.156]]
|/` 双目 矩阵组播 - 单步反卷除。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_de_div_stride_1
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select
  array[[0.7, 2.9], [0.68, 4.5]]
  |/`
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]

返回:
  array[[0.280, 2.302, 0.556, 0.879]
          ,[0.079, 0.959, 0.145, 0.464]
          ,[0.081, 0.618, 0.149, 0.299]
          ,[0.079, 0.959, 0.145, 0.464]]
^`| 双目 矩阵组播 - 单步卷幂。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_pow_stride_1
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]
  ^`|
  array[[0.7, 2.9], [0.68, 4.5]]

返回:
  array[[1.899, 1.955, 1.176, 31.893]
          ,[4.320, 1047.799, 2.860, 27572.288]
          ,[4.510, 88.390, 2.950, 727.173]
          ,[4.320, 1047.799, 2.860, 27572.288]]
|^` 双目 矩阵组播 - 单步反卷幂。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_de_pow_stride_1
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select
  array[[0.7, 2.9], [0.68, 4.5]]
  |^`
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]

返回:
  array[[0.410, 3.825, 0.638, 33.567]
          ,[0.036, 1157.622, 0.164, 2168509.772]
          ,[0.047, 147.451, 0.188, 30567.546]
          ,[0.036, 1157.622, 0.164, 2168509.772]]
^!`| 双目 矩阵组播 - 单步卷对数。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_log_stride_1
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]
  ^!`|
  array[[0.7, 2.9], [0.68, 4.5]]

返回:
  array[[-0.389, 4.607, -1.543, 0.892]
          ,[-0.179, 0.973, -0.250, 0.662]
          ,[-0.166, 0.689, -0.231, 0.469]
          ,[-0.179, 0.973, -0.250, 0.662]]
|^!` 双目 矩阵组播 - 单步反卷对数。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_de_log_stride_1
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select
  array[[0.7, 2.9], [0.68, 4.5]]
  |^!`
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]

返回:
  array[[-2.569, 0.217, -0.648, 1.121]
          ,[-5.579, 1.027, -4.007, 1.511]
          ,[-6.033, 1.452, -4.333, 2.134]
          ,[-5.579, 1.027, -4.007, 1.511]]
**| 双目 矩阵组播 - 单步卷积。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_2d_stride_1
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select
  array[[2.5, 1.26, 3.3], [8.6, 4.69, 9.7], [8.6, 4.69, 9.7]]
  **|
  array[[0.7, 2.9], [0.68, 4.5]]

返回:
  array[[40.3298, 28.305]
          ,[70.1122, 48.092]]
%+`| 双目 矩阵组播 - 窗口步长卷加。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_add_stride_window
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    array[2.5,  1.26,  3.3,  8.6,  4.69,  9.7,  8.6,  4.69,  9.7]  
    %+`|  
    array[0.7,  2.9,  0.68]
    
返回:
    array[3.2,  4.16,  3.98,  9.3,  7.59,  10.38,  9.3,  7.59,  10.38]
%-`| 双目 矩阵组播 - 窗口步长卷减。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_sub_stride_window
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    array[2.5,  1.26,  3.3,  8.6,  4.69,  9.7,  8.6,  4.69,  9.7]  
    %-`|  
    array[0.7,  2.9,  0.68]
    
返回:
    array[1.8,  -1.64,  2.62,  7.9,  1.79,  9.02,  7.9,  1.79,  9.02]
|-`% 双目 矩阵组播 - 窗口步长反卷减。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_de_sub_stride_window
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select  
    array[0.7,  2.9,  0.68,  4.5]  
    |-`%  
    array[2.5,  1.26,  3.3,  8.6,  4.69,  9.7,  4.69,  9.7]
    
返回:
    array[-1.8,  1.64,  -2.62,  -4.1,  -3.99,  -6.8,  -4.01,  -5.2]
%*`| 双目 矩阵组播 - 窗口步长卷乘。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_mul_stride_window
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    array[2.5,  1.26,  3.3,  8.6,  4.69,  9.7,  8.6,  4.69]  
    %*`|  
    array[0.7,  2.9,  0.68,  4.5]
    
返回:
    array[1.75,  3.654,  2.244,  38.70,  3.283,  28.13,  5.848,  21.105]
%/`| 双目 矩阵组播 - 窗口步长卷除。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_div_stride_window
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    array[2.5,  1.26,  3.3,  8.6,  4.69,  9.7,  8.6,  4.69,  9.7]  
    %/`|  
    array[0.7,  2.9,  0.68]
    
返回:
    array[3.571,  0.434,  4.853,  12.286,  1.617,  14.265,  12.286,  1.617,  14.265]
|/`% 双目 矩阵组播 - 窗口步长反卷除。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_de_div_stride_window
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select  
    array[0.7,  0.68,  4.5]  
    |/`%  
    array[2.5,  1.26,  3.3,  8.6,  4.69,  9.7,  8.6,  4.69,  9.7]
    
返回:
    array[0.280,  0.540,  1.364,  0.081,  0.145,  0.464,  0.081,  0.145,  0.464]
%^`| 双目 矩阵组播 - 窗口步长卷幂。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_pow_stride_window
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    array[2.5,  1.26,  3.3,  8.6,  4.69,  9.7,  8.6,  4.69,  9.7]  
    %^`|  
    array[0.7,  2.9,  4.5]
    
返回:
    array[1.899,  1.955,  215.433,  4.510,  88.390,  27572.288,  4.510,  88.390,  27572.288]
|^`% 双目 矩阵组播 - 窗口步长反卷幂。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_de_pow_stride_window
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select  
    array[0.7,  2.9,  0.68,  4.5]  
    |^`%  
    array[2.5,  3.3,  8.6,  4.69,  9.7,  8.6,  4.69,  9.7]
    
返回:
    array[0.410,  33.567,  0.036,  1157.622,  0.031,  9475.950,  0.164,  2168509.772]
%^!`| 双目 矩阵组播 - 窗口步长卷对数。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_log_stride_window
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    array[2.5,  1.26,  3.3,  8.6,  4.69,  9.7,  8.6,  9.7]  
    %^!`|  
    array[0.7,  2.9,  0.68,  4.5]
    
返回:
    array[-0.389,  4.607,  -0.323,  0.699,  -0.231,  0.469,  -0.179,  0.662]
|^!`% 双目 矩阵组播 - 窗口步长反卷对数。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_de_log_stride_window
入参:
  1. 窗口矩阵;
  2. 背景矩阵;
select  
    array[0.7,  2.9,  4.5]  
    |^!`%  
    array[2.5,  1.26,  3.3,  8.6,  4.69,  9.7,  8.6,  4.69,  9.7]
    
返回:
    array[-2.569,  0.217,  0.794,  -6.033,  1.452,  1.511,  -6.033,  1.452,  1.511]
%**| 双目 矩阵组播 - 窗口步长卷积。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_conv_2d_stride_window
入参:
  1. 背景矩阵;
  2. 窗口矩阵;
select  
    array[2.5,  1.26,  3.3,  8.6,  4.69,  9.7,  8.6,  4.69]  
    %**|  
    array[0.7,  2.9,  0.68,  4.5]
    
返回:
    array[46.348,  58.366]
@>| 双目 矩阵最大池化 - 单步长。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_pool_max_stride_1
入参:
  1. 背景矩阵;
  2. 窗口高宽规格;
select  
    array
    [
        [2.5,  1.26,  3.3,  2.6]
    ,  [8.6,  4.69,  9.7,  6.5]
    ,  [8.6,  4.69,  9.7,  8.55]
    ]  
    @>|  
    array[2,  2]
    
返回:
    array[[8.6,9.7,9.7],[8.6,9.7,9.7]]
@/| 双目 矩阵平均池化 - 单步长。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_pool_avg_stride_1
入参:
  1. 背景矩阵;
  2. 窗口高宽规格;
select  
    array
    [
        [2.5,  1.26,  3.3,  2.6]
    ,  [8.6,  4.69,  9.7,  6.5]
    ,  [8.6,  4.69,  9.7,  8.55]
    ]  
    @/|  
    array[2,  2]
    
返回:
    array[[4.263,4.738,5.525],[6.645,7.195,8.613]]
@`| 双目 矩阵保留不变池化 - 单步长。
协参缺省,支持一维。
等价函数: sm_sc.fv_opr_pool_none_stride_1
入参:
  1. 背景矩阵;
  2. 窗口高宽规格;
select  
    array
    [
        [2.5,  1.26,  3.3,  2.6]
    ,  [8.6,  4.69,  9.7,  6.5]
    ,  [8.6,  4.69,  9.7,  8.55]
    ]  
    @`|  
    array[2,  2]
    
返回:
    array
    [
        [2.5,1.26,1.26,3.3,3.3,2.6]
    ,  [8.6,4.69,4.69,9.7,9.7,6.5]
    ,  [8.6,4.69,4.69,9.7,9.7,6.5]
    ,  [8.6,4.69,4.69,9.7,9.7,8.55]
    ]

3. 存储过程介绍

过程名 主要操作表 过程说明
sm_sc.prc_linear_regression 1. sm_sc.tb_classify_task:
    分类任务训练任务表,用于规划任务,并存放训练出来的权重值数组;
2. sm_sc.tb_nn_train_input_buff:
    编码后的训练集数据表,用于传入训练集;
线性回归。
入参:
  1. 训练任务标识;
  2. 学习率;
  3. 规划训练次数;
  4. 损失函数梯度阈值;
sm_sc.prc_logistic_regression 1. sm_sc.tb_classify_task:
    分类任务训练任务表,用于规划任务,并存放训练出来的权重值数组;
2. sm_sc.tb_nn_train_input_buff:
    编码后的训练集数据表,用于传入训练集;
逻辑回归。
入参:
  1. 训练任务标识;
  2. 学习率;
  3. 规划训练次数;
  4. 损失函数梯度阈值;
sm_sc.prc_kmeans_pp 1. sm_sc.tb_cluster_task:
    kmean 聚类任务数据表,用于传入 kmeans 硬聚类数据集,输出聚类结果;
2. sm_sc.__vt_kmean_ods_array:
    编码后的训练集数据表,用于执行时装入数据;
3. sm_sc.tb_nn_train_input_buff:
    编码后的训练集数据表,用于传入训练集;
kmeans 硬聚类。
入参:
  1. 训练任务标识;
sm_sc.prc_dbscan_pp 1. sm_sc.tb_cluster_task:
    聚类任务数据表,用于传入 dbscan 软聚类数据集,输出聚类结果;
2. sm_sc.__vt_dbscan_ods_array:
    编码后的训练集数据表,用于执行时装入数据;
3. sm_sc.tb_nn_train_input_buff:
    编码后的训练集数据表,用于传入训练集;
dbscan 软聚类。
入参:
  1. 训练任务标识;
sm_sc.prc_nn_prepare 1. sm_sc.tb_nn_node:
    神经网络节点与属性表,用于配置神经网络节点。
    训练过程中,寄存属性参数和梯度;
深度学习任务训练准备。
入参:
  1. 训练任务标识;
  2. 规划训练次数;
sm_sc.prc_nn_train 1. sm_sc.tb_nn_node:
    神经网络节点与属性表,用于配置神经网络节点。
    训练过程中,寄存属性参数和梯度;
2. sm_sc.tb_nn_path:
    神经网络路径表,用于配置神经网络传播路径;
3.sm_sc.__vt_nn_node:
    神经网络节点与属性表,导出模型,存放训练好的属性参数;
4.sm_sc.__vt_nn_path:
    神经网络路径表,导出模型,存放网络结构;
深度学习任务训练执行。
入参:
  1. 训练任务标识;
  2. 学习率;
  3. 损失函数梯度阈值;
  2. 是否启用 ADAM;
sm_sc.prc_nn_add_sess 1. sm_sc.__vt_nn_sess:
    神经网络 session 资源池,用于部署 session 连接资源;
2. sm_sc.__vt_tmp_nn_node:
    神经网络节点与属性表,用于预测访问;
神经网络模型部署,增加连接资源。
入参:
  1. 神经网络模型标识;
  2. 部署 session 数量;
sm_sc.prc_nn_del_sess 1. sm_sc.__vt_nn_sess:
    神经网络 session 资源池,用于部署 session 连接资源;
2. sm_sc.__vt_tmp_nn_node:
    神经网络节点与属性表,用于预测访问;
神经网络模型清理,注销连接资源。
入参:
  1. 神经网络模型标识;
  2. 要注销的 session 数值范围;
sm_sc.prc_nn_subscribe_sess 1. sm_sc.__vt_nn_sess:
    神经网络 session 资源池,用于部署 session 连接资源;
访问模型,申请一个 session 资源。
入参:
  1. 神经网络模型标识;
出参:
  1. 申请到的 session 标记;
sm_sc.prc_nn_release_sess 1. sm_sc.__vt_nn_sess:
    神经网络 session 资源池,用于部署 session 连接资源;
访问模型结束,释放 session 资源。
入参:
  1. 神经网络模型标识;
  2. 要释放的 session 标记;

4. 神经网络节点支持运算类型

pg4ml 神经网络双目运算算子通常支持广播类型,也通常要求双目以及以上的所有入参维度数对齐,即:维度长度不相等可广播的同时,维度数相等。

lambda 命名,即运算类型 调用函数 运算目数 是否配置协参 是否支持求导 求导函数 是否求因变量对自变量导数 求导是否需要自变量 求导是否需要另一自变量 求导是否需要因变量 求导是否用到自变量高宽规格 训练集输入集合是否变化
00_full_dataset 1 是,
但不需要手动配置
00_const 0
00_buff_slice_rand_pick sm_sc.
ft_nn_buff_slice_rand_pick
1
00_none sm_sc.
fv_nn_none
1 sm_sc.
fv_d_nn_none_dloss_dindepdt
01_add sm_sc.
fv_opr_add
2 sm_sc.
fv_d_add
01_mul sm_sc.
fv_opr_mul
2 sm_sc.
fv_d_mul
01_sub sm_sc.
fv_opr_sub
2 第一目:
  sm_sc.
  fv_d_sub_1
第二目:
  sm_sc.
  fv_d_sub_2
01_0sub sm_sc.
fv_opr_sub
1 sm_sc.
fv_d_sub_2
01_div sm_sc.
fv_opr_div
2 第一目:
  sm_sc.
  fv_d_div_1
第二目:
  sm_sc.
  fv_d_div_2_un_de_broadcast
第二目:是 第一目:是
第二目:是
01_1div sm_sc.
fv_opr_div
1 sm_sc.
fv_d_div_2_un_de_broadcast
01_pow sm_sc.
fv_opr_pow
2 第一目:
  sm_sc.
  fv_d_pow_1_un_de_broadcast
第二目:
  sm_sc.
  fv_d_pow_2_un_de_broadcast
第一目:是
第一目:是
第二目:是
第一目:是
第二目:是
01_log sm_sc.
fv_opr_log
2 第一目:
  sm_sc.
  fv_d_log_1_un_de_broadcast
第二目:
  sm_sc.
  fv_d_log_2_un_de_broadcast
第一目:是
第二目:是
第一目:是
第二目:是
第一目:是
01_exp sm_sc.
fv_opr_exp
1 sm_sc.
fv_d_exp
01_ln sm_sc.
fv_opr_ln
1 sm_sc.
fv_d_ln
01_abs sm_sc.
fv_opr_abs
1 sm_sc.
fv_d_abs
01_prod_mx sm_sc.
fv_opr_prod_mx_py
2 是,
只需配置第二目的高宽,即:协参第二位、第三位
第一目:
  sm_sc.
  fv_d_prod_mx_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_prod_mx_dloss_dindepdt_2
第一目:是
第二目:是
第一目:是
第二目:是
01_chunk_prod_mx sm_sc.
fv_chunk_prod_mx
2 第一目:
  sm_sc.
  fv_d_chunk_prod_mx_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_chunk_prod_mx_dloss_dindepdt_2
第一目:是
第二目:是
02_sin sm_sc.
fv_sin
1 sm_sc.
fv_d_sin
02_cos sm_sc.
fv_cos
1 sm_sc.
fv_d_cos
02_tan sm_sc.
fv_tan
1 sm_sc.
fv_d_tan
02_cot sm_sc.
fv_cot
1 sm_sc.
fv_d_cot
02_sec sm_sc.
fv_sec
1 sm_sc.
fv_d_sec
02_csc sm_sc.
fv_csc
1 sm_sc.
fv_d_csc
02_asin sm_sc.
fv_asin
1 sm_sc.
fv_d_asin
02_acos sm_sc.
fv_acos
1 sm_sc.
fv_d_acos
02_atan sm_sc.
fv_atan
1 sm_sc.
fv_d_atan
02_acot sm_sc.
fv_acot
1 sm_sc.
fv_d_acot
02_sinh sm_sc.
fv_sinh
1 sm_sc.
fv_d_sinh
02_cosh sm_sc.
fv_cosh
1 sm_sc.
fv_d_cosh
02_tanh sm_sc.
fv_tanh
1 sm_sc.
fv_d_tanh
02_asinh sm_sc.
fv_asinh
1 sm_sc.
fv_d_asinh
02_acosh sm_sc.
fv_acosh
1 sm_sc.
fv_d_acosh
02_atanh sm_sc.
fv_atanh
1 sm_sc.
fv_d_atanh
03_sigmoid sm_sc.
fv_activate_sigmoid
1 sm_sc.
fv_d_activate_sigmoid
03_relu sm_sc.
fv_activate_relu
1 sm_sc.
fv_d_activate_relu
03_leaky_relu sm_sc.
fv_activate_leaky_relu
1 sm_sc.
fv_d_activate_leaky_relu
03_elu sm_sc.
fv_activate_elu
1 sm_sc.
fv_d_activate_elu
03_selu sm_sc.
fv_activate_selu
1 sm_sc.
fv_d_activate_selu
03_gelu sm_sc.
fv_activate_gelu
1 sm_sc.
fv_d_activate_gelu
03_swish sm_sc.
fv_activate_swish
1 sm_sc.
fv_d_activate_swish
03_softplus sm_sc.
fv_activate_softplus
1 sm_sc.
fv_d_activate_softplus
03_boxcox sm_sc.
fv_activate_boxcox
1 sm_sc.
fv_d_activate_boxcox
03_softmax sm_sc.
fv_redistr_softmax
1 sm_sc.
fv_d_redistr_softmax_dloss_dindepdt
03_zscore sm_sc.
fv_redistr_zscore
1 sm_sc.
fv_d_redistr_zscore
04_new sm_sc.
fv_new
1 sm_sc.
fv_d_new_dloss_dindepdt
04_apad sm_sc.
fv_apad
2 第一目:
  sm_sc.
  fv_d_apad_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_apad_dloss_dindepdt_2
04_bpad sm_sc.
fv_bpad
2 第一目:
  sm_sc.
  fv_d_bpad_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_bpad_dloss_dindepdt_2
04_lpad sm_sc.
fv_lpad
2 第一目:
  sm_sc.
  fv_d_lpad_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_lpad_dloss_dindepdt_2
04_rpad sm_sc.
fv_rpad
2 第一目:
  sm_sc.
  fv_d_rpad_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_rpad_dloss_dindepdt_2
04_transpose sm_sc.
fv_opr_transpose
1 sm_sc.
fv_d_transpose_dloss_dindepdt
04_transpose_i sm_sc.
fv_opr_transpose_i
1 sm_sc.
fv_d_transpose_i_dloss_dindepdt
04_transpose_3d sm_sc.
fv_opr_transpose_3d
1 sm_sc.
fv_d_transpose_3d_dloss_dindepdt
04_turn_90 sm_sc.
fv_opr_turn_90
1 sm_sc.
fv_d_turn_90_dloss_dindepdt
04_turn_180 sm_sc.
fv_opr_turn_180
1 sm_sc.
fv_d_turn_180_dloss_dindepdt
04_mirror sm_sc.
fv_opr_mirror
1 sm_sc.
fv_d_mirror_dloss_dindepdt
04_mx_ele_3d_2_2d sm_sc.
fv_mx_ele_3d_2_2d
1 sm_sc.
fv_d_mx_ele_3d_2_2d_dloss_dindepdt
04_mx_ele_2d_2_3d sm_sc.
fv_mx_ele_2d_2_3d
1 sm_sc.
fv_d_mx_ele_2d_2_3d_dloss_dindepdt
04_mx_slice_3d_2_2d sm_sc.
fv_mx_slice_3d_2_2d
1 sm_sc.
fv_d_mx_slice_3d_2_2d_dloss_dindepdt
04_mx_slice_4d_2_2d sm_sc.
fv_mx_slice_4d_2_2d
1 sm_sc.
fv_d_mx_slice_4d_2_2d_dloss_dindepdt
04_mx_slice_4d_2_3d sm_sc.
fv_mx_slice_4d_2_3d
1 sm_sc.
fv_d_mx_slice_4d_2_3d_dloss_dindepdt
04_mx_ascend_dim sm_sc.
fv_mx_ascend_dim
1 sm_sc.
fv_d_mx_ascend_dim_dloss_dindepdt
04_mx_descend_dim sm_sc.
fv_mx_descend_dim
1 sm_sc.
fv_d_mx_descend_dim_dloss_dindepdt
04_rand_pick_y sm_sc.
fv_rand_slice_y_pick
1
04_rand_pick_x sm_sc.
fv_rand_slice_x_pick
1
04_rand_pick_x3 sm_sc.
fv_rand_slice_x3_pick
1
04_rand_pick_x4 sm_sc.
fv_rand_slice_x4_pick
1
04_chunk sm_sc.
fv_chunk
1 sm_sc.
fv_d_chunk_dloss_dindepdt
04_slice_y sm_sc.
fv_slice_y
1 sm_sc.
fv_d_slice_y_dloss_dindepdt
04_slice_x sm_sc.
fv_slice_x
1 sm_sc.
fv_d_slice_x_dloss_dindepdt
04_slice_x3 sm_sc.
fv_slice_x3
1 sm_sc.
fv_d_slice_x3_dloss_dindepdt
04_slice_x4 sm_sc.
fv_slice_x4
1 sm_sc.
fv_d_slice_x4_dloss_dindepdt
04_sample_y sm_sc.
fv_sample_y
1 是,当前不支持第二目 sm_sc.
fv_d_sample_y_dloss_dindepdt_1
04_sample_x sm_sc.
fv_sample_x
1 是,当前不支持第二目 sm_sc.
fv_d_sample_x_dloss_dindepdt_1
04_sample_x3 sm_sc.
fv_sample_x3
1 是,当前不支持第二目 sm_sc.
fv_d_sample_x3_dloss_dindepdt_1
04_sample_x4 sm_sc.
fv_sample_x4
1 是,当前不支持第二目 sm_sc.
fv_d_sample_x4_dloss_dindepdt_1
04_lower_tri_mx sm_sc.
fv_lower_tri_mx
1 sm_sc.
fv_d_lower_tri_mx_dloss_dindepdt
04_upper_tri_mx sm_sc.
fv_upper_tri_mx
1 sm_sc.
fv_d_upper_tri_mx_dloss_dindepdt
04_lower_tri_mx_ex sm_sc.
fv_lower_tri_mx_ex
1 sm_sc.
fv_d_lower_tri_mx_ex_dloss_dindepdt
04_upper_tri_mx_ex sm_sc.
fv_upper_tri_mx_ex
1 sm_sc.
fv_d_upper_tri_mx_ex_dloss_dindepdt
04_lmask sm_sc.
fv_lmask
1 是,当前不支持第二目 sm_sc.
fv_d_lmask_dloss_dindepdt_1
第一目:是
04_rmask sm_sc.
fv_rmask
1 是,当前不支持第二目 sm_sc.
fv_d_rmask_dloss_dindepdt_1
第一目:是
04_amask sm_sc.
fv_amask
1 是,当前不支持第二目 sm_sc.
fv_d_amask_dloss_dindepdt_1
第一目:是
04_bmask sm_sc.
fv_bmask
1 是,当前不支持第二目 sm_sc.
fv_d_bmask_dloss_dindepdt_1
第一目:是
05_pool_max_2d_grp_x sm_sc.
fv_pool_max_2d_grp_x
1 sm_sc.
fv_d_pool_max_grp_x_dloss_dindepdt
05_pool_avg_2d_grp_x sm_sc.
fv_pool_avg_2d_grp_x
1 sm_sc.
fv_d_pool_avg_grp_x_dloss_dindepdt
05_pool_max sm_sc.
fv_pool_max
1 sm_sc.
fv_d_pool_max_dloss_dindepdt
05_pool_avg sm_sc.
fv_pool_avg
1 sm_sc.
fv_d_pool_avg_dloss_dindepdt
05_pool_none sm_sc.
fv_pool_none
1 sm_sc.
fv_d_pool_none_dloss_dindepdt
05_conv_2d_grp_x sm_sc.
fv_conv_2d_grp_x
2 第一目:
  sm_sc.
  fv_d_conv_2d_grp_x_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_2d_grp_x_dloss_dindepdt_2
第一目:是
第二目:是
05_conv_2d sm_sc.
fv_conv_2d_v_im2col
2 或 3 第一目:
  sm_sc.
  fv_d_conv_2d_dloss_dindepdt_1_ex
第二目:
  sm_sc.
  fv_d_conv_2d_dloss_dindepdt_2
第三目:
  sm_sc.
  fv_d_conv_2d_dloss_dindepdt_3
第一目:是
第二目:是
第三目:是
05_conv_add sm_sc.
fv_conv_add
2 第一目:
  sm_sc.
  fv_d_conv_add_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_add_dloss_dindepdt_2
第一目:是
第二目:是
05_conv_sub sm_sc.
fv_conv_sub
2 第一目:
  sm_sc.
  fv_d_conv_sub_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_sub_dloss_dindepdt_2
第一目:是
第二目:是
05_conv_mul sm_sc.
fv_conv_mul
2 第一目:
  sm_sc.
  fv_d_conv_mul_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_mul_dloss_dindepdt_2
第一目:是
第二目:是
第一目:是
第二目:是
05_conv_div sm_sc.
fv_conv_div
2 第一目:
  sm_sc.
  fv_d_conv_div_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_div_dloss_dindepdt_2
第二目:是 第一目:是
第二目:是
第一目:是
05_conv_pow sm_sc.
fv_conv_pow
2 第一目:
  sm_sc.
  fv_d_conv_pow_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_pow_dloss_dindepdt_2
第一目:是
第二目:是
第一目:是
第二目:是
第一目:是
第二目:是
05_conv_log sm_sc.
fv_conv_log
2 第一目:
  sm_sc.
  fv_d_conv_log_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_log_dloss_dindepdt_2
第一目:是
第二目:是
第一目:是
第二目:是
第一目:是
05_conv_prod_mx sm_sc.
fv_conv_prod_mx
2 第一目:
  sm_sc.
  fv_d_conv_prod_mx_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_prod_mx_dloss_dindepdt_2
第一目:是
第二目:是
第一目:是
第二目:是
05_conv_de_sub sm_sc.
fv_conv_de_sub
2 第一目:
  sm_sc.
  fv_d_conv_de_sub_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_de_sub_dloss_dindepdt_2
第一目:是
第二目:是
05_conv_de_div sm_sc.
fv_conv_de_div
2 第一目:
  sm_sc.
  fv_d_conv_de_div_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_de_div_dloss_dindepdt_2
第二目:是 第一目:是
第二目:是
第一目:是
05_conv_de_pow sm_sc.
fv_conv_de_pow
2 第一目:
  sm_sc.
  fv_d_conv_de_pow_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_de_pow_dloss_dindepdt_2
第一目:是
第二目:是
第一目:是
第二目:是
第一目:是
第二目:是
05_conv_de_log sm_sc.
fv_conv_de_log
2 第一目:
  sm_sc.
  fv_d_conv_de_log_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_de_log_dloss_dindepdt_2
第一目:是
第二目:是
第一目:是
第二目:是
第一目:是
05_conv_de_prod_mx sm_sc.
fv_conv_de_prod_mx
2 第一目:
  sm_sc.
  fv_d_conv_de_prod_mx_dloss_dindepdt_1
第二目:
  sm_sc.
  fv_d_conv_de_prod_mx_dloss_dindepdt_2
第一目:是
第二目:是
第一目:是
第二目:是
06_aggr_mx_sum sm_sc.
fa_mx_sum
n sm_sc.
fv_d_mx_sum
06_aggr_mx_prod sm_sc.
fa_mx_prod
n sm_sc.
fv_d_mx_prod
06_aggr_mx_avg sm_sc.
fa_mx_avg
n 是,
但不需要手动配置
sm_sc.
fv_d_mx_avg
06_aggr_mx_max sm_sc.
fa_mx_max
n sm_sc.
fv_d_mx_max
06_aggr_mx_min sm_sc.
fa_mx_min
n sm_sc.
fv_d_mx_min
06_aggr_mx_concat_y sm_sc.
fa_mx_concat_y
n 是,
但不需要手动配置
sm_sc.
fv_d_mx_concat_y_dloss_dindepdt_n
06_aggr_mx_concat_x sm_sc.
fa_mx_concat_x
n 是,
但不需要手动配置
sm_sc.
fv_d_mx_concat_x_dloss_dindepdt_n
06_aggr_mx_concat_x3 sm_sc.
fa_mx_concat_x3
n 是,
但不需要手动配置
sm_sc.
fv_d_mx_concat_x3_dloss_dindepdt_n
06_aggr_mx_concat_x4 sm_sc.
fa_mx_concat_x4
n 是,
但不需要手动配置
sm_sc.
fv_d_mx_concat_x4_dloss_dindepdt_n
07_aggr_slice_sum sm_sc.
fv_aggr_slice_sum
1 sm_sc.
fv_d_aggr_slice_sum_dloss_dindepdt
07_aggr_slice_prod sm_sc.
fv_aggr_slice_prod
1 sm_sc.
fv_d_aggr_slice_prod_dloss_dindepdt
07_aggr_slice_avg sm_sc.
fv_aggr_slice_avg
1 sm_sc.
fv_d_aggr_slice_avg_dloss_dindepdt
07_aggr_slice_max sm_sc.
fv_aggr_slice_max
1 sm_sc.
fv_d_aggr_slice_max_dloss_dindepdt
07_aggr_slice_min sm_sc.
fv_aggr_slice_min
1 sm_sc.
fv_d_aggr_slice_min_dloss_dindepdt
07_aggr_chunk_sum sm_sc.
fv_aggr_chunk_sum
1 sm_sc.
fv_d_aggr_chunk_sum_dloss_dindepdt
07_aggr_chunk_prod sm_sc.
fv_aggr_chunk_prod
1 sm_sc.
fv_d_aggr_chunk_prod_dloss_dindepdt
07_aggr_chunk_avg sm_sc.
fv_aggr_chunk_avg
1 sm_sc.
fv_d_aggr_chunk_avg_dloss_dindepdt
07_aggr_chunk_max sm_sc.
fv_aggr_chunk_max
1 sm_sc.
fv_d_aggr_chunk_max_dloss_dindepdt
07_aggr_chunk_min sm_sc.
fv_aggr_chunk_min
1 sm_sc.
fv_d_aggr_chunk_min_dloss_dindepdt
GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>.

简介

这是使用 postgresql v14 实现的,使用 plpgsql 编写的机器学习框架 展开 收起
SQL 等 2 种语言
AGPL-3.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
SQL
1
https://gitee.com/guotiecheng/plpgsql_pg4ml.git
git@gitee.com:guotiecheng/plpgsql_pg4ml.git
guotiecheng
plpgsql_pg4ml
plpgsql_pg4ml
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891