@property
def max_len(self):
    if self.model:
        return self.model.layers[0].batch_input_shape[1]
    else:
        return None
@property
def max_len(self):
    if self.model:
        return self.model.layers[0].batch_input_shape[1]
    else:
        return None