singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (SINGA-186) Create Python Tensor class
Date Fri, 17 Jun 2016 14:29:05 GMT


ASF subversion and git services commented on SINGA-186:

Commit 2a582df121d8b3fa45dad1e9c0435bc01bf79bea in incubator-singa's branch refs/heads/dev
from chonho
[;h=2a582df ]

SINGA-186 Create Python Tensor class

- Add Swig interfaces: singa.i
  . core_tensor.i for singa::Tensor
  . core_device.i for singa::Device
- Add to generate wrapper
- Add python script:,
- Add an example unittest in test/python

- call copy constructor of singa::Tensor in __init__
- rename transpose -> is_tranpose(), which calls Tensor.transpose()
  rename matrix_transpose -> transpose(), which calls singa::Tensor.T()
- Revised a way to generate Tensor copy in python
  . add copy() for shallow copy, which calls singa::Tensor(Tensor&)
  . add deepcopy() for deep copy, which calls singa::Tensor::Clone()
  Note: revised __init__()
        now clone() and deepcopy() are the same

- need think about more efficient way to convert Tensor data to numpy array
- example test is in test/python/, which will be included in

> Create Python Tensor class
> --------------------------
>                 Key: SINGA-186
>                 URL:
>             Project: Singa
>          Issue Type: New Feature
>            Reporter: wangwei
> This ticket would add a Python Tensor class, which provides functions as the C++ Tensor
class with APIs in Python convention. Most of these functions are implemented by calling the
C++ Tensor functions via Swig.

This message was sent by Atlassian JIRA

View raw message