google / nerfies

This is the code for Deformable Neural Radiance Fields, a.k.a. Nerfies.

Home Page:https://nerfies.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[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]

oo92 opened this issue · comments

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()

Verified.!! Thank you for helping.!

Thanks!