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
I'm wondering how
MaskingLayer works.I try to write simple model to test
MaskingonActivationLayerand the result of prediction is
Is this the correct behavior?
My keras version is 1.0.5