Open bzigon opened 6 years ago
Assume I have a simple model.
def create_model(out_classes): f1 = Dense(16, activation=C.relu,bias=True,init_bias=0,name='FLayer') l1 = Dense(16, activation=C.relu, bias=True, init_bias=0, name='LLayer')(f1) c1 = Dense(out_classes,name='CLayer')(l1) return c1
model = create_model(nClasses) z = model(feature)
How do I access the representation of the FLayer and LLayer during the testing of my trained model?
See here for an full example.
You can obtain a named node using: flayer = cntk.combine([z.find_by_name('FLayer').owner])
flayer = cntk.combine([z.find_by_name('FLayer').owner])
Then you can evaluate to obtain outputs using eval: output = flayer.eval(mb[...])
output = flayer.eval(mb[...])
Assume I have a simple model.
def create_model(out_classes): f1 = Dense(16, activation=C.relu,bias=True,init_bias=0,name='FLayer') l1 = Dense(16, activation=C.relu, bias=True, init_bias=0, name='LLayer')(f1) c1 = Dense(out_classes,name='CLayer')(l1) return c1
model = create_model(nClasses) z = model(feature)
How do I access the representation of the FLayer and LLayer during the testing of my trained model?