提交 1701b76a 编辑于 作者: Jeremy Reizenstein's avatar Jeremy Reizenstein 提交者: Facebook GitHub Bot
浏览文件

another meshgrid fix for old pytorch

Summary: Try to fix circleci again.

Reviewed By: nikhilaravi

Differential Revision: D34752188

fbshipit-source-id: 5966c585b61d77df1d8dd97c24383cf74dfb1fae
显示 4 个添加1 个删除
+4 -1
......@@ -66,7 +66,10 @@ def meshgrid_ij(
"""
Like torch.meshgrid was before PyTorch 1.10.0, i.e. with indexing set to ij
"""
if "indexing" in torch.meshgrid.__kwdefaults__:
if (
torch.meshgrid.__kwdefaults__ is not None
and "indexing" in torch.meshgrid.__kwdefaults__
):
# PyTorch >= 1.10.0
return torch.meshgrid(*A, indexing="ij")
return torch.meshgrid(*A)
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册