• 深度学习框架如何优雅地做算子对齐任务?


    700246804a2f6c5d47bad3d1c53ccfa3.png

    直播提前约!!!

    今晚19:30,OneFlow工程师教你用AI算法拯救渣画质照片,欢迎参与。

    撰文 | BBuf

    之前回答过「如何为PyTorch做贡献的知乎问题」(https://www.zhihu.com/question/502301777/answer/2248950419)。回答提到了去年在OneFlow开发一些算子时,基于算子AutoTest框架找到了一些PyTorch算子的bug,并给PyTorch做出了反馈或修复。但这个回答没有介绍这个AutoTest框架长什么样子,以及它背后的原理。

    因此,这篇文章就用来介绍OneFlow的算子AutoTest框架,看一下OneFlow深度学习框架在算子开发过程中是如何优雅地做算子对齐任务(由 @大缺弦 开发,后经我和其它同事进行扩展和丰富功能形成今天的形态)。这个AutoTest框架也可以很轻易移植到其它深度学习训练框架使用,代码实现在:

    https://github.com/Oneflow-Inc/oneflow/blob/v0.6.0/python/oneflow/test_utils/automated_test_util/torch_flow_dual_object.py

    1

    传统的算子对齐方式

    不局限于OneFlow,任何组织或者个人编写的深度学习训练框架都需要验证算子的实现正确性。那么,深度学习框架中验证算子正确性的一般做法是什么呢?

    以百度的PaddlePaddle为例,在验证算子正确性时一般是根据调用其它标准库获得的结果(比如卷积算子的验证就调用cudnn的卷积,erf算子的验证就调用了scipy的erf)或者直接使用numpy模拟的计算结果来进行验证(比如full算子的验证即为numpy模拟)。在PyTorch的测试中还有硬编码一些测试样例的方式,也即将固定输入样例的标准答案和算子计算的结果进行对比,以此判断算子实现的正确性。

    这些方法都没有什么问题,但在编写测试时需要不少的人力并且在算子开发初期可能有一些corner case会容易想不到。以OneFlow为例,由于算子的行为是对齐PyTorch,如果要验证转置卷积Op在各种情况下的正确性,那么什么样的测试代码才可以全面验证呢?一种做法是将每个参数都枚举出来:

    1. import torch
    2. import numpy as np
    3. import oneflow as flow
    4. for N in range(1, 5):
    5. for C_in in range(1, 10):
    6. for L_in in range(1, 10):
    7. for H_in in range(1, 10):
    8. for C_out in range(1, 10):
    9. for Ksize in range(1, 10):
    10. for Pad in range(1, 10):
    11. for Dilation in range(1, 10):
    12. for Stride in range(1, min(L_in, H_in)):
    13. for OutPad in range(1, min(Dilation, Stride)):
    14. try:
    15. torch_input = torch.randn(N, C_in, L_in, H_in)
    16. flow_input = flow.tensor(torch_input.numpy())
    17. torch_input.requires_grad = True
    18. flow_input.requires_grad = True
    19. torch_m = torch.nn.ConvTranspose2d(in_channels=C_in, out_channels=C_out, kernel_size=Ksize, padding=Pad, stride=Stride,
    20. output_padding=(OutPad), dilation=Dilation, bias=False)
    21. flow_m = flow.nn.ConvTranspose2d(in_channels=C_in, out_channels=C_out, kernel_size=Ksize, padding=Pad, stride=Stride,
    22. output_padding=(OutPad), dilation=Dilation, bias=False)
    23. flow_m.weight.data = flow.tensor(torch_m.weight.data.detach().numpy(), requires_grad=True)
    24. torch_out = torch_m(torch_input)
    25. flow_out = flow_m(flow_input)
    26. torch_out = torch_out.sum()
    27. flow_out = flow_out.sum()
    28. assert(np.allclose(torch_out.detach().numpy(), flow_out.detach().numpy(), 1e-06, 1e-06)), "forward not equal"
    29. torch_out.backward()
    30. flow_out.backward()
    31. print(torch_input.grad.detach().numpy())
    32. print(flow_input.grad.detach()[:N, :C_in, :L_in, :H_in].numpy())
    33. assert(np.allclose(torch_input.grad.detach().numpy(), flow_input.grad.detach()[:N, :C_in, :L_in, :H_in].numpy(), 1e-03, 1e-03)), "backward not equal"
    34. except Exception as e:
    35. print('Input Param Error')

    但这种做法虽然验证得比较全面但同样有缺点。首先枚举的上界如何确定?如果给了一个大的上界,那么这个算子的验证时间会非常长,不利于在CI流程中使用。如果上界很小就可能忽略一些corner case,导致测试仍然不会全面并增加算子出bug的风险。

    基于算子测试的这些问题,同事 @大缺弦 开发了一个算子AutoTest框架,用于解决OneFlow算子和PyTorch算子对齐的问题。后来我在此基础上又为这个AutoTest框架丰富了其它的一些功能,感觉目前已经比较好使,接下里做一个全面介绍。

    整个AutoTest框架只有2个Python文件,并且这个AutoTest框架可以轻易移植到其它任何深度学习框架去做算子对齐任务。

    1.https://github.com/Oneflow-Inc/oneflow/blob/v0.6.0/python/oneflow/test_utils/automated_test_util/torch_flow_dual_object.py

    2.https://github.com/Oneflow-Inc/oneflow/blob/v0.6.0/python/oneflow/test_utils/automated_test_util/generators.py

    2

    算子AutoTest框架用法

    在介绍原理之前,我们先看一下AutoTest框架的用法。以上面的反卷积算子为例,使用了AutoTest框架之后就可以用下面的代码来完成算子对齐测试:

    1. @autotest()
    2. def test_deconv2d_with_random_data(test_case):
    3. channels = random(1, 6)
    4. m = torch.nn.ConvTranspose2d(
    5. in_channels=channels,
    6. out_channels=random(1, 20),
    7. kernel_size=random(1, 4),
    8. stride=random() | nothing(),
    9. padding=random(1, 3).to(int) | nothing(),
    10. dilation=random(1, 5) | nothing(),
    11. groups=random(1, 5) | nothing(),
    12. padding_mode=constant("zeros") | nothing(),
    13. )
    14. m.train(random())
    15. device = random_device()
    16. m.to(device)
    17. x = random_pytorch_tensor(ndim=4, dim1=channels).to(device)
    18. y = m(x)
    19. return y

    熟悉PyTorch的小伙伴可以发现这个算子测试代码和PyTorch的代码风格基本一样。的确,AutoTest框架相当于是一个high level的PyTorch,它的接口和PyTorch一样,但对于给定的输入会分别用OneFlow和PyTorch运行一遍,记录运行过程中得到的每个tensor以及对应梯度tensor的值,再对这些OneFlow和PyTorch分别产生的tensor检查一遍数值形状是否完全相同,以完成自动测试工作,我们后面会细讲。

    我们可以再看一个测试matmul算子的例子:

    1. @autotest()
    2. def test_flow_matmul_with_random_data(test_case):
    3. k = random(1, 6)
    4. x = random_pytorch_tensor(ndim=2, dim1=k)
    5. y = random_pytorch_tensor(ndim=2, dim0=k)
    6. z = torch.matmul(x, y)
    7. return z

    我们基于random_pytorch_tensor方法构造了两个随机tensor xy,它们的维度分别是[m, k][k, n],这些维度的值都是随机生成的。

    执行上述两个测试例子,自动测试框架会自动帮我们随机出各种合法参数组合成的Op,并基于数值和类型完全相同地输入Tensor(PyTorch和OneFlow各有一份)分别运行PyTorch和OneFlow的代码,并完成算子的自动测试。由于自动测试框架的用法对齐了PyTorch用法,我们在开发算子之后编写测试样例将非常简单。不用再引入其它的标准库或者使用Numpy去模拟一遍算子的前向反向计算过程等,解放了生产力。

    并且测试的时候只要次数足够多,就可以很大概率的覆盖到一些OneFlow算子和PyTorch算子无法对齐的样例,这个时候如果能拿到对应的复现样例就可以帮助我们确定OneFlow算子实现是否存在问题。

    3

    算子AutoTest框架实现思路

    了解了AutoTest框架的使用方法,这里来讲解一下AutoTest框架的实现思路。从上面的用法可以大概可以猜到AutoTest框架在实现时会分成两部分,一部分是如何产生随机数据,另外一部分是用AutoTest部分的程序并记录和比较中间tensor以及对应的梯度tensor的形状和数值。

    3.1 如何产生随机数据?

    这里说的随机数据不仅指的是随机地输入tensor,还包含Op的属性参数比如上面反卷积Op测试例子中的kernel_size=random(1, 4)就实现了指定kernel_size将会在[1, 4)这个区间进行取值。

    这部分实现在:

    https://github.com/Oneflow-Inc/oneflow/blob/v0.6.0/python/oneflow/test_utils/automated_test_util/generators.py 

    首先我们看一下这个文件导出了哪些接口:

    1. __all__ = [
    2. "random_tensor",
    3. "random_bool",
    4. "random_device",
    5. "random",
    6. "random_or_nothing",
    7. "oneof",
    8. "constant",
    9. "nothing"
    10. ]

    这些接口都是继承了generator基类用来产生随机数据结构的类,这里的数据结构既可以是内置类型如int,也可以是自定义数据类型比如tensor。AutoTest框架所有的参数的随机性都是基于这些方法来做到的,我们看一下generator基类的实现:

    1. class generator:
    2. def __init__(self, children):
    3. self.children = children
    4. self._value = None
    5. def _init(self):
    6. self._value = None
    7. for x in self.children:
    8. x._init()
    9. def eval(self):
    10. self._init()
    11. return self.value()
    12. def _calc_value(self):
    13. raise NotImplementedError()
    14. def value(self):
    15. if self._value is None:
    16. self._value = self._calc_value()
    17. return self._value
    18. def size(self):
    19. return 1
    20. def __or__(self, other):
    21. other = pack(other)
    22. return oneof(
    23. self, other, possibility=self.size() / (self.size() + other.size())
    24. )
    25. def __ror__(self, other):
    26. return self | other
    27. def __add__(self, other):
    28. return add(self, other)
    29. def __radd__(self, other):
    30. return self + other
    31. def __sub__(self, other):
    32. return self + neg(other)
    33. def __rsub__(self, other):
    34. return neg(self - other)
    35. def __mul__(self, other):
    36. return mul(self, other)
    37. def __rmul__(self, other):
    38. return self * other
    39. def to(self, annotation):
    40. self._to(annotation)
    41. for x in self.children:
    42. x.to(annotation)
    43. return self
    44. def _to(self, annotation):
    45. pass

    这个类不仅持有了_calc_valuevalueeval等和取值有关的函数,还持有size这个反应生成数据个数的函数。另外还持有了一系列的魔法函数,让不同的generator子类可以互相组合,提升了自动测试框架书写的灵活性。最后还有一个to成员函数,这个函数被继承generator基类的类重写,用来确定这个随机数据结构的数值类型。

    所有的generator派生类都继承了generator基类,并重写其中的__init____calc_valuesize_to等成员函数。比如nothing这个generator的派生类就是直接重写_calc_value函数,并在其中返回一个什么都不做的类的实体。

    1. class Nothing:
    2. pass
    3. class nothing(generator):
    4. def __init__(self):
    5. super().__init__([])
    6. def _calc_value(self):
    7. return Nothing()

    再例如,random这个generator的派生类的定义如下:

    1. class random(generator):
    2. def __init__(self, low=1, high=6):
    3. self.low = pack(low)
    4. self.high = pack(high)
    5. super().__init__([self.low, self.high])
    6. self.annotation = None
    7. def _to(self, annotation):
    8. if self.annotation is not None:
    9. return
    10. if hasattr(annotation, "__origin__"):
    11. # PyTorch _size_2_t and similar types are defined by type variables,
    12. # leading to unexpected __args__ and __origin__
    13. #
    14. # >>> _size_2_t = Union[T, Tuple[T, T]][int]
    15. # >>> _size_2_t.__origin__
    16. # typing.Union[~T, typing.Tuple[~T, ~T]]
    17. #
    18. # So recreate a new annotation object by repr and eval
    19. #
    20. # >>> _size_2_t
    21. # typing.Union[int, typing.Tuple[int, int]]
    22. # >>> _size_2_t_new = eval(repr(annotation))
    23. # >>> _size_2_t_new.__origin__
    24. # typing.Union
    25. annotation = eval(repr(annotation))
    26. self.annotation = annotation
    27. def _generate(self, annotation):
    28. if hasattr(annotation, "__origin__"):
    29. if annotation.__origin__ is Union:
    30. x = random_util.choice(annotation.__args__)
    31. return self._generate(x)
    32. if annotation.__origin__ is Tuple or annotation.__origin__ is py_tuple:
    33. return [self._generate(x) for x in annotation.__args__]
    34. else:
    35. raise NotImplementedError(
    36. f"Not implemented annotation {annotation} in random, type(annotation.__origin__) is {type(annotation.__origin__)}"
    37. )
    38. low, high = self.low.value(), self.high.value()
    39. if annotation == int:
    40. val = int(rng.integers(low, high))
    41. elif annotation == float:
    42. val = float(rng.random() * (high - low) + low)
    43. elif annotation == bool:
    44. val = random_util.choice([True, False])
    45. else:
    46. raise NotImplementedError(
    47. f"Not implemented annotation {annotation} in random"
    48. )
    49. return val
    50. def _calc_value(self):
    51. return self._generate(self.annotation)
    52. def random_or_nothing(low, high):
    53. return oneof(random(low, high), nothing(), possibility=2 / 3)

    这里需要注意的一点是,持有annotation属性的generator派生类的可以通过to来更新annotation属性(如random类),也可以忽略这个annotation直接在_calc_value构造相应类型的随机结果(如random_device类)。

    3.2 AutoTest核心实现

    AutoTest框架的核心实现在:

    https://github.com/Oneflow-Inc/oneflow/blob/v0.6.0/python/oneflow/test_utils/automated_test_util/torch_flow_dual_object.py 

    这个文件最后2行代码是:

    1. torch = GetDualObject("", torch_original, flow)
    2. __all__ = ["autotest", "random_pytorch_tensor"]

    这行代码torch = GetDualObject("", torch_original, flow) 里面的torch_original表示原始的PyTorch框架,而使用GetDualObject获得的torch表示是对原始的PyTorch和OneFlow进行了一个封装,变成了一个high level的PyTorch。因此,这里最关键的实现就是GetDualObject这个函数,我们先不关注这个函数具体在做什么,而是它返回了什么。查看代码可以发现这个函数返回了一个DualObject类对象,我们先研究一下这个类:

    1. class DualObject:
    2. def __init__(self, name, pytorch, oneflow):
    3. self.name = name
    4. self.pytorch = pytorch
    5. self.oneflow = oneflow
    6. if isinstance(pytorch, torch_original.nn.Module):
    7. state_dict = pytorch.state_dict()
    8. state_dict = {k: v.detach().cpu().numpy() for (k, v) in state_dict.items()}
    9. oneflow.load_state_dict(state_dict, strict=False)
    10. if testing:
    11. dual_modules_to_test.append(self)
    12. if isinstance(pytorch, torch_original.Tensor):
    13. if testing:
    14. dual_objects_to_test.append(self)
    15. def __repr__(self):
    16. return f"PyTorch object:\n{self.pytorch}\n\nOneFlow object:\n{self.oneflow}"
    17. def __getattr__(self, key):
    18. pytorch_attr = getattr(self.pytorch, key)
    19. oneflow_attr = getattr(self.oneflow, key)
    20. new_name = f"{self.name}.{key}"
    21. global call_pytorch
    22. call_pytorch = self.pytorch
    23. return GetDualObject(new_name, pytorch_attr, oneflow_attr)

    __init__中传入了类对象名和pytorch/oneflow两个对象,在导出high level的PyTorch的时候传入的是torch_originalflow,而在导出random_pytorch_tensor 接口时传入的是pytorch_tensoroneflow_tensor。这里不妨先看一下random_pytorch_tensor这个函数的实现:

    1. def random_pytorch_tensor(
    2. ndim=None,
    3. dim0=1,
    4. dim1=None,
    5. dim2=None,
    6. dim3=None,
    7. dim4=None,
    8. low=0,
    9. high=1,
    10. dtype=float,
    11. requires_grad=True,
    12. ):
    13. if isinstance(requires_grad, generator):
    14. requires_grad = requires_grad.value()
    15. pytorch_tensor = (
    16. random_tensor(ndim, dim0, dim1, dim2, dim3, dim4, low, high, dtype)
    17. .value()
    18. .requires_grad_(requires_grad and dtype != int)
    19. )
    20. flow_tensor = flow.tensor(
    21. pytorch_tensor.detach().cpu().numpy(),
    22. requires_grad=(requires_grad and dtype != int),
    23. )
    24. return GetDualObject("unused", pytorch_tensor, flow_tensor)

    可以看到它和导出high level PyTorch的实现一样,也是通过调用GetDualObject来获得了一个对象。再回到DualObject类的实现,可以发现这里分别使用了dual_modules_to_testdual_objects_to_test这两个list来分别记录OneFlow和PyTorch的nn.Module和tensor对象。另外DualObject类还重写了__getattr__这个魔法方法,这里以Flatten为例来看看这个魔法方法获取了AutoTest程序中的那些属性:

    1. def __getattr__(self, key):
    2. pytorch_attr = getattr(self.pytorch, key)
    3. oneflow_attr = getattr(self.oneflow, key)
    4. print(key)
    5. # print(pytorch_attr)
    6. # print(oneflow_attr)
    7. new_name = f"{self.name}.{key}"
    8. return GetDualObject(new_name, pytorch_attr, oneflow_attr)
    9. # flatten的AutoTest程序
    10. @autotest(auto_backward=False)
    11. def test_against_pytorch(test_case):
    12. m = torch.nn.Flatten(
    13. start_dim=random(1, 6) | nothing(), end_dim=random(1, 6) | nothing()
    14. )
    15. m.train(random())
    16. device = random_device()
    17. m.to(device)
    18. x = random_pytorch_tensor().to(device)
    19. y = m(x)
    20. return y

    然后看一下__getattr__中key的打印结果:

    1. nn
    2. Flatten
    3. train
    4. to
    5. to

    可以看到被autotest()装饰器修饰的测试程序中的PyTorch或者OneFlow的nn.Module或者其它函数都重写了这个方法,它将这些nn.Module或者其它函数的参数和属性都取出来并同样使用GetDualObject返回一个新的DualObject对象,我们可以打印一下Flatten这个nn.Module对应的DualObject对象是什么:

    1. PyTorch object:
    2. <bound method Module.train of Flatten(start_dim=1, end_dim=-1)>
    3. OneFlow object:
    4. <bound method Module.train of Flatten(start_dim=1, end_dim=-1)>

    GetDualObject这个函数就是根据传入的Pytorch以及OneFlow对象和它们的名字来生成一个DualObject对象。GetDualObject这个函数会为high level的PyTorch重写传入的原始PyTorch以及OneFlow对象的__call__魔法函数,最后返回一个DualObject对象,这个过程还包含了跳过一些不需要关注的魔法函数以及检查传入对象的属性是否合法和基于nn.Module和其它API默认参数的类型对generator继承类产生的随机数据绑定特定类型的工作(get_args函数中完成)。这里还有一句对于Tensor方法的特判,因为Tensor方法的调用方式(通过getattr)和其它Module和函数不同(通过__call__)。

    GetDualObject的实现思路大致就是这样,代码比较长这里就不贴了,感兴趣可以在这里查看:

    https://github.com/Oneflow-Inc/oneflow/blob/v0.6.0/python/oneflow/test_utils/automated_test_util/torch_flow_dual_object.py#L195-L401 

    最后,我们看一下autotest()装饰器的实现:

    1. def autotest(
    2. n=20,
    3. auto_backward=True,
    4. rtol=0.0001,
    5. atol=1e-05,
    6. check_graph=True,
    7. check_allclose=True,
    8. ):
    9. verbose = os.getenv("ONEFLOW_TEST_VERBOSE") is not None
    10. def deco(f):
    11. @functools.wraps(f)
    12. def new_f(test_case):
    13. nonlocal n
    14. loop_limit = n * 20
    15. loop = 0
    16. while n > 0:
    17. clear_note_fake_program()
    18. if loop > loop_limit:
    19. raise ValueError("autotest stuck in an endless loop!")
    20. dual_modules_to_test.clear()
    21. dual_objects_to_test.clear()
    22. try:
    23. global testing
    24. testing = True
    25. global testing_graph
    26. if check_graph:
    27. testing_graph = True
    28. res = f(test_case)
    29. testing = False
    30. testing_graph = False
    31. except (PyTorchDoesNotSupportError, BothDoNotSupportError) as e:
    32. if verbose:
    33. print(f"{f.__name__}")
    34. print(e)
    35. loop += 1
    36. continue
    37. if res is not None:
    38. if not isinstance(res, collections.abc.Sequence):
    39. res = [res]
    40. func_outputs = res
    41. for x in res:
    42. if auto_backward:
    43. if isinstance(x.pytorch, torch_original.Tensor):
    44. call_tensor_id.append(id(x.pytorch))
    45. x.sum().backward()
    46. dual_objects_to_test.append(x)
    47. for x in dual_modules_to_test:
    48. for key in x.pytorch.state_dict().keys():
    49. if key not in x.oneflow.state_dict().keys():
    50. warnings.warn(f"oneflow module don't have `{key}`")
    51. continue
    52. vis_parameters[key] = x.pytorch.state_dict()[key]
    53. dual_objects_to_test.append(
    54. GetDualObject(
    55. "unused",
    56. getattr(x.pytorch, key),
    57. getattr(x.oneflow, key),
    58. )
    59. )
    60. call_tensor_id.append(id(getattr(x.pytorch, key)))
    61. dual_objects_to_test.append(
    62. GetDualObject(
    63. "unused",
    64. getattr(x.pytorch, key).grad,
    65. getattr(x.oneflow, key).grad,
    66. )
    67. )
    68. call_tensor_id.append(id(getattr(x.pytorch, key).grad))
    69. for x in dual_objects_to_test:
    70. if (
    71. isinstance(x.pytorch, torch_original.Tensor)
    72. and id(x.pytorch) not in call_tensor_id
    73. ):
    74. vis_tensor.append(x.pytorch)
    75. # check eager
    76. for x in dual_objects_to_test:
    77. if check_allclose:
    78. test_case.assertTrue(check_equality(x, rtol=rtol, atol=atol), x)
    79. if verbose:
    80. print(f"{f.__name__} test eager passed.")
    81. n -= 1
    82. loop += 1
    83. return new_f
    84. return deco

    这个装饰器的res = f(test_case)这行代码会执行这个装饰器修饰的自动测试程序,会在给定输入的情况下去分别运行PyTorch和OneFlow的程序获得所有中间的输出tensor,包括tensor的梯度,并将它们记录到dual_modules_to_test这个列表。再遍历这个列表里面的每个tensor,比较数值和shape是否完全一样。比较函数实现在:

    https://github.com/Oneflow-Inc/oneflow/blob/v0.6.0/python/oneflow/test_utils/automated_test_util/torch_flow_dual_object.py#L565-L599 

    原理就是拿到tensor的numpy数据进行比较。autotest() 装饰器还有几个参数可以调整,可以控制测试是否执行反向,执行次数,以及最后结果对比的精度阈值。

    4

    自动生成出BUG的程序和数据

    上面介绍完了AutoTest框架的原理和使用方法,这里再展示一下基于AutoTest框架如何拿到可复现BUG的程序以及对应的输入tensor和参数等。原理很简单,就是把GetDualObject过程中使用的api记录下来拼起来就构成一个完整的程序,这里展示一下在CI中的效果。

    https://github.com/Oneflow-Inc/oneflow/runs/4760189461?check_suite_focus=true 

    这个例子展示了在某次CI过程中,OneFlow的conv_transpose2d算子和PyTorch的conv_transpose2d算子在某个case下没有对齐,那么CI在报告这个错误时也输出了对应的复现代码和数据,可以方便框架开发者进行定位和判断:

    fc3d0999cf677438f5da19ccba2f2d17.png

    自动测试框架在算子和PyTorch没对齐时会输出复现程序和数据

    除此之外,这个AutoTest框架目前不仅负责Eager算子的测试,还被我们扩展到支持nn.Graph和Eager Consistent等多种情况,极大的方便了框架开发者。

    5

    总结

    这篇文章介绍了OneFlow的算子AutoTest框架,提供了一个深度学习优雅地做算子对齐的方法,使得开发者和用户可以像写PyTorch那样方便写测试程序。AutoTest框架的灵活性和易用性都比较强,欢迎大家学习或者使用。

    原文首发于:https://zhuanlan.zhihu.com/p/458111952

    其他人都在看

    欢迎下载体验OneFlow新一代开源深度学习框架:GitHub - Oneflow-Inc/oneflow: OneFlow is a performance-centered and open-source deep learning framework.OneFlow is a performance-centered and open-source deep learning framework. - GitHub - Oneflow-Inc/oneflow: OneFlow is a performance-centered and open-source deep learning framework.https://github.com/Oneflow-Inc/oneflow/

    10e4f512df441f9d0f05c5cf691b0e01.png

  • 相关阅读:
    庚顿新一代实时数据库太快了,得用对数坐标轴放大看
    java计算机毕业设计宠物店管理系统设计与实现源码+mysql数据库+系统+lw文档+部署
    查看及切换目录
    CentOS7.8忘记密码后如何重置
    【MySQL】查询优化
    HttpClientUtil
    python学习-120-实现Fio结果自动化批量提取测试结果到CSV
    详解算法题目:幼稚班作业
    @ConditionalOnProperty注解和@ConfigurationProperties注解
    测试人员工作中常用的 git 语句汇总总结
  • 原文地址:https://blog.csdn.net/OneFlow_Official/article/details/122711317