google / uis-rnn

This is the library for the Unbounded Interleaved-State Recurrent Neural Network (UIS-RNN) algorithm, corresponding to the paper Fully Supervised Speaker Diarization.
https://arxiv.org/abs/1810.04719
Apache License 2.0
1.56k stars 319 forks source link

[Bug] Predict method does not finish #73

Open ArlindKadra opened 4 years ago

ArlindKadra commented 4 years ago

Describe the bug

After training the UIS-RNN algorithm, I call the predict() method with the test_sequences. In this case, the test sequence is a 2-d numpy array, not a list. Somehow the method gets stuck and never finishes. I checked the input shape and according to the method doc it should work fine.

Maybe I am doing something wrong?

To Reproduce

Commands and arguments

import numpy as np
import uisrnn

SAVED_MODEL_NAME = 'saved_model.uisrnn'

model_args, training_args, inference_args = uisrnn.parse_arguments()
model = uisrnn.UISRNN(model_args)
model.load(SAVED_MODEL_NAME)
test_sequence = np.load('./data/test_sequence.npy', allow_pickle=True)
predicted_cluster_id = model.predict(test_sequence, inference_args)

Logs

Nothing printed.

Serialized models

https://drive.google.com/open?id=1N4JwQQv27Xap-UlvHCNARTiKGT3356AX

Data samples

Data
https://www.kaggle.com/mfekadu/darpa-timit-acousticphonetic-continuous-speech
Embeddings
https://drive.google.com/open?id=1N4JwQQv27Xap-UlvHCNARTiKGT3356AX

Versions

Additional context

Debugging the code, I see that everything goes well until this point: https://github.com/google/uis-rnn/blob/cb3a9c6764b3ce40e1327d524eea5e1568e884b7/uisrnn/uisrnn.py#L549 The statement after the for loop is finished is not hit. Using this implementation to generate the embeddings: https://github.com/HarryVolek/PyTorch_Speaker_Verification

ArlindKadra commented 4 years ago

Further note, preparing everything as a list of sequences works. If it helps, I can also add the necessary files for this case.

saumyaborwankar commented 3 years ago

Hi @ArlindKadra I am also stuck at the inferencing part could you share the dimensions of the test_sequence variable. Im confused as to what format it requires for inferencing. Thank you

cfeng16 commented 3 years ago

Hi @ArlindKadra, I face the same problem now, and I use the AMI corpus dataset. During the training, I concatenate all the training samples as a single numpy matrix, and I prepare the data as a list of sequences during the testing. However, it still can not predict anything, and there are no responses, and I would like to ask if the settings I mentioned above are the same as yours? Thank you!