733f571ff1c5297f798d2829bb4a6fc6e3f3170b,deeplift/models.py,Model,_set_scoring_mode_for_target_layer,#Model#,125

Before Change


                      +" layer but it is not an activation layer"
                      +", which seems odd...if doing regression, make"
                      +" sure to set the target layer to the last layer")
            deeplift.util.assert_is_type(final_activation_layer,
                                         layers.Activation,
                                         "final_activation_layer")
            final_activation_type = type(final_activation_layer).__name__

            if (final_activation_type == "Sigmoid"):
                scoring_mode=ScoringMode.OneAndZeros

After Change


                  +" classification)")
        scoring_mode=ScoringMode.OneAndZeros
        if (len(target_layer.get_output_layers())>0):
            if (len(target_layer.get_output_layers())>1):
                print("WARNING: the target layer"
                      +str(target_layer.get_name())
                      +" has multiple output layers"
                      +str(target_layer.get_output_layers()))
            else: 
                final_activation_layer = target_layer.get_output_layers()[0]
                if (deeplift.util.is_type(final_activation_layer,
                                          layers.Activation)==False):
                    print("\n\nWARNING!!! There is a layer after your target"
                          +" layer but it is not an activation layer"
                          +", which is unusual; double check you have set"
                          +" the target layer correctly.\n\n")
                scoring_mode=ScoringMode.OneAndZeros
        target_layer.set_scoring_mode(scoring_mode)    
    
    def save_to_yaml_only(self, file_name):
        raise NotImplementedError()    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: kundajelab/deeplift
Commit Name: 733f571ff1c5297f798d2829bb4a6fc6e3f3170b
Time: 2020-01-07
Author: avanti.shrikumar@gmail.com
File Name: deeplift/models.py
Class Name: Model
Method Name: _set_scoring_mode_for_target_layer


Project Name: RaRe-Technologies/gensim
Commit Name: 4b673b46d51cb92bbff0e76d364dfec448c80ec3
Time: 2019-07-08
Author: m@penkov.dev
File Name: release/bump_version.py
Class Name:
Method Name: bump


Project Name: iskandr/fancyimpute
Commit Name: 1fbc3ca1ec4c7a5bd2e56cd27adfbc565195bed0
Time: 2016-01-27
Author: alex.rubinsteyn@gmail.com
File Name: fancyimpute/knn.py
Class Name: KNN
Method Name: solve