Open felix-tracxpoint opened 6 years ago
This exception is raised if the class definition is overwritten after instance creation. (It may occur in other cases, but I don't know.)
I write code for generating the same exception below.
# first "A" class definition
class A:
def test(self):
print(super(A, self))
# "A" class instantiation generation
a = A()
a.test() # no problem
# second "A" class definition (overwrite)
class A:
def test(self):
print(super(A, self))
a.test() # Error occurred!
TypeError: super(type, obj): obj must be an instance or subtype of type
Please check the environment where keras-vis was installed.
Is there keras-vis not only in ~\Anaconda3\envs\tracx\lib\site-packages\vis
but also in ./vis
etc?
I created a simple model that adds a global pooling layer and then 2 dense layers to VGG16 and learns to discriminate between 3 classes. It goes like this:
Now I am trying to visualize its saliency and/or GRAD-CAM using keras-vis but keep getting weird errors. Specifically, I am running this code:
and getting this error:
What am I doing wrong? Any help will be much appreciated.