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
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)