adding kfn
This commit is contained in:
@@ -11,7 +11,7 @@ include("type.jl")
|
|||||||
using .type # bring model into this module namespace (this module is a parent module)
|
using .type # bring model into this module namespace (this module is a parent module)
|
||||||
|
|
||||||
include("snnUtils.jl")
|
include("snnUtils.jl")
|
||||||
using .snn_utils
|
using .snnUtils
|
||||||
|
|
||||||
include("interface.jl")
|
include("interface.jl")
|
||||||
using .interface
|
using .interface
|
||||||
@@ -39,4 +39,42 @@ using .interface
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end # module IronpenGPU
|
end # module IronpenGPU
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ module interface
|
|||||||
|
|
||||||
# export
|
# export
|
||||||
|
|
||||||
using Flux, CUDA
|
# using Flux, CUDA
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------100
|
#------------------------------------------------------------------------------------------------100
|
||||||
|
|
||||||
|
|||||||
41
src/type.jl
41
src/type.jl
@@ -1,8 +1,12 @@
|
|||||||
module type
|
module type
|
||||||
|
|
||||||
# export
|
export
|
||||||
|
# struct
|
||||||
|
kfn
|
||||||
|
|
||||||
using CUDA, Random
|
# function
|
||||||
|
|
||||||
|
using Random
|
||||||
|
|
||||||
#------------------------------------------------------------------------------------------------100
|
#------------------------------------------------------------------------------------------------100
|
||||||
|
|
||||||
@@ -25,40 +29,13 @@ Base.@kwdef mutable struct kfn <: knowledgeFn
|
|||||||
end
|
end
|
||||||
|
|
||||||
function kfn(kfnParams::Dict)
|
function kfn(kfnParams::Dict)
|
||||||
kfn = kfn()
|
kfn_1 = kfn()
|
||||||
kfn.kfnParams = kfnParams
|
kfn_1.params = kfnParams
|
||||||
kfn.knowledgeFnName = kfn.kfnParams[:knowledgeFnName]
|
|
||||||
|
|
||||||
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"))
|
throw(error("number of compute neuron must be greater than input neuron"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
error("debug end")
|
error("debug end")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user