@YuanGongND I used SSAST pretrained model to inference, but got the different results every time. And every score in the results is close. What is the reason for the result?
[{"label": "Electric toothbrush", "score": 0.849498987197876}, {"label": "Blender", "score": 0.8397527933120728}, {"label": "Tambourine", "score": 0.8310427665710449}, {"label": "Race car, auto racing", "score": 0.8218237161636353}, {"label": "Pink noise", "score": 0.8042027354240417}, {"label": "Writing", "score": 0.7958802580833435}, {"label": "Singing", "score": 0.7875975966453552}, {"label": "Telephone dialing, DTMF", "score": 0.7849113941192627}, {"label": "Ambulance (siren)", "score": 0.7678646445274353}, {"label": "Country", "score": 0.7541956901550293}]
My code is as follows:
def model_fn(model_dir):
"""
Load the model and set weights
"""
def predict_fn(input_data, model):
"""
The predict_fn is invoked with the return value of input_fn.
"""
audio_model, labels = model
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
@YuanGongND I used SSAST pretrained model to inference, but got the different results every time. And every score in the results is close. What is the reason for the result? [{"label": "Electric toothbrush", "score": 0.849498987197876}, {"label": "Blender", "score": 0.8397527933120728}, {"label": "Tambourine", "score": 0.8310427665710449}, {"label": "Race car, auto racing", "score": 0.8218237161636353}, {"label": "Pink noise", "score": 0.8042027354240417}, {"label": "Writing", "score": 0.7958802580833435}, {"label": "Singing", "score": 0.7875975966453552}, {"label": "Telephone dialing, DTMF", "score": 0.7849113941192627}, {"label": "Ambulance (siren)", "score": 0.7678646445274353}, {"label": "Country", "score": 0.7541956901550293}]
My code is as follows:
def model_fn(model_dir): """ Load the model and set weights """
def predict_fn(input_data, model): """ The
predict_fn
is invoked with the return value ofinput_fn
. """ audio_model, labels = model device = torch.device("cuda" if torch.cuda.is_available() else "cpu")