kundajelab / deeplift

Public facing deeplift repo
MIT License
805 stars 162 forks source link

getting non zero prediction difference #80

Open MuskaanJain opened 5 years ago

MuskaanJain commented 5 years ago

Hi,

When applying deeplift over the dataset of "cats and dogs" with the same architecture as provided in Mnist examples. The difference in predictions is coming to be a non-zero value.

Model

model = Sequential() model.add(Conv2D(filters=32, kernel_size=(4,4), strides=(2,2), input_shape=(1, 150, 150))) model.add(Activation("relu")) model.add(Conv2D(filters=64, kernel_size=(4,4), strides=(2,2))) model.add(Activation("relu")) model.add(Dropout(0.25)) model.add(Flatten()) model.add(Dense(units=128)) model.add(Activation("relu")) model.add(Dropout(0.5)) model.add(Dense(units=2)) model.add(Activation("softmax")) from keras.optimizers import Adam model.compile(optimizer=Adam(lr=0.001), loss='categorical_crossentropy', metrics=['accuracy'])

keras version : 2.2.0 tensorflow version : 1.10.1

I started with some another architecture but it was showing the difference so for a trial, I changed the architecture same as that used in Mnist example but then I am getting the difference again.

AvantiShri commented 5 years ago

How big is the difference you are observing?

On Tue, Jun 4, 2019 at 5:30 AM Muskaan Jain notifications@github.com wrote:

Hi,

When applying deeplift over the dataset of "cats and dogs" with the same architecture as provided in Mnist examples. The difference in predictions is coming to be a non-zero value.

Model

model = Sequential() model.add(Conv2D(filters=32, kernel_size=(4,4), strides=(2,2), input_shape=(1, 150, 150))) model.add(Activation("relu")) model.add(Conv2D(filters=64, kernel_size=(4,4), strides=(2,2))) model.add(Activation("relu")) model.add(Dropout(0.25)) model.add(Flatten()) model.add(Dense(units=128)) model.add(Activation("relu")) model.add(Dropout(0.5)) model.add(Dense(units=2)) model.add(Activation("softmax")) from keras.optimizers import Adam model.compile(optimizer=Adam(lr=0.001), loss='categorical_crossentropy', metrics=['accuracy'])

keras version : 2.2.0 tensorflow version : 1.10.1

I started with some another architecture but it was showing the difference so for a trial, I changed the architecture same as that used in Mnist example but then I am getting the difference again.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kundajelab/deeplift/issues/80?email_source=notifications&email_token=AARSFBUXTTBXHKWBGKSU2B3PYZN53A5CNFSM4HS323KKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXQPXIQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AARSFBWDGGSV5U342BMW4HTPYZN53ANCNFSM4HS323KA .

-- Sent from my phone, please excuse brevity/typos

MuskaanJain commented 5 years ago

difference in predictions: 0.93792415

AvantiShri commented 5 years ago

Can you send me your model? I would need to replicate the error to understand the issue

On Tue, Jun 4, 2019 at 5:34 AM Muskaan Jain notifications@github.com wrote:

difference in predictions: 0.93792415

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/kundajelab/deeplift/issues/80?email_source=notifications&email_token=AARSFBQYU5YTGLL7XCSWL6LPYZONFA5CNFSM4HS323KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW4NIDY#issuecomment-498652175, or mute the thread https://github.com/notifications/unsubscribe-auth/AARSFBQNUI6IAMM3BTNY5HDPYZONFANCNFSM4HS323KA .

-- Sent from my phone, please excuse brevity/typos

MuskaanJain commented 5 years ago

By model, do you mean the architecture which is sent above or the whole code?

AvantiShri commented 5 years ago

I'm specifically thinking of the weights file. If you could point me to the dataset you used, that would also be helpful.

On Tue, 4 Jun 2019 at 05:38, Muskaan Jain notifications@github.com wrote:

By model, do you mean the architecture which is sent above or the whole code?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kundajelab/deeplift/issues/80?email_source=notifications&email_token=AARSFBUFT3CK2GQLOSJBWRTPYZO45A5CNFSM4HS323KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW4NSTY#issuecomment-498653519, or mute the thread https://github.com/notifications/unsubscribe-auth/AARSFBU7HRIUTGA5TM4F7LTPYZO45ANCNFSM4HS323KA .

MuskaanJain commented 5 years ago

https://www.kaggle.com/c/dogs-vs-cats/data - dataset link

MuskaanJain commented 5 years ago

I am not able to upload the weights file.