2016-12-15 22:31:39 +00:00
|
|
|
xs = randn(10)' # TODO: batching semantics
|
|
|
|
|
|
|
|
d = Affine(10, 20)
|
|
|
|
|
|
|
|
@test d(xs) == xs*d.W.x + d.b.x
|
2016-12-15 23:11:35 +00:00
|
|
|
|
|
|
|
@testset begin
|
|
|
|
@capture(syntax(d), x_[1] * W_ + b_)
|
|
|
|
@test isa(x, Input)
|
|
|
|
@test isa(W, Param)
|
|
|
|
@test isa(b, Param)
|
|
|
|
end
|