-
Notifications
You must be signed in to change notification settings - Fork 690
Add softmax function #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| default: \ | ||
| FDASSERT(false, "Invalid enum data type.") \ | ||
| } \ | ||
| #define FD_VISIT_ALL_TYPES(TYPE, NAME, ...) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些宏能加下注释说明下作用吗?或者写明在文档里,我看在写Functions都会用到
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
主要是FDTensor本身是个非模板的结构体,而Functions的底层函数都是模板函数,调用时无法确定使用哪一个实例化的模板函数。而通过FD_VISIT_ALL_TYPES可以去匹配与FDTensor dtype相同的模板函数,调用之。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function类的,如果后需拓展的话,可能会有很多单测。可以在tests目录下建一个function目录,把function类的单测都移在目录下。
之后其它如vision/runtime的单测也就都分别加在相应的目录下面
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
PR types
New features
PR changes
APIs
Describe
Add softmax function
Usage