vision icon indicating copy to clipboard operation
vision copied to clipboard

flow.div 算子和 torch.div 没对齐

Open triple-mu opened this issue 3 years ago • 0 comments

image

import oneflow as flow
import torch
import numpy as np

a = np.random.randn(3,3).astype(np.float32)

b = 2

torch_a = torch.from_numpy(a)
flow_a = flow.from_numpy(a)

print(torch.div(torch_a,b,rounding_mode='floor'))
print(flow.div(flow_a,b).floor())
print(flow.div(flow_a,b,rounding_mode='floor'))

triple-mu avatar Jun 30 '22 08:06 triple-mu