Hello everyone, before we build our neural network for the project, we'll need a few helper functions. So in the next few videos, we are going to write all helper functions that will allow us to build our model like Lego blocks. In this video, we are going to focus on creating model placeholders. In other words, inputs to the model. This function takes two arguments, image size, and as you can see here, it is a tupple of height and weight of an image. The first placeholder that we will have to create is one that will receive images.
The data type of this placeholder is float 32 because of the network calculations, and the shape that this placeholder will receive, will be set to none. Image Size of zero, and image size of one. And because we are working with images in RGB format, we have to set free as our last dimension name of this placeholder will just put images. So let's briefly explain why we use this particular shape. If you haven't worked with tensor flow before, this nun, as our first dimension will allow us to import whatever number of images that we want. So batch size of one, or 128 doesn't really matter, because we can import whatever number of images at once that we want.
Image Size of zero in the image size of one, we'll make sure that we have height and width of the image in our data set. And as I said before, free is the number of channels because we are using RGB format. The next placeholder that we are going to create is for our targets. The data type will be in 32, because our loss function is sparse, softmax cross entropy, but more on that later, the shape is just going to be none. So this placeholder expects an array of integers as input, and where, where each element will be true label of an image. The first and the last placeholder is used for dropout rate.
In some parts of the architecture, we're going to introduce the regularization technique called dropout. This technique will randomly choose neurons in our layers and set them to zero. So those are not going to be updated. And the probability will indicate how many of neurons will be dropped. return them all, and you're all set. That's it for our model input function.
If you have any questions or comments, please post them in the comment section. Otherwise, I'll see you in the next