Flux.jl issues

You’re creating new convolution layers in the closures every time you call your model. I believe the error you’re seeing is Zygote is trying to differentiate through the constructors; move the Conv(...) calls outside of the closures.

Try replacing the layer

boardmove -> (Conv((2,2), 1=>64, relu)(boardmove[1]), boardmove[2])

with

c1 = Conv((2,2), 1=>64, relu) # first make the conv layer

boardmove -> (c1(boardmove[1]), boardmove[2]) # then wrap it in a closure

and similarly for the other layer.

2 Likes