 Continue from where we left off so doing this neural network trainer web application in Flask it's doing something training to hidden layer a neural network that predicts this trying to predict this sinusoid waveform you can change your training set size from 1 to 150 is default we try 100 just adding more data points in there so hopefully it helps the training maybe a bit we get about to actually get a good result of this just pop it in to HHPT quickly the problem that I'm trying to figure out well that's mean to some of you it will be obvious why does that happen but with the same parameters when we retrain a we don't get the same results every time just a bit odd that is happening if you know let me know if you know it's not even something LLM would have said it's very poorly phrased isn't it yeah but you can see here that we train the same thing using the same parameters the input is the same it has zero noise level and we get very different results and yes if you're unchecked by Nikas.com please go do so you'll be supporting the project that way so one suggestion as to what could be going on this random initialization we tried setting up a set number of seed function but that utility is not present so we're getting an error out of it it seems like TensorFlow.js doesn't have a built-in method to set global random seed and it's using building JavaScript math random function for generating random numbers which does not support setting a seed this means that the randomness in TensorFlow is not deterministic if we need deterministic behavior we need to mock the random number generation function used in the code to return predictable value but that won't affect the randomness in the TensorFlow.js library okay essentially two chatbots talking to one another what else was suggested use non-stochastic optimizer this isn't always feasible since stochastic optimizers are typically more effective but in some cases using non-stochastic optimizer might yield more consistent results and how do i do that let's ask co-pilot the model optimizer cgd aren't we selecting it from yes if you're using sgd like that aren't we meant to be the stochastic gradient descent let me just do it by selecting sgd as you can tell they are still different every time you train and so sgd stochastic gradient descent is non-stochastic optimizer this will override well no we don't want to do it we can just select sgd as default so we don't need that and select it as default in the html keep in mind that this might not always be the best choice stochastic optimizer is our friend better well first it doesn't even work it does not work so when using non-stochastic optimizer sgd does seem to make a difference the training is still different every time very different every iteration and what else increase model robustness okay that might require a separate prompt increasing model robustness making model architecture more robust can reduce the impact of robustness yeah we select it let's see if a core pilot can help with anything i think it's suggesting to add more layers two more layers for each hidden layer the number of units in these layers is the same as the original hidden layers the activation function is also the same adding more layers or neurons can make your model more complex and might lead to overfitting well thanks for that do we really need a more complex averaging results train model several times and average the prediction from each run start with that quickly by the way while it's generating yes someone was posting this what are they called what about this game right so i had the apparently this statistical inference so it should you need to find what's that are related to statistical analysis a very fun game of course and who wouldn't who would be better at playing this game that gpt4 but really it couldn't couldn't actually do it it couldn't generate code that actually possible directions what okay so it's searching so generated python code that is supposed to take that image it's turning it into a grid matrix it generated a list of a theme a wards related i'm sure it can generate like a zillion of them that's what it's good at right well i mean the actual llm and then python could just do the automated search and i know a cool thing about it yeah i'm thinking adding something like that to the to the website where you could play these games and select the topic so for example select whatever statistic so it gives you you know this one and you have to find this word but muscle might also give you eg and analysis and then you have to find what's related to eg analysis how cool would that be but of course we won't be doing those manually i think some people do we want to have something automating the generation of those letter grids pretty sure it can do it yeah i'm pretty sure it's having trouble to actually solve this one to play this game it's trying to run stuff on its own server which is never successful i don't even know why you know why bother so i need to run it locally might try it sometime maybe next week you have to remind me just read this quickly because i've been talking too much okay this is nice but we actually need to improve the code so assuming we do not need to make this model more complicated than it already is what can we improve on the visualization front the css code is not doing super well sorry for that had to sneeze like it there is a it was not snooze a mute button it can be very helpful yeah so that's what it looks like when when they use the css that we currently have but kind of it makes things a bit it how do i say it politely ugly and let's format the document quickly you only have about 86 lines of html the rest is the description we're not currently doing anything in the in python however it would probably could store you know each run on the server do i want your runs so if someone's using the website um it will actually send all the parameters and the result and the result should be just one value like the minimum a training loss function output and then we'll need like an iteration number this will be a table that we store i don't know is it useful though let me know what you think and yes go check out bioniccares.com all the tools i develop eventually available on this website they all being deployed eventually will be helping out the project by visiting the website and because you'll be watching some ads so don't forget to turn off your ad blocker when you do so let's do one more iteration css can we improve the css script currently when the window is wide the controls are not displayed on the side of the two charts can we fix this here is the code that we currently have so it becomes and not very usable okay so it's adjusted the controllers today still don't appear on yeah once something doesn't work in the first prompt it probably would not work at all so on the narrow screen it's working as expected however on the wider screen the controls don't seem to fit on the side of the two charts yep and regenerating the whole css obviously not gonna read it all there's no way i will however test that and it's 120 lines it's reduced the number of lines no it's not right it's still generating because i copied it halfway through generation that's not cool okay what a nerve okay so it's on small window it's fine on larger window it still doesn't fit the max width for the controls on larger screens doesn't work on the narrow screen they will just appear top to bottom this one does not okay still doesn't work on the larger screen the controls do not appear on the side of the two charts can we use a different approach on the larger screen just make sure that the controls fit make the on again on the larger screen make the charts with not not to be wider than two-thirds of the screen let's regenerate this thing okay seven eighty seven eighty a main content space flex dot center okay let's go see it works on smaller screen larger screen that stuff meant to be in there why is it not working need to make sure this one is not too wide train there what's this button called i've got train button why why is it too wide who knows train button they controls are still not on the side of the charts something is still wrong can you check the whole css code yep yeah when it's starting to generate slowly like this it's a very not good sign well this way have something working so i don't know if it's yeah you always want to fix everything before you know the big release but we won't be able to fix everything yes on the screen like this theory when you go mobile it's 412 a pixel width it also doesn't seem to be correct on a smaller screen uh painful why so painful came two columns sounds good and what are we doing to the canvas this should apply to aim all cases is it and we're moving padding on larger screen we want to make sure two columns are side by side that didn't work did funny business okay what's going on there's something not flexing something not flexing there's a problem um legs direction comment for the main content with padding as well then on a smaller screen it doesn't actually work this is a mobile it still doesn't work can we regenerate the whole css code start fresh yeah this is the problem with neural nets is like it's highly non-deterministic like as in when it shouldn't be that non-deterministic it's me let me turn off the css for a sec yeah i'll just keep it in this view yeah now it's kind of training okay now it's uh converging before it was doing funny stuff and yes there is a lot of things we could improve mainly we're just trying to improve the css then canvas box shadow okay don't need that okay larger screens so we get two thirds for the charts and one third for the controls coming up to two there is it yeah remove the smaller screen configuration stuff yeah whatever it's a bit odd but uh converge the training sets nice yeah sometimes just restarting the training helps which is a bit odd yeah there's too much random stuff uh unit shade don't like but uh yeah neural nets are not going anywhere yeah we're doing too much to fix the styling of it and let's go back to this yeah no let's wait it should be a simple training exercise the model should be as simple as possible we are just trying to predict the sinusoid so especially with no noise in it the prediction result should be perfect and then later we want to see how increasing noise in the sinusoid will reduce the performance of the prediction algorithm below is the code that we currently have any suggestions uh welcome while it's generating yeah we have this other thing that we would like to to do it's a bit of a game that's how we learn what are these things called a search puzzle and we just call it the puzzle we'll have a good puzzle don't we in for text that the image is broken should have it somewhere dead break can you see random in it i don't see anything i think like the way it's uh you know what the image is being displayed the letters are being displayed probably makes a lot of difference maybe if the inside boxes might help aren't they normally inside boxes puzzles like this where is data or did it just hallucinate well anyway it started generating um fighting code that we actually use uh want to use to solve these puzzles but if we can solve a puzzle then we should be also be able to generate more of these puzzles yeah that image that's not really an info file this is the prompt to like a prompt one prompt two files we can actually monitor how many sessions we had with a specific tool yeah the info text should have other things in it so we'd like a tool to be able to generate and solve a puzzles or like this and we want it as a flask application go yep stop programming it's more like the the other way around is it prompts the info will be yes stuff like that that would be a good uh info yeah we don't like multiple html's uh we'd like it to be visible in one window and yes we'd like it to be a flask application but most of the stuff if possible should be done in javascript so we don't spend too much electricity on the server okay well that one's generating we can go go back a couple things we'll turn this in can you turn this into html text and then obviously done is working much better as activation function we will read everything before publishing yeah so might want to change the optimizer to sgd by default select sgd as default instead of adam and the activation function and i want to be using can we use tanh as default instead of the relu no yeah so we have sgd as optimizer and tanh as the activation function because apparently it's better for sign or so at the prediction and yes it is doing much better i'm pretty happy with that it's not perfect so we want we don't want it to be perfect let's train again with more data points it's getting pretty close to zero the training was that's pretty good the question is what happens when we increase noise level let's just pop it through the roof and as before it's still pretty good probably could increase the noise level one more two steps off point one should be fine begin with can i have point five why do we need this number here and there so i have some minimal noise get down to point one a training loss if we increase the training does it getting yeah just below point one it's only marginal improvement increase the number of hidden layer size both the first and second to six and four see what happens it's pretty much the same learning rate yeah doesn't make much difference restart yeah let's do drinks that size the 100 noise level large the largest can take or yeah so well that's what we wanted that's what we wanted to happen to show how this increase noise the performance of this prediction reduces and when we move the noise to zero the performance should increase it's not white it's zero six as opposed to point four uh yeah so there you go pretty happy with it we'll try publishing it on the website still might do a few minor improvements have the text over there is pretty much the it's pretty much the prompts yes yes will be clashing because we have the style template for the whole project so we don't want the tool style sheets to interfere with one another and better finish up they yeah happy with that example of how to train a neural net can you give a summary we are currently live streaming on youtube so you could also do an out draw be nice yep what's the recent tool on binary chaos.com go check it out it was that plan out one but we also have the particle motion ccg label bot um really matter we need the template for what's this called particles to particles particles the hgm this is not a flask application this one yeah let's go for this is just JavaScript let's go for cardio bot cardio bot must be a flask up as it is a couple of things from it we need this my app a file for neural neural net and what else do we need in the html for this thing templates index html we need a bunch of stuff in the body in this header that's what yeah makes it look more familiar yes we can put ads already it's okay otherwise we'll forget later on to type uh is that thinking it's doing anything neural network trainer a web-based neural network training interface that allows train neural network on the fly even the browser using TensorFlow.js sounds amazing an image um we don't have an image to update this later right and we have the styles it says for for this tool and then for the whole project what and you know finish finish it up later on i'll see you in a bit let me know if there's any question put them in the comment don't forget to check out binary chaos.com you'll be helping the project this way