CSBDeep / CSBDeep_fiji

BSD 2-Clause "Simplified" License
11 stars 4 forks source link

Add network returning tables #30

Closed frauzufall closed 5 years ago

frauzufall commented 5 years ago

This PR introduces a GenericTableNetwork which returns a GenericTable instead of a Dataset.

@HedgehogCode do you have an opinion on the structural changes? Since GenericNetwork was returning Dataset and is used in other peoples Java code / scripts, I did not want to change that, so I introduced an abstract GenericCoreNetwork class where everything from GenericNetwork moved to except the output parameter.

The GenericTableNetwork assumes the network output is singular and has 2 dimensions. Any additional dimensions will be ignored.

These are the changes in this PR:

frauzufall commented 5 years ago

Thanks for looking at the code! What bothers me is that the data from the Tensors is first written into a RandomAccessibleInterval before it's converted into e.g. a GenericTable in this case. This seems unnecessary. But it would require deeper structural changes to skip the RAI and for a first version this is ok I guess.