You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2018/01/12 23:45:47 UTC

[incubator-mxnet] branch master updated: Update operator.py (#9402)

This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 47a3422  Update operator.py (#9402)
47a3422 is described below

commit 47a342200d539ade5c76ed9479b73dd15b31b59f
Author: Eric Junyuan Xie <pi...@users.noreply.github.com>
AuthorDate: Fri Jan 12 15:45:43 2018 -0800

    Update operator.py (#9402)
---
 python/mxnet/operator.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/python/mxnet/operator.py b/python/mxnet/operator.py
index 141a338..9bff117 100644
--- a/python/mxnet/operator.py
+++ b/python/mxnet/operator.py
@@ -21,6 +21,7 @@
 from __future__ import absolute_import
 
 import traceback
+import warnings
 
 from array import array
 from threading import Lock
@@ -47,6 +48,7 @@ class PythonOp(object):
     def __init__(self, need_top_grad=True):
         self.info_ = None
         self.need_top_grad_ = need_top_grad
+        warnings.warn('PythonOp has been deprecated. Please use CustomOp')
 
     def __call__(self, *args, **kwargs):
         return self.get_symbol(*args, **kwargs)
@@ -152,6 +154,7 @@ class NumpyOp(PythonOp):
     """
     def __init__(self, need_top_grad=True):
         super(NumpyOp, self).__init__(need_top_grad)
+        warnings.warn('NumpyOp has been deprecated. Please use CustomOp')
 
     def get_symbol(self, *args, **kwargs):
         fb_functype = CFUNCTYPE(None, c_int, POINTER(POINTER(mx_float)), POINTER(c_int),
@@ -254,6 +257,7 @@ class NDArrayOp(PythonOp):
     """
     def __init__(self, need_top_grad=True):
         super(NDArrayOp, self).__init__(need_top_grad)
+        warnings.warn('NDArrayOp has been deprecated. Please use CustomOp')
 
     def get_symbol(self, *args, **kwargs):
         fb_functype = CFUNCTYPE(c_bool, c_int, POINTER(c_void_p), POINTER(c_int), c_void_p)

-- 
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <co...@mxnet.apache.org>'].