mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 14:20:38 +08:00
use assertClose
Summary: use assertClose in some tests, which enforces shape equality. Fixes some small problems, including graph_conv on an empty graph. Reviewed By: nikhilaravi Differential Revision: D20556912 fbshipit-source-id: 60a61eafe3c03ce0f6c9c1a842685708fb10ac5b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
744ef0c2c8
commit
595aca27ea
@@ -65,7 +65,7 @@ class GraphConv(nn.Module):
|
||||
)
|
||||
if verts.shape[0] == 0:
|
||||
# empty graph.
|
||||
return verts.sum() * 0.0
|
||||
return verts.new_zeros((0, self.output_dim)) * verts.sum()
|
||||
|
||||
verts_w0 = self.w0(verts) # (V, output_dim)
|
||||
verts_w1 = self.w1(verts) # (V, output_dim)
|
||||
|
||||
Reference in New Issue
Block a user