Skip to content

Commit

Permalink
Modified the condition to load the optimiser model (#18891)
Browse files Browse the repository at this point in the history
  • Loading branch information
heflinstephenraj authored Jan 23, 2024
1 parent 61610ff commit 0ea48fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/src/main/native/ai_onnxruntime_OrtTrainingSession.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ JNIEXPORT jlong JNICALL Java_ai_onnxruntime_OrtTrainingSession_createTrainingSes
}
}
wchar_t* optimizerStr = NULL;
if (optimizerPath == NULL) {
if (optimizerPath != NULL) {
optimizerStr = copyAndPad(jniEnv, optimizerPath);
if (optimizerStr == NULL) {
// exception has been thrown in Java, go to cleanup and return null.
Expand Down

0 comments on commit 0ea48fc

Please sign in to comment.