adding kfn
This commit is contained in:
41
src/type.jl
41
src/type.jl
@@ -1,8 +1,12 @@
|
||||
module type
|
||||
|
||||
# export
|
||||
export
|
||||
# struct
|
||||
kfn
|
||||
|
||||
using CUDA, Random
|
||||
# function
|
||||
|
||||
using Random
|
||||
|
||||
#------------------------------------------------------------------------------------------------100
|
||||
|
||||
@@ -25,40 +29,13 @@ Base.@kwdef mutable struct kfn <: knowledgeFn
|
||||
end
|
||||
|
||||
function kfn(kfnParams::Dict)
|
||||
kfn = kfn()
|
||||
kfn.kfnParams = kfnParams
|
||||
kfn.knowledgeFnName = kfn.kfnParams[:knowledgeFnName]
|
||||
kfn_1 = kfn()
|
||||
kfn_1.params = kfnParams
|
||||
|
||||
if kfn.kfnParams[:computeNeuronNumber] < kfn.kfnParams[:totalInputPort]
|
||||
if kfn_1.params[:computeNeuronNumber] < kfn_1.params[:totalInputPort]
|
||||
throw(error("number of compute neuron must be greater than input neuron"))
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
error("debug end")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user