remove this part of the code (the ctx parameter in initialize takes care of it):
    model.collect_params().reset_ctx(ctx)
also, move your data to gpu when you want to train:
        for X_batch, Y_batch in data_loader:
            X_batch = X_batch.as_in_context(ctx)
            Y_batch = Y_batch.as_in_context(ctx)





---
[Visit 
Topic](https://discuss.mxnet.apache.org/t/correct-way-to-train-sequential-model-on-gpu/6848/2)
 or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.mxnet.apache.org/email/unsubscribe/faeb7986d4b42e32efae464d1eb802573ee21a776e17f39fdd7532197463b3d9).

Reply via email to