Reputation: 1096
I am trying to get this to run in google colab https://github.com/oawiles/X2Face/blob/master/UnwrapMosaic/Face2Face_UnwrapMosaic.ipynb,
I was able to get it to run and display results once but since then lately I have been getting your session crashed after using all available RAM at this cell
BASE_MODEL = '/scratch/shared/slow/ow/eccv/2018/release_models/' # Change to your path
state_dict = torch.load(BASE_MODEL + 'x2face_model.pth')
model = UnwrappedFaceWeightedAverage(output_num_channels=2, input_num_channels=3, inner_nc=128)
model.load_state_dict(state_dict['state_dict'])
model = model.cuda()
model = model.eval()
im not sure if it is a colab issue or not
here is the logs
warn("IPython.utils.traitlets has moved to a top-level traitlets package.")
/usr/local/lib/python2.7/dist-packages/IPython/utils/traitlets.py:5: UserWarning: IPython.utils.traitlets has moved to a top-level traitlets package.
Upvotes: 2
Views: 2098
Reputation: 311
My experience is to shift to the CPU colab version, run the codes
And then switch to the GPU colab version
The codes run smoothly after these operations.
Upvotes: 1
Reputation: 11
Try to change settings,
Go to run-time->change run-time type->hardware accelerator->select option GPU or TPU
I think this might help.
Upvotes: 1