google / nerfies

This is the code for Deformable Neural Radiance Fields, a.k.a. Nerfies.
https://nerfies.github.io
Apache License 2.0
1.59k stars 215 forks source link

[Fixed]. InvalidArgumentError: InvalidArgumentError: cannot compute MatMul as input #0(zero-based) was expected to be a float tensor but is a double tensor [Op:MatMul] #34

Closed oo92 closed 2 years ago

oo92 commented 2 years ago

Hi.

The Origins and Directions variables in your function triangulate_rays() were invalid data types for ray_triangulate(). I fixed the problem. Please update your notebook.

def triangulate_rays(origins, directions):
  origins = origins[np.newaxis, ...].astype('float32')
  directions = directions[np.newaxis, ...].astype('float32')
  weights = np.ones(origins.shape[:2], dtype=np.float32)
  points = np.array(ray_triangulate(origins, origins + directions, weights))
  return points.squeeze()
Ntweat commented 2 years ago

Verified.!! Thank you for helping.!

keunhong commented 2 years ago

Thanks!