Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ketos ketos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • public_projects
  • ketosketos
  • Issues
  • #116

Closed
Open
Created May 06, 2021 by Oliver Kirsebom@kirsebomOwner

bug in run_on_test_generator

When using the run_on_test_generator method with return_raw_output=False, I get the following error:

/home/oliver/envs/env-ketos-py37/lib/python3.7/site-packages/ketos/neural_networks/dev_utils/nn_interface.py:1403: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  predictions = np.array(predictions)
Traceback (most recent call last):
  File "run_on_test.py", line 34, in <module>
    predictions = resnet.run_on_test_generator(return_raw_output=False, compute_val_metrics=True, verbose=True)
  File "/home/oliver/envs/env-ketos-py37/lib/python3.7/site-packages/ketos/neural_networks/dev_utils/nn_interface.py", line 1406, in run_on_test_generator
    reshaped_predictions = predictions.reshape(-1, predictions.shape[2])
IndexError: tuple index out of range
Closing remaining open files:/home/oliver/data/narw/dclde/dclde_nm5.h5...done

If instead, I use the method with return_raw_output=True, the error disappears (but the warning remains).

Also, upon inspecting the nn_interface`` module, I found what appears to be two separate, and slightly different, implementations of the run_on_test_generator` method. @fsfrazao , is this intentional?

Finally, I thought we could add an option to include the computed metrics as return arguments. With the present implementation, the metrics are printed to the monitor, but not returned for futher processing.

Edited May 06, 2021 by Oliver Kirsebom
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking