TODO(amalevich): more documnetation on input args use_attribution: if True, will generate the atrribution net for feature importance calculation; Need to turn it to false when FC is quantized as FP16 This attribute access will be consistent with MTML mod
(self, name, input_feature_schema, trainer_extra_schema,
keep_blobs=False,
use_attribution=True)
| 37 | """ |
| 38 | |
| 39 | def __init__(self, name, input_feature_schema, trainer_extra_schema, |
| 40 | keep_blobs=False, |
| 41 | use_attribution=True): |
| 42 | ''' TODO(amalevich): more documnetation on input args |
| 43 | |
| 44 | use_attribution: |
| 45 | if True, will generate the atrribution net for feature importance |
| 46 | calculation; Need to turn it to false when FC is quantized as FP16 |
| 47 | This attribute access will be consistent with MTML model. |
| 48 | ''' |
| 49 | |
| 50 | super().__init__(name=name) |
| 51 | self._layer_names = set() |
| 52 | self._layers = [] |
| 53 | self._param_to_shape = {} |
| 54 | |
| 55 | # seed default |
| 56 | self._seed = None |
| 57 | self._sequence_seed = True |
| 58 | |
| 59 | # optimizer bookkeeping |
| 60 | self.param_to_optim = {} |
| 61 | self.param_to_reg = {} |
| 62 | |
| 63 | self._default_optimizer = None |
| 64 | self._loss = None |
| 65 | self._prediction = [] |
| 66 | self._output_schema = None |
| 67 | |
| 68 | self._post_grad_net_modifiers = [] |
| 69 | self._final_net_modifiers = [] |
| 70 | |
| 71 | # breakdown map; breakdown features are categorical (like dense) but not |
| 72 | # necessarily used to represent data for training |
| 73 | self._breakdown_map = None |
| 74 | |
| 75 | # Connect Schema to self.net. That particular instance of schmea will be |
| 76 | # use for generation of the Layers across the network and would be used |
| 77 | # for connection with Readers. |
| 78 | self._input_feature_schema = schema.NewRecord( |
| 79 | self.net, |
| 80 | input_feature_schema |
| 81 | ) if not keep_blobs else input_feature_schema.clone() |
| 82 | self._trainer_extra_schema = schema.NewRecord( |
| 83 | self.net, |
| 84 | trainer_extra_schema |
| 85 | ) if not keep_blobs else trainer_extra_schema.clone() |
| 86 | self._metrics_schema = schema.Struct() |
| 87 | |
| 88 | self._preproc_output_schema = None |
| 89 | |
| 90 | self._init_global_constants() |
| 91 | self.param_init_net = self.create_init_net('param_init_net') |
| 92 | self._initialize_params = True |
| 93 | |
| 94 | self._transfer_learning_blob_name_mappings = None |
| 95 | |
| 96 | # additional (hard-coded) diagnose_options to report based on the model |
nothing calls this directly
no test coverage detected