Train a torch model using one GPU and the shared memory
I am new to training pytorch models
and on GPU
I have tried training it on windows, but was always use the dedicated memory (10GB) and does not utilise the shared memory
I have tried  enhancing its performance using multiprocessing, but I kept getting the error :
TypeError: cannot pickle 'module' object
The solution usually is to use num_wrokers =0 while loading the data
I actually use the multiprocessing after loading the data
And need only to utilise the shared memory
I am retraing meta-sr speaker verification code, specifically the training file:
https://github.com/seongmin-kye/meta-SR/blob/b4c1ea1728e33f7bbf7015c38f508f24594f3f88/train.py
I have edited the line 92 to use the shared GPU memory as the following
instead of:
train(train_generator, model, objective, optimizer, n_episode, log_dir, scheduler)
To:
    model.share_memory()
    p = mp.Process(target=train, args=(train_generator,model,objective, optimizer, n_episode, log_dir, scheduler))
    p.num_workers=0
    p.start()
    p.join()


Please let me know if more information shall be added
Thanks in advance

The shared memory (part of RAM) can be used only if there are two GPUs in PC
and this case there was only one GPU
