

{"id":14947,"date":"2018-05-21T06:00:16","date_gmt":"2018-05-21T06:00:16","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=14947"},"modified":"2021-05-14T11:00:19","modified_gmt":"2021-05-14T05:30:19","slug":"cnn-tensorflow-cifar-10","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/","title":{"rendered":"Convolutional Neural Network (CNN)| CIFAR 10 TensorFlow"},"content":{"rendered":"<p><span style=\"font-weight: 400\">In our previous <strong>Tensorflow tutorial<\/strong>, we discussed<strong> MNIST<\/strong> with TensorFlow. Today we\u2019ll be learning how to build a Convolutional Neural Network (CNN) using TensorFlow in CIFAR 10 Model. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Moreover, in this Convolution Neural Network Tutorial, we will see CIFAR 10 CNN TensorFlow model architecture and also the predictions for this model. Along with this, we will learn training and launching of CIFAR 10 model with TensorFlow Convolutional Neural Network example.<\/span><\/p>\n<p>So, let&#8217;s begin the Convolutional Neural Network (CNN) in TensorFlow.<\/p>\n<h2><span style=\"font-weight: 400\">Working With Convolutional Neural Network<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Before we start, it\u2019ll be good to understand the working of a convolutional neural network.<\/span><\/p>\n<p><span style=\"font-weight: 400\"> Basically, we will be working on the CIFAR 10 dataset, which is a dataset used for object recognition and consists of 60,000 32&#215;32 images which contain one of the ten object classes including aeroplane, automobile, car, bird, dog, frog, horse, ship, and truck.<\/span><\/p>\n<div id=\"attachment_14951\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Typical_cnn.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-14951\" class=\"wp-image-14951 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Typical_cnn.png\" alt=\"Working of Convolutional Neural Network\" width=\"1200\" height=\"489\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Typical_cnn.png 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Typical_cnn-150x61.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Typical_cnn-300x122.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Typical_cnn-768x313.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Typical_cnn-1024x417.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-14951\" class=\"wp-caption-text\">Working of Convolutional Neural Network<\/p><\/div>\n<p><span style=\"font-weight: 400\">You can download the dataset from\u00a0<\/span><a href=\"https:\/\/www.cs.toronto.edu\/~kriz\/cifar.html\"><span style=\"font-weight: 400\">https:\/\/www.cs.toronto.edu\/~kriz\/cifar.html<\/span><\/a><span style=\"font-weight: 400\">. You can use other datasets as well, but for the sake of convenience, CIFAR 10 is used here.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">CIFAR 10 TensorFlow Model Architecture<\/span><\/h2>\n<p><span style=\"font-weight: 400\">This Convolutional neural network Model achieves a peak performance of about 86% accuracy within a few hours of training time on a GPU. Following is a list of the files you\u2019ll be needing: <\/span><br \/>\n<i><\/i><\/p>\n<p><strong><i>cifar10_input.py<\/i><\/strong> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<strong>Reads the native CIFAR-10 binary file format.<\/strong><\/span><br \/>\n<strong><i>cifar10.py <\/i> <\/strong><span style=\"font-weight: 400\"><strong> \u00a0<\/strong>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<strong>Builds the CIFAR-10 model.<\/strong><\/span><br \/>\n<strong><i>cifar10_train.py<\/i><\/strong> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<strong>Trains a CIFAR-10 model on a CPU or GPU.<\/strong><\/span><br \/>\n<strong><i>cifar10_multi_gpu_train.py<\/i><\/strong>\u00a0 \u00a0 \u00a0\u00a0<span style=\"font-weight: 400\"><strong>Trains a CIFAR-10 model on multiple GPUs<\/strong>.<\/span><br \/>\n<i><span style=\"font-weight: 400\"><strong>cifar10_eval.py<\/strong> \u00a0\u00a0\u00a0\u00a0\u00a0<\/span><\/i> <span style=\"font-weight: 400\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<strong>Evaluates the predictive performance of a CIFAR-10 model.<\/strong><\/span><\/p>\n<h3>a. Inputs<\/h3>\n<p><span style=\"font-weight: 400\">Basically, the input part of the CIFAR 10 CNN TensorFlow model is built by the functions inputs() and distorted_inputs() which read images from the CIFAR 10 binary data files. <\/span><\/p>\n<p><span style=\"font-weight: 400\">These files contain fixed byte length records, so you can use <\/span><i><span style=\"font-weight: 400\">tf.FixedLengthRecordReader<\/span><\/i><span style=\"font-weight: 400\">. You can look at Reading Data to learn more about how the Reader class works.<\/span><\/p>\n<p><span style=\"font-weight: 400\">First, crop the images are up to 24 x 24 pixels. To make the model insensitive to the dynamic range they are approximately whitened. For training, you can apply a series of random distortions like flipping the image horizontally, changing the brightness or the contrast, to artificially increase the data set size<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Prediction for CIFAR 10 Model<\/span><\/h2>\n<p><span style=\"font-weight: 400\">The prediction part of the CIFAR 10 Convolutional Neural Network model is constructed by the inference() function which adds operations to compute the logic of the predictions. The following are the layers you need to build for the model to work properly:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Conv1<\/span> <span style=\"font-weight: 400\">convolution and rectified linear activation.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Pool1<\/span> <span style=\"font-weight: 400\">max pooling.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Norm1<\/span> <span style=\"font-weight: 400\">local response normalization.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Conv2<\/span> <span style=\"font-weight: 400\">convolution and rectified linear activation.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Norm2<\/span> <span style=\"font-weight: 400\">local response normalization.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Pool2<\/span> <span style=\"font-weight: 400\">max pooling.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Local3<\/span> <span style=\"font-weight: 400\">fully connected layer with rectified linear activation.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Local4<\/span> <span style=\"font-weight: 400\">fully connected layer with rectified linear activation.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Softmax_linear<\/span> <span style=\"font-weight: 400\">linear transformation to produce logic.<\/span><\/li>\n<\/ul>\n<div id=\"attachment_14952\" style=\"width: 165px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_graph.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-14952\" class=\"wp-image-14952 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_graph.png\" alt=\"CIFAR-10\" width=\"155\" height=\"662\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_graph.png 155w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_graph-35x150.png 35w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_graph-70x300.png 70w\" sizes=\"auto, (max-width: 155px) 100vw, 155px\" \/><\/a><p id=\"caption-attachment-14952\" class=\"wp-caption-text\">Prediction of CIFAR-10 CNN<\/p><\/div>\n<h2><span style=\"font-weight: 400\">Training the CIFAR 10 Model<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Now, we can use multinomial logistic regression, which is softmax regression. Softmax regression applies a nonlinearity to the output of the network and calculates the cross-entropy between the normalized predictions and the label index as described in the previous articles. <\/span><\/p>\n<p><span style=\"font-weight: 400\">The sum of the cross-entropy loss is the objective function of the model and all these weight decay terms, as returned by the loss() function.<\/span><\/p>\n<p><span style=\"font-weight: 400\">CIFAR 10 Loss<\/span><\/p>\n<div id=\"attachment_14953\" style=\"width: 329px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_loss.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-14953\" class=\"wp-image-14953 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_loss.png\" alt=\"CIFAR-10\" width=\"319\" height=\"216\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_loss.png 319w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_loss-150x102.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_loss-300x203.png 300w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/a><p id=\"caption-attachment-14953\" class=\"wp-caption-text\">CIFAR 10 CNN TensorFlow Loss Graph<\/p><\/div>\n<p>So, using standard gradient descent algorithm with a learning rate.<br \/>\n<span style=\"font-weight: 400\">CIFAR-10 Learning Rate Decay<\/span><\/p>\n<div id=\"attachment_14954\" style=\"width: 322px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_lr_decay.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-14954\" class=\"wp-image-14954 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_lr_decay.png\" alt=\"CIFAR-10\" width=\"312\" height=\"212\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_lr_decay.png 312w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_lr_decay-150x102.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/cifar_lr_decay-300x204.png 300w\" sizes=\"auto, (max-width: 312px) 100vw, 312px\" \/><\/a><p id=\"caption-attachment-14954\" class=\"wp-caption-text\">CIFAR-10- Learning Rate Decay<\/p><\/div>\n<h2><span style=\"font-weight: 400\">Launching the CIFAR 10 CNN Model<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Now, you can launch and run the training operation with the script.<\/span><br \/>\n<strong><i>python cifar10_train.py<\/i><\/strong><\/p>\n<p><span style=\"font-weight: 400\">Here, the reported loss is the average loss of the most recent batch. This loss is the sum of the cross-entropy and all weight decay terms.<\/span><br \/>\n<i><\/i><\/p>\n<p><i><span style=\"font-weight: 400\">cifar10_train.py<\/span><\/i><span style=\"font-weight: 400\"> periodically saves all model parameters in checkpoint files but it does not evaluate the model. cifar10_eval.py use the checkpoint file to measure the predictive performance (see Evaluating a Model below).<\/span><\/p>\n<p><span style=\"font-weight: 400\">TensorBoard provides the functionality of displaying data exported periodically from <strong>cifar10_train.py via a <\/strong><\/span><strong><i>tf.summary.FileWriter<\/i>.<\/strong><\/p>\n<h2><span style=\"font-weight: 400\">Evaluation of CNN Model<\/span><\/h2>\n<p><span style=\"font-weight: 400\">By the given\u00a0below script, a model is evaluated. It uses all 10,000 images\u00a0in the evaluation set of CIFAR 10 and constructs a model with the inference. It calculates the precision at how often the top prediction matches the label of the image.<\/span><br \/>\n<i><\/i><\/p>\n<p><strong><i>python cifar10_eval.py<\/i><\/strong><\/p>\n<p><span style=\"font-weight: 400\">So, do not run the evaluation and training binary on the same GPU as you can run out of memory<\/span><span style=\"font-weight: 400\">. <\/span><\/p>\n<h2><span style=\"font-weight: 400\">Training a Model Using Multiple GPU Cards<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Generally, workstations may contain multiple<strong> GPUs<\/strong> for scientific computation. Training a model in parallel, a distributed fashion requires coordinating training processes.<\/span><\/p>\n<div id=\"attachment_14955\" style=\"width: 1090px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Parallelism.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-14955\" class=\"wp-image-14955 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Parallelism.png\" alt=\"CIFAR-10\" width=\"1080\" height=\"1080\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Parallelism.png 1080w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Parallelism-150x150.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Parallelism-300x300.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Parallelism-768x768.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Parallelism-1024x1024.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/Parallelism-100x100.png 100w\" sizes=\"auto, (max-width: 1080px) 100vw, 1080px\" \/><\/a><p id=\"caption-attachment-14955\" class=\"wp-caption-text\">Convolutional Neural Network- Training Model Using Multiple GPU Cards<\/p><\/div>\n<p><span style=\"font-weight: 400\">Now,\u00a0a model copy might be trained on a stale copy of the model parameters, so employing asynchronous updates of model parameters leads to not so good training performance. Also, employing fully synchronous updates will be as slow as the slowest model replica.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Launching and Training the Model on Multiple GPU Cards<\/span><\/h2>\n<p><span style=\"font-weight: 400\">You can use multiple GPU cards installed on your system to train the model faster with the <\/span><\/p>\n<p><strong><i>cifar10_multi_gpu_train.py<\/i> script. <\/strong><br \/>\n<strong>Code Example<\/strong><\/p>\n<p><span style=\"font-weight: 400\">Now, you can browse through the following <strong>code<\/strong> for a better understanding.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">classes = ['dogs', 'cats']\r\nnum_classes = len(classes)\r\ntrain_path='training_data'\r\n# validation split\r\nvalidation_size = 0.2\r\n# batch size\r\nbatch_size = 16\r\ndata = dataset.read_train_sets(train_path, img_size, classes, validation_size=validation_size)\r\ndef create_weights(shape):\r\n   return tf.Variable(tf.truncated_normal(shape, stddev=0.05))\r\ndef create_biases(size):\r\n   return tf.Variable(tf.constant(0.05, shape=[size]))\r\ntf.nn.max_pool(value=layer,\r\n                              ksize=[1, 2, 2, 1],\r\n                              strides=[1, 2, 2, 1],\r\n                              padding='SAME')\r\ndef create_convolutional_layer(input,\r\n              num_input_channels,\r\n              conv_filter_size,\r\n              num_filters):<\/pre>\n<p><span style=\"font-weight: 400\">## Here, we shall define the weights that will be trained using create_weights function.<\/span><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">weights = create_weights(shape=[conv_filter_size, conv_filter_size, num_input_channels, num_filters])<\/pre>\n<p><span style=\"font-weight: 400\">## Now, we create biases using the create_biases function. These are also trained.<\/span><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">biases = create_biases(num_filters)<\/pre>\n<p><span style=\"font-weight: 400\">\u00a0## Creating the convolutional layer<\/span><span style=\"font-weight: 400\">\u00a0 \u00a0<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">layer = tf.nn.conv2d(input=input,\r\n                    filter=weights,\r\n                    strides=[1, 1, 1, 1],\r\n                    padding='SAME')\r\n   layer += biases<\/pre>\n<p><span style=\"font-weight: 400\">## We shall be using max-pooling. \u00a0<\/span><span style=\"font-weight: 400\">\u00a0\u00a0<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">layer = tf.nn.max_pool(value=layer,\r\n                           ksize=[1, 2, 2, 1],\r\n                           strides=[1, 2, 2, 1],\r\n                           padding='SAME')<\/pre>\n<p><span style=\"font-weight: 400\">## Now, the output of pooling is fed to Relu which is the activation function for us.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">layer = tf.nn.relu(layer)\r\n   return layer\r\ndef create_flatten_layer(layer):\r\n   layer_shape = layer.get_shape()\r\n   num_features = layer_shape[1:4].num_elements()\r\n   layer = tf.reshape(layer, [-1, num_features])\r\n   return layer\r\ndef create_fc_layer(input,\r\n            num_inputs,\r\n            num_outputs,\r\n            use_relu=True):<\/pre>\n<p><span style=\"font-weight: 400\">#So, let&#8217;s define trainable weights and biases.<\/span><\/p>\n<pre class=\"EnlighterJSRAW\"> weights = create_weights(shape=[num_inputs, num_outputs])\r\n   biases = create_biases(num_outputs)\r\n   layer = tf.matmul(input, weights) + biase\r\n   if use_relu:\r\n       layer = tf.nn.relu(layer)\r\n   return layer\r\nx = tf.placeholder(tf.float32, shape=[None, img_size,img_size,num_channels], name='x')\r\ny_true = tf.placeholder(tf.float32, shape=[None, num_classes], name='y_true')\r\ny_true_cls = tf.argmax(y_true, dimension=1)<\/pre>\n<pre class=\"EnlighterJSRAW\">layer_conv1 = create_convolutional_layer(input=x,\r\n              num_input_channels=num_channels,\r\n              conv_filter_size=filter_size_conv1,\r\n              num_filters=num_filters_conv1)\r\nlayer_conv2 = create_convolutional_layer(input=layer_conv1,\r\n              num_input_channels=num_filters_conv1,\r\n              conv_filter_size=filter_size_conv2,\r\n              num_filters=num_filters_conv2)\r\nlayer_conv3= create_convolutional_layer(input=layer_conv2,\r\n              num_input_channels=num_filters_conv2,\r\n              conv_filter_size=filter_size_conv3,\r\n              num_filters=num_filters_conv3)\r\nlayer_flat = create_flatten_layer(layer_conv3)\r\nlayer_fc1 = create_fc_layer(input=layer_flat,\r\n                    num_inputs=layer_flat.get_shape()[1:4].num_elements(),\r\n                    num_outputs=fc_layer_size,\r\n                    use_relu=True)\r\nlayer_fc2 = create_fc_layer(input=layer_fc1,\r\n                    num_inputs=fc_layer_size,\r\n                    num_outputs=num_classes,\r\n                    use_relu=False)\r\ncross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=layer_fc2,\r\n                                                   labels=y_true)\r\ncost = tf.reduce_mean(cross_entropy)\r\nbatch_size = 16\r\nx_batch, y_true_batch, _, cls_batch = data.train.next_batch(batch_size)\r\nfeed_dict_train = {x: x_batch,\r\n                          y_true: y_true_batch}\r\nsession.run(optimizer, feed_dict=feed_dict_tr)\r\ndef train(num_iteration):\r\n   global total_iterations\r\n   for i in range(total_iterations,\r\n                  total_iterations + num_iteration):\r\n       x_batch, y_true_batch, _, cls_batch = data.train.next_batch(batch_size)\r\n       x_valid_batch, y_valid_batch, _, valid_cls_batch = data.valid.next_batch(batch_size)\r\n       feed_dict_tr = {x: x_batch\r\n                          y_true: y_true_batch}\r\n       feed_dict_val = {x: x_valid_batch,\r\n                             y_true: y_valid_batch}\r\n       session.run(optimizer, feed_dict=feed_dict_tr)\r\n       if i % int(data.train.num_examples\/batch_size) == 0:\r\n           val_loss = session.run(cost, feed_dict=feed_dict_val)\r\n           epoch = int(i \/ int(data.train.num_examples\/batch_size))\r\n           show_progress(epoch, feed_dict_tr, feed_dict_val, val_loss)\r\n           saver.save(session, 'dogs-cats-model')\r\n   total_iterations += num_iteration<\/pre>\n<p>So, this was all about\u00a0<span style=\"font-weight: 400\">Convolutional Neural Network in TensorFlow using CIFAR 10 database. Hope you like our explanation.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">Conclusion<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Hence, in this TensorFlow\u00a0<\/span><span style=\"font-weight: 400\">Convolutional Neural Network\u00a0<\/span><span style=\"font-weight: 400\">tutorial, we have seen TensorFlow Model Architecture, prediction of CIFAR 10 Model, and code with the example of CNN. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Moreover, the example code is a reference for those who find the implementation hard, so that you can directly run it through<strong> Linux<\/strong>. At last, we saw training and launching of the CNN model. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Finally, we discussed it with multiple GPU cards. Furthermore, if you have any query regarding Convolutional Neural Network, feel free to ask in the comment section.\u00a0<\/span><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1208,&quot;href&quot;:&quot;https:\\\/\\\/www.cs.toronto.edu\\\/~kriz\\\/cifar.html&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251004040843\\\/http:\\\/\\\/www.cs.toronto.edu\\\/~kriz\\\/cifar.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-09 03:52:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-12 04:02:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-15 04:22:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-18 04:29:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-21 07:09:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-24 07:15:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-27 07:38:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-30 07:45:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 08:10:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-05 09:05:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-08 09:13:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-11 10:14:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-14 10:51:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-17 11:19:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-20 11:24:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-23 11:28:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-26 12:57:59&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-29 13:18:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-01 15:18:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-04 15:36:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-07 15:43:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-10 15:48:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-13 16:28:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-16 16:33:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-19 18:22:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-22 19:01:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-25 19:06:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-28 19:37:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-03 23:48:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-07 01:41:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-10 02:06:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-13 04:23:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 04:28:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 04:29:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-22 05:07:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 05:48:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-28 06:05:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 07:02:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-03 08:51:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-06 08:56:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-09 09:20:01&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-12 09:27:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-15 10:03:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-18 15:29:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-21 15:54:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-24 15:55:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-27 16:15:42&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-30 16:42:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-03 17:01:22&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-05-06 17:35:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-09 17:57:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-12 18:35:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-15 19:38:11&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-19 02:24:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-22 05:27:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-25 06:15:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-28 06:35:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-31 06:38:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-03 07:20:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-06 07:52:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-09 08:15:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-12 08:32:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-15 09:23:11&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-06-18 09:23:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-21 11:42:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-24 12:18:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-27 13:20:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-30 13:27:55&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-03 15:05:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-06 15:05:13&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-07-09 15:26:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-12 15:27:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-15 15:45:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-18 16:05:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-21 16:08:01&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-24 16:28:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-07-27 17:01:43&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-07-30 17:15:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-02 18:22:49&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-08-05 18:40:09&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-08-05 18:40:09&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous Tensorflow tutorial, we discussed MNIST with TensorFlow. Today we\u2019ll be learning how to build a Convolutional Neural Network (CNN) using TensorFlow in CIFAR 10 Model. Moreover, in this Convolution Neural Network&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":14950,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[2513,2514,2515,2617,2618,2983,8115,8946,9908,14880],"class_list":["post-14947","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tensorflow","tag-cifar-10","tag-cifar-10-cnn-tensorflow","tag-cifar-10-model-architecture","tag-cnn-network","tag-cnn-network-tensorflow","tag-convolutional-neural-network","tag-launching-cifar-10-model","tag-multiple-gpu-cards","tag-prediction-of-cifar-10-model","tag-training-in-cnn-network"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Convolutional Neural Network (CNN)| CIFAR 10 TensorFlow - DataFlair<\/title>\n<meta name=\"description\" content=\"TensorFlow Convolutional Neural Network tutorial, CIFAR 10 CNN TensorFlow Model Architecture, Launching &amp; Training model by multiple GPU Cards\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Convolutional Neural Network (CNN)| CIFAR 10 TensorFlow - DataFlair\" \/>\n<meta property=\"og:description\" content=\"TensorFlow Convolutional Neural Network tutorial, CIFAR 10 CNN TensorFlow Model Architecture, Launching &amp; Training model by multiple GPU Cards\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-21T06:00:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-14T05:30:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/CNN-Tensorflow-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Convolutional Neural Network (CNN)| CIFAR 10 TensorFlow - DataFlair","description":"TensorFlow Convolutional Neural Network tutorial, CIFAR 10 CNN TensorFlow Model Architecture, Launching & Training model by multiple GPU Cards","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/","og_locale":"en_US","og_type":"article","og_title":"Convolutional Neural Network (CNN)| CIFAR 10 TensorFlow - DataFlair","og_description":"TensorFlow Convolutional Neural Network tutorial, CIFAR 10 CNN TensorFlow Model Architecture, Launching & Training model by multiple GPU Cards","og_url":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-05-21T06:00:16+00:00","article_modified_time":"2021-05-14T05:30:19+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/CNN-Tensorflow-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Convolutional Neural Network (CNN)| CIFAR 10 TensorFlow","datePublished":"2018-05-21T06:00:16+00:00","dateModified":"2021-05-14T05:30:19+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/"},"wordCount":1067,"commentCount":4,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/CNN-Tensorflow-01.jpg","keywords":["CIFAR-10","CIFAR-10 CNN tensorflow","CIFAR-10 Model architecture","CNN network","CNN network TensorFlow","Convolutional Neural Network","Launching CIFAR-10 Model","Multiple GPU Cards","Prediction of CIFAR-10 Model","Training in CNN network"],"articleSection":["Tensorflow Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/","url":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/","name":"Convolutional Neural Network (CNN)| CIFAR 10 TensorFlow - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/CNN-Tensorflow-01.jpg","datePublished":"2018-05-21T06:00:16+00:00","dateModified":"2021-05-14T05:30:19+00:00","description":"TensorFlow Convolutional Neural Network tutorial, CIFAR 10 CNN TensorFlow Model Architecture, Launching & Training model by multiple GPU Cards","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/CNN-Tensorflow-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/05\/CNN-Tensorflow-01.jpg","width":1200,"height":628,"caption":"Convolutional Neural Network ( CNN ) TensorFlow"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/cnn-tensorflow-cifar-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Tensorflow Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/tensorflow\/"},{"@type":"ListItem","position":3,"name":"Convolutional Neural Network (CNN)| CIFAR 10 TensorFlow"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/14947","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=14947"}],"version-history":[{"count":6,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/14947\/revisions"}],"predecessor-version":[{"id":94989,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/14947\/revisions\/94989"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/14950"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=14947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=14947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=14947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}