What is the relation between gluon api and symbol api?


I want to know the relation between gluon api and symbol api ,
what are some detailes,
as some example show, symbol use module to init weights and optimizer
gluon can use trainer to do it.

for a code mix gluon and symbol (for example, gluon.nn.Conv2d and sym.Convolution )
how can i unify them into a module and passed training

if a use gluon api output as symbol api input it may works, that the gluon output
is solely a symbol object, and i used mixed conclusion of symbol (with gluon api in it)
and use list_arguments the weight produce by gluon api in the arguments,
so can I use module to init the final symbol and train it ?


Hi @svjack

I recommend using Gluon API unless there is a specific reason you need to use Module API (with Symbol).

Under the hood Gluon API uses both NDArray and Symbol. When using gluon.nn layers such as gluon.nn.Conv2d they use NDArray by default (since it’s easier to debug) and then when you call hybridize on your model this switches to use Symbol (for performance).