syncnet_python icon indicating copy to clipboard operation
syncnet_python copied to clipboard

Unable to run demo script due to TypeError: 'Tensor' object is not callable

Open Olivialovecode opened this issue 4 years ago • 0 comments

Hi, I am trying to run demo script on my Mac laptop.

I disabled .cuda() in code as it's not supported, and download all the required files (example.avi, weights etc) following download_model.sh. When I run demo script, I experienced error as follows:

Input #0, avi, from 'data/example.avi': Metadata: encoder : Lavf57.83.100 Duration: 00:00:12.68, start: 0.000000, bitrate: 701 kb/s Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 224x224 [SAR 1:1 DAR 1:1], 430 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s Stream mapping: Stream #0:1 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help -async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000:first_pts=0. Output #0, wav, to '/Users/lingjingjing/AV_sync/data/demo/audio.wav': Metadata: ISFT : Lavf58.45.100 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s Metadata: encoder : Lavc58.91.100 pcm_s16le size= 396kB time=00:00:12.68 bitrate= 256.0kbits/s speed=2.53e+03x video:0kB audio:396kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.019223% cc_batch type is: <class 'list'> cc_in type is: <class 'torch.Tensor'> Traceback (most recent call last): File "demo_syncnet.py", line 30, in <module> s.evaluate(opt, videofile=opt.videofile) File "/Users/lingjingjing/AV_sync/syncnet_python/SyncNetInstance.py", line 123, in evaluate cc_out = self.__S__.forward_aud(cc_in()) TypeError: 'Tensor' object is not callable

Has anyone experienced the same issue before? Has anyone successfully run demo on their mac?

Olivialovecode avatar Mar 03 '21 23:03 Olivialovecode