oawiles / X2Face

Pytorch code for ECCV 2018 paper
MIT License
246 stars 58 forks source link

out of ram error #18

Open ghost opened 5 years ago

ghost commented 5 years ago

@oawiles I am getting out of RAM error at `BASE_MODEL = '/content/X2Face/UnwrapMosaic/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()` and with torch.no_grad() was introduced in torch 0.4 while this is using 0.2

oawiles commented 5 years ago

I'm not sure. This may be a problem with difference versions or your GPU is too small. I don't know hat you mean about with torch.no_grad().