mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: This reverts commit 911c462824edec3de529a5a4385a4c437e24bf59 bypass-lint Differential Revision: D5794634 fbshipit-source-id: 1863b02282329cbee6b10e5870f03051b4bb6c58
19 lines
527 B
Python
19 lines
527 B
Python
## @package algebra
|
|
# Module caffe2.python.helpers.algebra
|
|
from __future__ import absolute_import
|
|
from __future__ import division
|
|
from __future__ import print_function
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
def transpose(model, blob_in, blob_out, use_cudnn=False, **kwargs):
|
|
"""Transpose."""
|
|
if use_cudnn:
|
|
kwargs['engine'] = 'CUDNN'
|
|
return model.net.Transpose(blob_in, blob_out, **kwargs)
|
|
|
|
|
|
def sum(model, blob_in, blob_out, **kwargs):
|
|
"""Sum"""
|
|
return model.net.Sum(blob_in, blob_out, **kwargs)
|