@Eldho.Ashna wrote:
Hi everyone.
I’m new to JUlia programming language. I was trying to create my own model for MNIST classification using Flux.
Below is my code:model = Chain( Conv((2,2), 1=>16, relu), x -> maxpool(x, (2,2)), Conv((2,2), 16=>8, relu), x -> maxpool(x, (2,2)), x -> reshape(x, :, size(x, 4)), Dense(288, 10), softmax) |> gpu
My Graphics card is not compatible for Flux. Hence, i can only use cpu. If I run the above code it shows error regarding the GPU. But, when i change the gpu to cpu in the above code, it shows the following error:
invalid redefinition of constant model
Why is it showing this error? According to my knowledge, this code should run when it is changed to cpu.
I copied this code from:
https://www.linkedin.com/pulse/creating-deep-neural-network-model-learn-handwritten-digits-mike-gold/Can someone help me.
Thanking you in advance.
Posts: 9
Participants: 3