seqgra.learner.tensorflow.kerashelper module¶
MIT - CSAIL - Gifford Lab - seqgra
TensorFlow Keras learner helper class
@author: Konstantin Krismer
- class KerasHelper[source]¶
Bases:
object
- MULTIPLE_REGRESSION_LOSSES: FrozenSet[str] = frozenset({'cosinesimilarity', 'huber', 'huberloss', 'mae', 'mape', 'meanabsoluteerror', 'meanabsolutepercentageerror', 'meansquarederror', 'meansquaredlogarithmicerror', 'mse', 'mslelogcosh', 'poisson'})¶
- MULTIVARIATE_REGRESSION_LOSSES: FrozenSet[str] = frozenset({'cosinesimilarity', 'huber', 'huberloss', 'mae', 'mape', 'meanabsoluteerror', 'meanabsolutepercentageerror', 'meansquarederror', 'meansquaredlogarithmicerror', 'mse', 'mslelogcosh', 'poisson'})¶
- MULTI_CLASS_CLASSIFICATION_LOSSES: FrozenSet[str] = frozenset({'categoricalcrossentropy', 'categoricalhinge', 'kld', 'kldivergence', 'kullbackleiblerdivergence', 'sparsecategoricalcrossentropy'})¶
- MULTI_LABEL_CLASSIFICATION_LOSSES: FrozenSet[str] = frozenset({'binarycrossentropy', 'hinge', 'squaredhinge'})¶
- static create_model(learner: seqgra.learner.learner.Learner) → None[source]¶
- static evaluate_model(learner: seqgra.learner.learner.Learner, dataset)[source]¶
- static get_num_params(learner: seqgra.learner.learner.Learner) → seqgra.schema.ModelSize[source]¶
- static load_model(learner: seqgra.learner.learner.Learner, file_name: Optional[str] = None) → None[source]¶
- static predict(learner: seqgra.learner.learner.Learner, dataset)[source]¶
This is the forward calculation from x to y :returns: Output tensor with the computed logits. :rtype: softmax_linear
- static print_model_summary(learner: seqgra.learner.learner.Learner)[source]¶
- static save_model(learner: seqgra.learner.learner.Learner, file_name: Optional[str] = None) → None[source]¶
- static set_seed(learner: seqgra.learner.learner.Learner) → None[source]¶
- static train_model(learner: seqgra.learner.learner.Learner, training_dataset, validation_dataset, silent: bool = False) → None[source]¶
- static write_session_info(learner: seqgra.learner.learner.Learner) → None[source]¶