We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, Thanks for your great job sharing with us, could you please help me with getting access to the model weights during the training?
I see in rendering there is weight but it's empty as the function returns [] as weights:
rgb_map, alphas_map, depth_map, weights, uncertainty = renderer(rays_train, tensorf, chunk=args.batch_size, N_samples=nSamples, white_bg = white_bg, ndc_ray=ndc_ray, device=device, is_train=True)
I figured out with this function:
def get_param(tensorf, logfolder, expname, model_name): tensorf.save(f'{logfolder}/{expname}.th') ckpt = torch.load(f'{logfolder}/{expname}.th', map_location=device) param = [] for key in ckpt['state_dict'].keys(): param.append(ckpt['state_dict'][str(key)].reshape(-1).clone().detach()) params = torch.cat(param) return params
Although it's writing the model, then loading it, then concatenate all the matrices, am I missing something?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello, Thanks for your great job sharing with us, could you please help me with getting access to the model weights during the training?
I see in rendering there is weight but it's empty as the function returns [] as weights:
rgb_map, alphas_map, depth_map, weights, uncertainty = renderer(rays_train, tensorf, chunk=args.batch_size,
N_samples=nSamples, white_bg = white_bg, ndc_ray=ndc_ray, device=device, is_train=True)
I figured out with this function:
def get_param(tensorf, logfolder, expname, model_name):
tensorf.save(f'{logfolder}/{expname}.th')
ckpt = torch.load(f'{logfolder}/{expname}.th', map_location=device)
param = []
for key in ckpt['state_dict'].keys():
param.append(ckpt['state_dict'][str(key)].reshape(-1).clone().detach())
params = torch.cat(param)
return params
Although it's writing the model, then loading it, then concatenate all the matrices, am I missing something?
The text was updated successfully, but these errors were encountered: