Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DL4J: Evaluation class - add 4d (segmentation) support #7250

Closed
AlexDBlack opened this issue Mar 6, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@AlexDBlack
Copy link
Member

commented Mar 6, 2019

Maybe also 4d support for RegressionEvaluation, etc. And ROCMultiClass support.

From gitter:

Alex Black @AlexDBlack 12:06

so the problem here is that the Evaluation class isn't set up to support semantic segmentation, only output of OutputLayer and RnnOutputLayer (i.e., rank2/3 output/labels)
one workaround is reshaping: start with your [n,c,h,w] shape labels/output, permute to [n,h,w,c] then reshape to [n*h*w,c] and call evaluation
all up that looks like INDArray labels2d = labels.permute(0,2,3,1).dup().reshape('c',n*h*w,c) and same for the labels (and yes, the dup there is necessary)
then you can do: Evaluation e = new Evaluation(); e.eval(labels2d, out2d); (with a loop over all minibatches in your dataset)

Aha! Link: https://skymindai.aha.io/features/DL4J-8

@lock

This comment has been minimized.

Copy link

commented Apr 17, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 17, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.