K-fold cross-validation for semantic segmentation in DL4J

I have a model for semantic segmentation based on U-net, the code of loading the data and training is available here : segmentation_unet.java · GitHub, which works very well. Now i want to apply k-fold cross-validation for this model in DL4J. Please any help.

Dear @agibsonccc Please have you any idea about this question.

@AbdelmajidB hmm…kfold is just about splitting things in to batches and averaging the results from the folds. If you have the base calculation for each batch (something like the counts of the number of object labels in each picture and what is/isn’t correct) averaging across all batches should be fine.

How are you calculating the error for each split?