3 from __future__
import absolute_import
4 from __future__
import division
5 from __future__
import print_function
6 from __future__
import unicode_literals
9 def transpose(model, blob_in, blob_out, use_cudnn=False, **kwargs):
12 kwargs[
'engine'] =
'CUDNN' 13 return model.net.Transpose(blob_in, blob_out, **kwargs)
16 def sum(model, blob_in, blob_out, **kwargs):
18 return model.net.Sum(blob_in, blob_out, **kwargs)
21 def batch_mat_mul(model, blob_in, blob_out,
22 enable_tensor_core=
False, **kwargs):
23 if enable_tensor_core:
24 kwargs[
'engine'] =
'TENSORCORE' 26 return model.net.BatchMatMul(blob_in, blob_out, **kwargs)