add zit_cumulative

This commit is contained in:
ton
2023-08-19 06:22:03 +07:00
parent 57373621b8
commit f656c62266
2 changed files with 5 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ Base.@kwdef mutable struct kfn_1 <: knowledgeFn
learningStage::Union{AbstractArray, Nothing} = nothing # 0 inference, 1 start, 2 during, 3 end learning
inputSize::Union{AbstractArray, Nothing} = nothing
zit::Union{AbstractArray, Nothing} = nothing # 3D activation matrix
zit_cumulative::Union{AbstractArray, Nothing} = nothing
modelError::Union{AbstractArray, Nothing} = nothing # store RSNN error
outputError::Union{AbstractArray, Nothing} = nothing # store output neurons error
@@ -175,6 +176,7 @@ function kfn_1(params::Dict; device=cpu)
# activation matrix
kfn.zit = zeros(row, col, batch) |> device
kfn.zit_cumulative = (similar(kfn.zit) .= 0) |> device
kfn.modelError = zeros(1) |> device
# ---------------------------------------------------------------------------- #