refractoring

This commit is contained in:
2023-05-10 20:38:23 +07:00
commit 7c4a0dfa6f
15 changed files with 3195 additions and 0 deletions

89
src/Ironpen.jl Normal file
View File

@@ -0,0 +1,89 @@
module Ironpen
export kfn_1
""" Order by dependencies of each file. The 1st included file must not depend on any other
files and each file can only depend on the file included before it.
"""
include("types.jl")
using .types # bring model into this module namespace (this module is a parent module)
include("snn_utils.jl")
using .snn_utils
# include("Save_and_load.jl")
# using .Save_and_load
# include("DB_services.jl")
# using .DB_services
include("forward.jl")
using .forward
include("learn.jl")
using .learn
include("readout.jl")
using .readout
include("interface.jl")
using .interface
#------------------------------------------------------------------------------------------------100
"""
Todo:
[*3] no "start learning" use reset learning and "inference", "learning" mode instead
[4] add time-based learning method. Also implement "thinking period"
[5] verify that model can complete learning cycle with no error
[6] neuroplasticity() with synaptic connection strength concept
[] using RL to control learning signal
[] consider using Dates.now() instead of timestamp because time_stamp may overflow
[] training should include adjusting α, neuron membrane potential decay factor
which defined by neuron.tau_m formular in type.jl
[DONE] each knowledgeFn should have its own noise generater
[DONE] where to put pseudo derivative (n.phi)
[DONE] add excitatory, inhabitory to neuron
Change from version: v06_36a
-
All features
- multidispatch + for loop as main compute method
- hard connection constrain yes
- normalize output yes
- allow -w_rec yes
- voltage drop when neuron fires voltage drop equals to vth
- v_t decay during refractory
duration exponantial decay
- input data population encoding, each pixel data =>
population encoding, ralative between pixel data
- compute neuron weight init rand()
- output neuron weight init randn()
"""
end # module end