Skip to content

Confusion Matrix for Full Convolution Network #156

@varghesealex90

Description

@varghesealex90

I have 5 class problem, where in the all 5 classes may be present in the input image. I would like to print the confusion matrix for the same.
output= model:forward(input) ---- size (10,5,240,240)
targets = target ---- size (10,240,240)

confusion:batchAdd(output,targets)

However I get the following error:

/home/uavws/torch/install/bin/luajit: ...ws/torch/install/share/lua/5.1/optim/ConfusionMatrix.lua:117: bad argument #1 to 'indexAdd' (out of range at /home/uavws/torch/pkg/torch/lib/TH/generic/THTensor.c:738)
stack traceback:
[C]: in function 'indexAdd'
...ws/torch/install/share/lua/5.1/optim/ConfusionMatrix.lua:117: in function 'batchAdd'
5_train.lua:211: in function 'opfunc'
/home/uavws/torch/install/share/lua/5.1/optim/sgd.lua:44: in function 'optimMethod'
5_train.lua:230: in function 'train'
doall.lua:80: in main chunk
[C]: in function 'dofile'
...avws/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions