-
Notifications
You must be signed in to change notification settings - Fork 19.6k
Closed
Description
I'm wondering how Masking Layer works.
I try to write simple model to test Masking on Activation Layer
from keras.models import Model
import numpy as np
from keras.layers import Masking, Activation, Input
a = np.array([[3.,1.,2.,2.,0.,0.]])
inputs = Input(shape=(6,))
mask = Masking(mask_value=0.0)(inputs)
softmax = Activation('softmax')(mask)
model = Model(input=inputs,output=softmax)
model.predict(a)and the result of prediction is
array([[ 0.50744212, 0.06867483, 0.18667753, 0.18667753, 0.02526405,
0.02526405]])
Is this the correct behavior?
My keras version is 1.0.5
jayinai, LopezGG, honnibal, fferroni, incredelous and 23 more
Metadata
Metadata
Assignees
Labels
No labels