Closed AdDenissen closed 4 years ago
Hi, in RSNNS, though it is possible, regretfully I don't think there is an easy way to do it. A good starting point will be demo/mlp_irisSnnsR.R . You have essentially three options.
Call saveNet(), I think that saves the activations of all units. Though you need to make sure that the last thing the network has seen is the pattern you are interested in. With predict(...) that should be possible, or one of the low level functions.
Another option would be to do something along the lines of the functions in R/SnnsR_extractNetInfo.R You'd have to call getUnitActivation(SEXP UnitNo) on every unit you are interested in.
The third option is again to save the net and load it into javaNNS. That should allow you to see the activations.
Hi,
Thanks for the tips. I used examples from SnnsR_extractNetInfo.R to fix the problem.
I can nicely observe the network activity based in the inputs.
Ad Denissen Principal System Architect Philips Research Brain, Behaviour & Cognition High Tech Campus 34 3.014 5656 AE Eindhoven GSM. +31-6226-77777
From: cbergmeir notifications@github.com Sent: Monday, July 13, 2020 05:23 To: cbergmeir/RSNNS RSNNS@noreply.github.com Cc: Denissen, Ad ad.denissen@philips.com; Author author@noreply.github.com Subject: Re: [cbergmeir/RSNNS] How to show the values of hidden nodes in a mlp model (#21)
Hi, in RSNNS, though it is possible, regretfully I don't think there is an easy way to do it. A good starting point will be demo/mlp_irisSnnsR.R . You have essentially three options.
Call saveNet(), I think that saves the activations of all units. Though you need to make sure that the last thing the network has seen is the pattern you are interested in. With predict(...) that should be possible, or one of the low level functions.
Another option would be to do something along the lines of the functions in R/SnnsR_extractNetInfo.R You'd have to call getUnitActivation(SEXP UnitNo) on every unit you are interested in.
The third option is again to save the net and load it into javaNNS. That should allow you to see the activations.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcbergmeir%2FRSNNS%2Fissues%2F21%23issuecomment-657338036&data=02%7C01%7C%7C5256588d14e94681004d08d826dc2ecd%7C1a407a2d76754d178692b3ac285306e4%7C0%7C1%7C637302074403721753&sdata=zeXpBCbdKhy0gl3D6oLDeC4YFiEsVjS9vsVacY0b2aA%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADSJSBXNTA6BZ2KWJTDP7KLR3J445ANCNFSM4NTNRK3A&data=02%7C01%7C%7C5256588d14e94681004d08d826dc2ecd%7C1a407a2d76754d178692b3ac285306e4%7C0%7C1%7C637302074403721753&sdata=YwCPHBnnKf05moIEM6O%2Ffh%2BtxqRLropvtDEAwiXJXC8%3D&reserved=0.
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
Hi,
I'm glad to hear you could get it to work.
Regards, Christoph
Dear developer,
How can I predict the value of hidden nodes in a mlp model?
For keras I can short the model upto a layer call 'dense_1' and make my predictions on 'ph.test': layer_name <- 'dense_1'; chk_model <- keras_model(inputs=model$input, outputs=get_layer(model, layer_name)$output); chko <- predict(chk_model, ph.test);
Thanks in advance,
Ad Denissen.