deeppose icon indicating copy to clipboard operation
deeppose copied to clipboard

CPU Mode Predict_flic.py

Open gsrujana opened this issue 9 years ago • 0 comments

When running visualization code I got error:

Traceback (most recent call last): File "scripts/predict_flic.py", line 211, in test(args) File "scripts/predict_flic.py", line 118, in test pred = preds[n] TypeError: 'Variable' object does not support indexing

It worked when I changed pred = preds[n] to pred = preds.data[n]. It is assigned it correctly for GPU mode with

    if args.gpu >= 0:
        preds = cuda.to_cpu(preds.data)
        input_data = cuda.to_cpu(input_data)
        labels = cuda.to_cpu(labels)

But same should be done for CPU mode.

gsrujana avatar Jul 15 '15 18:07 gsrujana