Scripts used while porting the Java-to-VB converter output in unported/ to src/. They are not part
of the library build.
convert_ops.py does the mechanical part of porting an ND4J op class:
- renames namespaces and imports (
org.nd4jtoorg.nd4vb, aliasesNd4vbT,ShapeT,TransformsT) - puts the SameDiff, model-import and FlatBuffers members inside the
#If SAMEDIFF,#If MODEL_IMPORTand#If FLATBUFFERSfences of docs/PHASE2_DESIGN.md - renames the fields that clash with methods (
xField,dimensionsField, ...) - writes out Lombok's parameterless constructors
- prints REVIEW lines for whatever still needs a hand
It ported the 173 legacy op classes. custom_files.txt lists the 403 custom op classes (DynamicCustomOp
subclasses) still in unported/.
python tools/porting/run_convert.py tools/porting/custom_files.txt --report report.txt
run_convert.pytakes each listed file's converter text from gitHEAD(itsunported/path), writes it to the mirrored path undersrc/DeepLearning4VB/org/nd4vb/and converts it there.--out DIRmakes it a dry run that writes underDIRinstead.- Files listed in
hand_edited.txtare never overwritten. Add a file there after fixing it by hand. - After conversion, check the unfenced code by hand for bare
dimensions/keepDims. WithOption Strict Offa misuse can compile silently.