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
  • #149

Closed
Open
Created Jan 09, 2022 by Liz Ferguson@lizferguson

Error in Training Network

Good Morning @kirsebom ! I was able to manually annotate the background noise segments from the data and incorporate that into the call annotations and bypass the creation of the negative selections, and made it all the way up to the point of training the network. Here's where I am running into the error - having a bit of a hard time working out the issue:

resnet.train_loop(n_epochs=30, verbose=True) Traceback (most recent call last): File "C:\Users\eferg.conda\envs\ketos_env\lib\site-packages\IPython\core\interactiveshell.py", line 3444, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in resnet.train_loop(n_epochs=30, verbose=True) File "C:\Users\eferg.conda\envs\ketos_env\lib\site-packages\ketos\neural_networks\dev_utils\nn_interface.py", line 1295, in train_loop train_X, train_Y = next(self._train_generator) File "C:\Users\eferg.conda\envs\ketos_env\lib\site-packages\ketos\data_handling\data_feeding.py", line 394, in next (X,Y) = self.get_samples(indices=data_row_index, annot_indices=annot_row_index) File "C:\Users\eferg.conda\envs\ketos_env\lib\site-packages\ketos\data_handling\data_feeding.py", line 371, in get_samples X,Y = self.output_transform_func(X,Y) File "C:\Users\eferg.conda\envs\ketos_env\lib\site-packages\ketos\neural_networks\dev_utils\nn_interface.py", line 352, in transform_batch Y = np.array([cls._to1hot(class_label=label, n_classes=n_classes) for label in y['label']]) File "C:\Users\eferg.conda\envs\ketos_env\lib\site-packages\ketos\neural_networks\dev_utils\nn_interface.py", line 352, in Y = np.array([cls._to1hot(class_label=label, n_classes=n_classes) for label in y['label']]) File "C:\Users\eferg.conda\envs\ketos_env\lib\site-packages\ketos\neural_networks\dev_utils\nn_interface.py", line 300, in _to1hot one_hot[class_label]=1.0 IndexError: index 2 is out of bounds for axis 0 with size 2

Attached is code and if needed, the two revised training and validation databases. BOEM_Mn_Network.py

BOEM_Mn_TrainingSelections.csv

BOEM_Mn_ValSelections.csv

Separate Question: I'm not sure if I have the correct arguments for the export to protobuf - specifically, I don't know if "ResNetInterface" is the correct model naming convention and how to work out if I should be indicating a list or tuble - if you can help me work out if this looks correct that would be very helpful:

ketos.neural_networks.dev_utils.export.export_to_ketos_protobuf(ResNetInterface, 'BOEM_Mn_Network.ktpb', list, audio_repr_file='spec_config_BOEM.json', tmp_folder='tmp_export_folder', overwrite=False, input_duration=None)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking