Pular para o conteúdo principal

Postagens

Mostrando postagens de novembro, 2017

Visualize a neural network activation using JavaFX

Sometimes you want to visualize what is going on inside your neural network to identify what you could improve. This is not an easy task and may require patience. To help on this task I am sharing today a small JavaFX application that will go through all the activated layers and show the activated output and the ones that were not updated. The results are interesting, see some screenshots I took using the Brazilian coin model , which was trained on a deep pre-trained Resnet50 neural network: At the early layers we can see some sort of the shadow of the coin In the middle we can see some features that were activated Close to the end only some outputs were activated It is confusing when we check these huge third party neural networks. It is more interesting when we inspect some neural network we created ourselves. Remember when we used a trained MNIST model in a JavaFX application ? These are the layers after an image classification: This was possible using the ac...

Generic Telegram bot for image classification using DL4J

This might be useful for someone else. Using the TelegramBots Java API I build a generic bot which you can use for any ComputationGraph you exported from a DeepLearning4J application. The bot simple gets any image it receives and use the model to predict an output. All you have to do is ask for a BotFather  key and set a few system properties: bot.username : Your bot userame bot.token : The bot token you got from  BotFather classifier.labels : The model labels separated by comma classifier.modelpath : The full filesystem path to the model classifier.inputformat : Input image height, width and number of channels separated by comma How it works: First you train your model using DeepLearning4J API and export it . See as example what we did in our Brazilian coin classification post ; Second you get a bot key using  BotFather ; Now you can clone the code from github and build it using mvn clean package (I am considering you already have maven); Finally...