nansencenter / sea_ice_type_cnn_training

Deep learning of satellite data: Use the data from satellites for machine learning (deep learning) purposes
GNU General Public License v3.0
5 stars 4 forks source link

Refactor self.util into classes #5

Closed akorosov closed 3 years ago

akorosov commented 3 years ago

Another tree of classes can be developed:

class Batches:
    def calculate_variable_ML

class SarBatches(Batches):
    def pading

class OutputBatches(SarBatches):

class Amsr2Batches(Batches):

Attributes and methods from self.util can be moved to the new classes.

Inside main()

these classes can be instantiated and used in a loop after archive_.calculate_batches_for_masks() or even earlier:

for cls in [SarBatches, OutputBatches, Amsr2Batches]:
    o = cls(archive_)
    o.process()