albermax / albermax/innvestigate

Got an error in Conv1D

Aperta
#170 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
1.3k
Fork
230
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I got an error when trying to perform sentiment analysis explanation with Conv1D. Is it possible to do it in Conv1D?

NotAnalyzeableModelException Traceback (most recent call last)
in
2
3 for method, kws in zip(methods, kwargs):
----> 4 analyzer = innvestigate.create_analyzer(method, model, **kws)
5 analyzer.fit(X_test, batch_size=256, verbose=1)
6 analyzers.append(analyzer)

~\AppData\Local\Continuum\anaconda3\envs\myenv\lib\site-packages\innvestigate\analyzer\__init__.py in create_analyzer(name, model, **kwargs)
138 "No analyzer with the name '%s' could be found."
139 " All possible names are: %s" % (name, list(analyzers.keys())))
--> 140 return analyzer_class(model, **kwargs)

~\AppData\Local\Continuum\anaconda3\envs\myenv\lib\site-packages\innvestigate\analyzer\pattern_based.py in __init__(self, model, patterns, pattern_type, **kwargs)
175 kwargs["reverse_project_bottleneck_layers"] = True
176
--> 177 super(PatternNet, self).__init__(model, **kwargs)
178
179 def _get_pattern_for_layer(self, layer, state):

~\AppData\Local\Continuum\anaconda3\envs\myenv\lib\site-packages\innvestigate\analyzer\base.py in __init__(self, model, reverse_verbose, reverse_clip_values, reverse_project_bottleneck_layers, reverse_check_min_max_values, reverse_check_finite, reverse_keep_tensors, reverse_reapply_on_copied_layers, **kwargs)
590 self._reverse_reapply_on_copied_layers = (
591 reverse_reapply_on_copied_layers)
--> 592 super(ReverseAnalyzerBase, self).__init__(model, **kwargs)
593
594 def _gradient_reverse_mapping(self, Xs, Ys, reversed_Ys, reverse_state):

~\AppData\Local\Continuum\anaconda3\envs\myenv\lib\site-packages\innvestigate\analyzer\base.py in __init__(self, model, neuron_selection_mode, allow_lambda_layers, **kwargs)
339 self._special_helper_layers = []
340
--> 341 super(AnalyzerNetworkBase, self).__init__(model, **kwargs)
342
343 def _add_model_softmax_check(self):

~\AppData\Local\Continuum\anaconda3\envs\myenv\lib\site-packages\innvestigate\analyzer\base.py in __init__(self, model, disable_model_checks)
71 self._disable_model_checks = disable_model_checks
72
---> 73 self._do_model_checks()
74
75 def _add_model_check(self, check, message, check_type="exception"):

~\AppData\Local\Continuum\anaconda3\envs\myenv\lib\site-packages\innvestigate\analyzer\base.py in _do_model_checks(self)
105
106 if check_type == "exception":
--> 107 raise NotAnalyzeableModelException(tmp_message)
108 elif check_type == "warning":
109 # TODO(albermax) only the first warning will be shown

NotAnalyzeableModelException: PatternNet is only well defined for conv2d/max-pooling/dense layers.
Check triggerd by layers: [, ]

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.