我需要将 Vector 乘以 RowVector 以获得 Matrix 作为结果。但是 F# 库没有针对 * 运算符的这种实现。我怎样才能做到这一点?
//wj(t+1)=wj(t) - a * (yk-dk)* xjk
let weightsDeltaRule (w : matrix, x : vector, y : vector, d : vector) (a : float) =
let delta = y - d
w - a * (Vector.transpose x) * delta
升级版:
vector<'T> * rowvec<'T> -> matrix<'T>
rowvec<'T> * vector<'T> -> 'T