# Help with contructing a simple demo network

Posted 24 days ago
163 Views
|
3 Replies
|
3 Total Likes
|
 I wonder if someone could give some hint on constructing a simple demo program for class identification, more concretely a network which can identify a so-called "two phase flow regime". I believe the problem is not complicated, but I am a complete novice of using Wolfram codes for such a purpose, this is the only hinder. The various types of two phase flow of water in a heated channel are usually divided into four classes depending on the topology of the flow, called "bubbly", "slug", "churn-turbulent" and "annular". See an illustration below. My idea, following a webinar by Jon McLoone recently, was to start with downloading an already existing code for image identification from the Wolfram Neural Network Repository (Wolfram ImageIdentify Net V1), then re-train the network with my data. Here is a screenshot of the attempt I made: However, in this form it does not work, because the repository network has an output vector of size 4315, with labels which do not contain mine, i.e. "bubbly" etc. What I would need is to re-define the size of the output vector, and define the four classes which I want to use. Is this possible? If so, any hint on how? Or, is there a network in the repository, which is more suited to such a task? I would need this to make a small demonstration of pattern recognition with neural networks in a course which is about how to solve inverse tasks in diagnostics of industrial processes. Any input would be highly appreciated.
3 Replies
Sort By:
Posted 24 days ago
 Hi Imre,The Wolfram ImageIdentify NN was not trained with the types of images you are trying to classify. If you want to use it, you will have to use transfer learning which involves some net surgery. Drop the last two layers in the network, and chain a linear and non linear layer to the end and use a custom class decoder. Set the learning rate multipliers to None for all but the new layers and re-train. If you get stuck, post the code you have tried and I can help further.There is an example in the documentation here.With just one example from each class it is unlikely the network will perform well.