float to int in model creation
Opened this issue · 0 comments
pbrusco-asapp commented
Hi!
Thank you very much for the project!
I've found a problem when running with the lastest versions of torch (since torch==0.4.0 is not supported by my cuda config)
In /speech_emotion_recognition/models.py
nn.Linear(self.flat_size, cfg.num_classes)
causes an exception since self.flat_size is a float.
I changed the line:
self.flat_size = cfg.num_filters[len(cfg.num_filters)-1] * self.out_size**2
for
self.flat_size = int(cfg.num_filters[len(cfg.num_filters)-1] * self.out_size**2)
and it worked!
Thanks again.