# Neural Nets training with multiple Chains Lux.jl and LuxCUDA.jl: LoadError: AssertionError: length(init\_params) == length(depvars) when using multi chains in NeuralPDE.jl GPU example

**URL:** <https://discourse.julialang.org/t/neural-nets-training-with-multiple-chains-lux-jl-and-luxcuda-jl-loaderror-assertionerror-length-init-params-length-depvars-when-using-multi-chains-in-neuralpde-jl-gpu-example/116501>\
**Category:** New to Julia\
**Tags:** gpu, neural-network, lux\
**Created:** [July 2, 2024, 2:55am UTC](https://discourse.julialang.org/t/neural-nets-training-with-multiple-chains-lux-jl-and-luxcuda-jl-loaderror-assertionerror-length-init-params-length-depvars-when-using-multi-chains-in-neuralpde-jl-gpu-example/116501 "2024-07-02T02:55:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BakChin-Hwa](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@BakChin-Hwa](https://discourse.julialang.org/u/BakChin-Hwa)\
**Post date:** [July 2, 2024, 5:39am UTC](https://discourse.julialang.org/t/neural-nets-training-with-multiple-chains-lux-jl-and-luxcuda-jl-loaderror-assertionerror-length-init-params-length-depvars-when-using-multi-chains-in-neuralpde-jl-gpu-example/116501/2 "2024-07-02T05:39:55Z")

</div>

It seems that I have the same problem as Leo ([Neural Nets training with multiple Chains Lux.jl and CUDA.jl](https://discourse.julialang.org/t/neural-nets-training-with-multiple-chains-lux-jl-and-cuda-jl/88167)), but its solution does not work for me. First, CUDA has been replaced by LuxCUDA in the current version. Second, even after I changed to LuxCUDA and changed ‘gpu’ to ‘gpud’, the scalar error is still reported.

---

_[View the full topic](https://discourse.julialang.org/t/neural-nets-training-with-multiple-chains-lux-jl-and-luxcuda-jl-loaderror-assertionerror-length-init-params-length-depvars-when-using-multi-chains-in-neuralpde-jl-gpu-example/116501)._
