move op
This commit is contained in:
parent
e4a6ca5f9e
commit
6ac4dd8429
@ -35,13 +35,6 @@ graph(::DataFlow.Group, xs...) = (xs...,)
|
|||||||
graph(params::Associative, c::Conv2D, x) =
|
graph(params::Associative, c::Conv2D, x) =
|
||||||
nn.conv2d(x, graph(params, c.filter), [1,c.stride...,1], "VALID")
|
nn.conv2d(x, graph(params, c.filter), [1,c.stride...,1], "VALID")
|
||||||
|
|
||||||
type Op
|
|
||||||
f
|
|
||||||
shape
|
|
||||||
end
|
|
||||||
|
|
||||||
Op(f) = Op(f, (d...) -> nothing)
|
|
||||||
|
|
||||||
graph(op::Op, xs...) = op.f(xs...)
|
graph(op::Op, xs...) = op.f(xs...)
|
||||||
Flux.shape(op::Op, d...) = op.shape(d...)
|
Flux.shape(op::Op, d...) = op.shape(d...)
|
||||||
|
|
||||||
|
@ -5,6 +5,13 @@ import Flux: accuracy, spliceinputs, detuple
|
|||||||
|
|
||||||
export tf
|
export tf
|
||||||
|
|
||||||
|
type Op
|
||||||
|
f
|
||||||
|
shape
|
||||||
|
end
|
||||||
|
|
||||||
|
Op(f) = Op(f, (d...) -> nothing)
|
||||||
|
|
||||||
include("graph.jl")
|
include("graph.jl")
|
||||||
include("model.jl")
|
include("model.jl")
|
||||||
include("recurrent.jl")
|
include("recurrent.jl")
|
||||||
|
Loading…
Reference in New Issue
Block a user