Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

How to build new operators? #16174

Open
shdyn opened this issue Sep 15, 2019 · 6 comments
Open

How to build new operators? #16174

shdyn opened this issue Sep 15, 2019 · 6 comments
Labels
Backend Issues related to the backend of MXNet Build Pending Requester Info

Comments

@shdyn
Copy link

shdyn commented Sep 15, 2019

Hi, I need to compile the operators in https://github.com/deepinsight/insightface/tree/master/3rdparty/operator. I tried to copy files in that folder to incubator-mxnet/src/operator and compile the source codes using incubator-mxnet/docs/install/install_mxnet_ubuntu_python.sh. Then I install these operators using incubator-mxnet/python/setup.py. However, I still cannot run these operators? Any suggestions. Thanks in advance!

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended label(s): Build

@zachgk zachgk added Backend Issues related to the backend of MXNet Build labels Sep 16, 2019
@zachgk
Copy link
Contributor

zachgk commented Sep 16, 2019

Did you receive any kind of error when you tried to compile mxnet? Also, the new operator FAQ might be able to help you https://mxnet.incubator.apache.org/versions/master/faq/new_op.html?

@shdyn
Copy link
Author

shdyn commented Sep 17, 2019 via email

@ChaiBapchya
Copy link
Contributor

With today's new updated website launch - https://mxnet.incubator.apache.org/api/faq/new_op should be the link @zachgk

@ChaiBapchya
Copy link
Contributor

ChaiBapchya commented Sep 25, 2019

@shdyn
I copy pasted the files into src/operator/. directory. Rebuilt it.
Tried the following

>>> import mxnet as mx
>>> mx.nd.AmSoftmax(data=mx.nd.arange(0,12).reshape(3,4),weight=mx.nd.arange(0,4).reshape(1,4),label=mx.nd.array([0,0,1]),num_hidden=1)

[[14.]
 [38.]
 [62.]]
<NDArray 3x1 @cpu(0)>

This didn't give me any error

For more details about using the function, help() might be helpful

>>> help(mx.nd.AmSoftmax)

Let me know if it helps.

@ChaiBapchya
Copy link
Contributor

@mxnet-label-bot add [Pending Requester Info]

@zachgk Is this good to close since I think we've answered this question and the author hasn't responded for a while.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Backend Issues related to the backend of MXNet Build Pending Requester Info
Projects
None yet
Development

No branches or pull requests

5 participants