You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with DeepExplain(session=K.get_session()) as de:
model_path = os.path.join(os.getcwd(),'N58_1','FOLD_00','model_E099_0.897.hdf5')
model = load_model(model_path)
flat = Reshape(target_shape=(256*256,))(model.layers[-1].output)
flat_model = Model(model.layers[0].input,flat)
input_tensor = flat_model.layers[0].input
target_tensor = flat_model(input_tensor)
xs = images[0][np.newaxis,...]
ys = np.zeros(256**2)
ys = ys[np.newaxis,...]
ys[0,15678] = 1
attributions_oc = de.explain('occlusion',target_tensor,input_tensor,xs,window_shape=(32,32,1),step=16)
Basically, I have an encoder-decoder neural network and I want to see if I can determine feature importances for particular output pixels. However, when I run this code,
The output is all zero (I tried plotting it in the session context)
And attributions_oc does not appear to exist. That is, it is not accessible in my jupyter notebook.
Yet, I have no errors. I am wondering what I am doing wrong?
The text was updated successfully, but these errors were encountered:
I have the following code:
Basically, I have an encoder-decoder neural network and I want to see if I can determine feature importances for particular output pixels. However, when I run this code,
Yet, I have no errors. I am wondering what I am doing wrong?
The text was updated successfully, but these errors were encountered: