Ejemplo n.º 1
0
         torch.zeros(M, S, M),
     ),
 ),
 ('embedding', torch.tensor([[1, 2, 4, 5],
                             [4, 3, 2,
                              5]]), (torch.rand(6, 3), ), '', (True, )),
 (
     'embedding_bag',
     torch.tensor([1, 2, 4, 2]),
     (
         torch.rand(5, 3),
         torch.tensor([0, 4]),
     ),
 ),
 ('batch_norm', (S, S), (
     non_differentiable(torch.randn(S)),
     non_differentiable(torch.ones(S)),
 ), '', (False, 'aten::_batch_norm_impl_index')),
 (
     'instance_norm',
     (S, S, S),
     (non_differentiable(torch.zeros(S)),
      non_differentiable(torch.ones(S))),
 ),
 ('layer_norm', (S, S, S, S), ([5], ), '',
  (False, ['aten::contiguous', 'aten::_batch_norm_impl_index'])),
 ('layer_norm', (S, S, S, S), (
     [5],
     non_differentiable(torch.rand(S)),
 ), 'with_only_weight',
  (False, ['aten::contiguous', 'aten::_batch_norm_impl_index'])),
 ('hardshrink', (S, S, S), (0.4,),),
 ('tanhshrink', (S, S, S), (),),
 ('softsign', (S, S, S), (),),
 ('softplus', (S, S, S), (),),
 ('softmin', (S, S, S), (0,),),
 ('softmax', (S, S, S), (0,), '', (True,)),
 ('softmax', (S, S, S), (0, 3, torch.double), 'with_all_args', (True,)),
 ('tanh', (S, S, S), (), '', (True,)),
 ('sigmoid', (S, S, S), (), '', (True,)),
 ('log_softmax', (S, S, S), (0,), '', (True,)),
 ('linear', (S, S), ((M, S),), '', (True, ['aten::t', 'aten::matmul'])),
 ('linear', (S, S), ((M, S), (M,)), 'addmm', (True, ['aten::add', 'aten::mm'])),
 ('bilinear', (S, S, S), ((S, S, M), torch.zeros(M, S, M),),),
 ('embedding', torch.tensor([[1, 2, 4, 5], [4, 3, 2, 5]]), (torch.rand(6, 3), ), '', (True,)),
 ('embedding_bag', torch.tensor([1, 2, 4, 2]), (torch.rand(5, 3), torch.tensor([0, 4]),),),
 ('batch_norm', (S, S), (non_differentiable(torch.randn(S)), non_differentiable(torch.ones(S)), ),
     '', (False, 'aten::_batch_norm_impl_index')),
 ('instance_norm', (S, S, S), (non_differentiable(torch.zeros(S)), non_differentiable(torch.ones(S))),),
 ('layer_norm', (S, S, S, S), ([5],), '',
  (False, ['aten::contiguous', 'aten::_batch_norm_impl_index'])),
 ('layer_norm', (S, S, S, S), ([5], non_differentiable(torch.rand(S)),), 'with_only_weight',
  (False, ['aten::contiguous', 'aten::_batch_norm_impl_index'])),
 ('layer_norm', (S, S, S, S), ([5], None, non_differentiable(torch.rand(S)),), 'with_only_bias',
  (False, ['aten::contiguous', 'aten::_batch_norm_impl_index'])),
 ('layer_norm', (S, S, S, S), ([5], non_differentiable(torch.rand(S)),
                               non_differentiable(torch.rand(S))), 'with_weight_and_bias',
  (False, ['aten::contiguous', 'aten::_batch_norm_impl_index', 'aten::addcmul'])),
 ('group_norm', (S, S, S), (1, torch.rand(5),),),
 ('local_response_norm', (S, S, S), (2, ),),
 ('nll_loss', F.log_softmax(torch.randn(3, 5), dim=0), (torch.tensor([1, 0, 4]),), '', (True, 'aten::nll_loss_forward')),
 ('poisson_nll_loss', torch.rand(S, 2), (torch.rand(S, 2),),),