capacitor type for bpat
This commit is contained in:
parent
1480e1fab6
commit
a643447fad
@ -7,12 +7,13 @@ using MacroTools, Lazy, Flow
|
|||||||
export Model, back!, update!
|
export Model, back!, update!
|
||||||
|
|
||||||
abstract Model
|
abstract Model
|
||||||
abstract Capacitor <: Model
|
|
||||||
abstract Activation <: Model
|
abstract Activation <: Model
|
||||||
|
|
||||||
back!(m::Model, ∇) = error("Backprop not implemented for $(typeof(m))")
|
back!(m::Model, ∇) = error("Backprop not implemented for $(typeof(m))")
|
||||||
update!(m::Model, η) = m
|
update!(m::Model, η) = m
|
||||||
|
|
||||||
|
include("capacitor.jl")
|
||||||
|
|
||||||
include("compiler/diff.jl")
|
include("compiler/diff.jl")
|
||||||
include("compiler/loop.jl")
|
include("compiler/loop.jl")
|
||||||
include("compiler/code.jl")
|
include("compiler/code.jl")
|
||||||
|
8
src/capacitor.jl
Normal file
8
src/capacitor.jl
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
type Capacitor{T}
|
||||||
|
Δs::Vector{T}
|
||||||
|
end
|
||||||
|
|
||||||
|
type Patch{T}
|
||||||
|
η::Float32
|
||||||
|
Δs::Capacitor{T}
|
||||||
|
end
|
@ -1,6 +1,6 @@
|
|||||||
export Sequence
|
export Sequence
|
||||||
|
|
||||||
type Sequence <: Capacitor
|
type Sequence
|
||||||
layers::Vector{Model}
|
layers::Vector{Model}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user