Skip to content

IG error in TF 2.3.0 (Supporting TF models with different input types) #285

Open
@Realvincentyuan

Description

@Realvincentyuan

I met this error below when running TF 2.3.0 in order to apply the IG on tabular data. I did not find the example of applying IG on tabular data so I plan to give it a shot.

Code

n_steps = 50
method = "gausslegendre"
internal_batch_size = 100
nb_samples = 10
ig  = IntegratedGradients(model,
                          layer=model.layers[1],
                          n_steps=n_steps,
                          method=method,
                          internal_batch_size=internal_batch_size)

Error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-29-291678075b16> in <module>()
      7                           n_steps=n_steps,
      8                           method=method,
----> 9                           internal_batch_size=internal_batch_size)

1 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/functional.py in input(self)
    233       AttributeError: If no inbound nodes are found.
    234     """
--> 235     return self._nested_inputs
    236 
    237   @property

AttributeError: 'Sequential' object has no attribute '_nested_inputs'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions