Skip to content
New issue

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

run fail #24

Closed
vicdxxx opened this issue Dec 30, 2021 · 3 comments
Closed

run fail #24

vicdxxx opened this issue Dec 30, 2021 · 3 comments

Comments

@vicdxxx
Copy link

vicdxxx commented Dec 30, 2021

I not sure it is model version or code version issue?

File "generate_random_samples.py", line 162, in
flm_batch = position_to_given_location(flame_decoder, flm_batch)
File "../my_utils/eye_centering.py", line 39, in position_to_given_location
verts, _, _ = deca_flame_decoder(shape_params=shape, expression_params=expression, pose_params=pose)
File "/home/ubuntu/.conda/envs/gif/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "../my_utils/photometric_optimization/models/FLAME.py", line 204, in forward
self.lbs_weights, dtype=self.dtype)
File "../my_utils/photometric_optimization/models/lbs.py", line 211, in lbs
J_transformed, A = batch_rigid_transform(rot_mats, J, parents, dtype=dtype)
File "../my_utils/photometric_optimization/models/lbs.py", line 353, in batch_rigid_transform
rel_joints.view(-1, 3, 1)).view(-1, joints.shape[1], 4, 4)
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

@ParthaEth
Copy link
Owner

Perhaps something changed between python versions because of which memory is fragmented. Can you try using .reshape() as suggested?

@lyhdtc
Copy link

lyhdtc commented Mar 18, 2022

just change ".view()" into ".contiguous().view()" can fix this

@vicdxxx
Copy link
Author

vicdxxx commented Mar 18, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants