Skip to content
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

IndexOutOfBoundsException in PredictGenderTest #175

Open
TINGWEIJING opened this issue Aug 26, 2021 · 1 comment
Open

IndexOutOfBoundsException in PredictGenderTest #175

TINGWEIJING opened this issue Aug 26, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@TINGWEIJING
Copy link
Contributor

Describe the bug
java.lang.IndexOutOfBoundsException occurs when user input more than 11 characters (space included) in the input field.
Affected in both solution and training folder.

Code that causes this error:

for (int i = 0; i < arr.length; i++)
{
features.putScalar(new int[]{0, i}, Integer.parseInt(arr[i]));
}

To Reproduce
Steps to reproduce the behavior:

  1. Go to dl4j-labs/src/main/java/ai/certifai/solution/feedforward/detectgender/PredictGenderTrain.java
  2. Run the java file to train the model.
  3. Go to dl4j-labs/src/main/java/ai/certifai/solution/feedforward/detectgender/PredictGenderTest.java
  4. Run the java file and enter the name with more than 11 characters in input field.

Expected behavior
No error occurs, successfully predict the gender from the name.

Screenshots
image

Desktop:

  • OS: Windows 10 Pro
  • Version: 10.0.19042 Build 19042
@github-actions
Copy link

👋 @TINGWEIJING
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.

@TINGWEIJING TINGWEIJING added the bug Something isn't working label Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant