You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Missing constant symbol (equivalent of tf.constant)? #8428
Hi, I just started using this framework for building something that is only marginally related to deep learning. As such, pardon me if this is simply due to my unfamiliarity or if this is an issue that doesn't arise often for deep learning applications.
Basically, I'm trying to do simple operations with symbols involving constant tensors but I cannot find an obvious way to do it. There's sym.ones and sym.zeros which create constant symbols of ones and zeros but there doesn't seem to be an easy way to create an arbitrary constant tensor symbol that I can use in operations such as sym.dot...
Activity
szha commentedon Oct 25, 2017
Yes, it would be nice to have a constant symbol similar to
nd.arraysolin319 commentedon Oct 26, 2017
analog-cbarber commentedon Feb 23, 2018
As a workaround, you can implement a constant CustomOp. It requires that you serialize the data through the CustomOpProp implementation somehow. One example of this can be seen here:
https://github.com/tqchen/mxnet-gan/blob/master/mxgan/custom_ops.py