Skip to content

Commit

Permalink
Temp Fix for #38
Browse files Browse the repository at this point in the history
  • Loading branch information
nirmal-suthar committed Oct 7, 2020
1 parent af2bf1e commit 6304fd5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/rep/mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,14 @@ end

function _compute_verts_padded(m::TriMesh, refresh::Bool = false)
if refresh || !(m._verts_padded_valid)
_list_to_padded!(m._verts_padded, m._verts_list, 0, (3, m.V))

# FIXME: #38 chamfer_loss gradient doesn't reach packed, so using temp fix
_packed = get_verts_packed(m)
_padded = _packed_to_padded(_packed, m._verts_len, 0)
m._verts_padded = _padded

# _list_to_padded!(m._verts_padded, m._verts_list, 0, (3, m.V))

# avoiding setproperty!, as we are building padded
# from list and list is always valid
# setfield!(m, :_verts_padded, verts_padded)
Expand Down

0 comments on commit 6304fd5

Please sign in to comment.