Support softmax for row_vector, matrix types + code simplifications#3313
Support softmax for row_vector, matrix types + code simplifications#3313jachymb wants to merge 7 commits intostan-dev:developfrom
Conversation
|
I think it's some server error, not actual test failure. |
|
EDIT: Fixed |
|
@SteveBronder may I ask for a rerun pls? |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
|
@jachymb Did you use an AI to write this? We have not adopted an AI policy yet but it's nice to let us know. If you wrote this I'm happy to help you fix it up. There are a number of odds and ends in this PR which will take some cleaning up and if it's an AI then I'll most likely just close it. |
|
@SteveBronder Yeah, I used claude code, but reviewed every line of code until I felt it makes a good sense. I'd say my c++ knowledge is only intermediate, I mostly work with other languages. If you point me to topics where you think it should be approached differently or some resources I should first go through, I'd be happy to learn about that. |
Summary
This refactors the
softmaxandlog_softmaxfunctions in the following ways:vectorandrow_vectorare now supported instead of justvectormatrixtype is also supported and the softmax is applied row-wise. (i.e. the return value is effectively arow_stochastic_matrixfor modelling purposes)Tests
Side Effects
None to my knowledge.
Release notes
softmaxandlog_softmaxnow supportrow_vectorandmatrix(applied row-wise)Checklist
Copyright holder: Me, jachymb@gmail.com
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit)make test-headers)make test-math-dependencies)make doxygen)make cpplint)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested