

{"id":111117,"date":"2023-01-12T09:00:58","date_gmt":"2023-01-12T03:30:58","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=111117"},"modified":"2023-01-12T10:04:09","modified_gmt":"2023-01-12T04:34:09","slug":"pytorch-autograd","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/","title":{"rendered":"PyTorch Autograd"},"content":{"rendered":"<p>Autograd is used to compute gradients involving complex functions in a neural network. In building a model, we need to compute the loss, which is the deviation of the predicted output from the given label and adjust the weights of all the neurons to bring the loss closer to zero. We can do this using the gradient descent algorithm. Then, we have to calculate the derivative of the loss for all the inputs and increase or decrease the weights accordingly.<\/p>\n<p>The neural networks have numerous layers and nodes, which makes tracking the path of the output for computing the gradient tedious and time-consuming. It is where autograd comes to the rescue. Autograd traces the path of the computation at runtime, making the process dynamic and easing the calculation of partial derivatives with respect to all the parameters.<\/p>\n<h3>What is Backpropagation?<\/h3>\n<p>Let&#8217;s consider a long chain of neurons with only one neuron in each layer for simplicity. Let x be the input and y be the output.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/what-is-backpropagation.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111430\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/what-is-backpropagation.webp\" alt=\"what is backpropagation\" width=\"972\" height=\"126\" \/><\/a><\/p>\n<p>This simple network works as follows. First, the input is multiplied by w1, which equals z1. Z1 is the input of the next neuron. The output of the second neuron is f_1(z). Here, f_1 is the activation function of the second neuron. All the layers go through this process. The last layer&#8217;s output is the network&#8217;s output. Now, this output is compared to the given label for the input. For argument&#8217;s sake, let us consider the squared loss.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Loss=(\u00bd)* (y-fl)2<\/pre>\n<p>Now we will adjust the weights to minimise this loss. We can accomplish this by taking the derivative of the loss for the weights we have to adjust.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\u10dbLoss\/\u10dbw1=\u10dbf1\/\u10dbw1 * \u10dbLoss\/\u10dbf1\r\n\r\nAlso;\r\n \r\n\u10dbLoss\/\u10dbf1=\u10dbf2\/\u10dbf1*\u10dbLoss\/\u10dbf2\r\n\r\nUsing the chain rule;\r\n\r\n\u10dbLoss\/\u10dbf1=\u10dbf2\/\u10dbf1 *\u10dbf3\/\u10dbf2*\u10dbf4\/\u10dbf3*...............\u10dbfL\/\u10dbfL-1\r\n<\/pre>\n<p>First, the penultimate layer adjusts its weight depending on the loss. Then the layer before that is adjusted, and the process goes on. This process of computing the output using the present weights and then propagating backwards to adjust these weights layer by layer is called backpropagation.<\/p>\n<p>The same process we described above can be used for layers with multiple neurons.<\/p>\n<h3>PyTorch \u201cbackward()\u201d function<\/h3>\n<p>We can calculate the gradient of a tensor with respect to some other tensor in a neural network only after the &#8220;backward()&#8221; function is called. It initiates the backpropagation process, and the pointer moves from the tensor in consideration of its gradient function, followed by the calculation of the gradient after reaching the reference tensor.<\/p>\n<h3>Jacobian<\/h3>\n<p>Jacobian is a matrix which contains all the possible derivatives of a function concerning one or more independent variables.<\/p>\n<p>Autograd, while computing the gradient using backpropagation, is actually calculating the Jacobian product of the loss vector. However, we need not pay much attention to it as it all happens in the background.<\/p>\n<h3>How does autograd work?<\/h3>\n<p>The autograd stores the gradients in a Directed Acyclic Graph (DAG). A tensor has parameters &#8211; data, grad, grad_fn, is_leaf and requires_grad.<\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">data<\/span><\/td>\n<td><span style=\"font-weight: 400\">Stores the data in the tensor, a number or a single or multidimensional array.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">grad<\/span><\/td>\n<td><span style=\"font-weight: 400\">Stores the gradient of the tensor.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">grad_fn<\/span><\/td>\n<td><span style=\"font-weight: 400\">A pointer that points to a node in the backward graph.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">is_leaf<\/span><\/td>\n<td><span style=\"font-weight: 400\">Either true or false. Indicates if the tensor is a leaf of the graph.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">requires_grad<\/span><\/td>\n<td><span style=\"font-weight: 400\">Indicates if it required to calculate the gradient or not.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400\">\u00a0<\/span>Any tensor that is created by some operation of tensors where at least one of the operand&#8217;s requires_grad parameter is True, then the resultant tensor&#8217;s requires_grad will also be true. It means the new tensor will also store the gradient values and a pointer to the backward graph when we call the .backward() method.<\/p>\n<h3>Computation Graph<\/h3>\n<p>As stated earlier, tensors are stored in a dynamic graph connecting nodes to a backward path required to calculate the gradients of nodes depending on the neighbouring nodes.<\/p>\n<p>This is what a node in a computation graph looks like. It contains the parameters data, grad, grad_fn, is_leaf and requires_grad.<\/p>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">data=tensor(2,0)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">grad=None<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">grad_fn=Addbackward<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">is_leaf=None<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">requires_grad=False<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Graphs hold no significance for standalone nodes. They come into play when some operations are performed between two or more nodes, and at least one of these nodes has its require_grad parameter set to &#8220;True&#8221; to produce a new node.<\/p>\n<p>Suppose we have two tensors(nodes), as shown below, and we perform the addition operation on them.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/computation-graph.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111431\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/computation-graph.webp\" alt=\"computation graph\" width=\"960\" height=\"754\" \/><\/a><\/p>\n<p>In the diagram above, there are two tensors, and we get a new tensor by adding them. Since the requires_grad in the first tensor is set to &#8216;True&#8217;, the resultant tensor&#8217;s requires_grad will also be true.<\/p>\n<p>Initially, the value of grad is &#8216;None&#8217;. When we call the backward() function, it extracts the location of the corresponding backward function (here ADDBACKWARD) from the &#8216;grad_fn&#8217; parameter of the tensor. It finds the gradient of the output for the inputs whose &#8216;requires_grad==True&#8217;.<\/p>\n<p>In the above example, the gradient of the resultant tensor will be calculated with respect to the first tensor (as requires_grad=True), and the value of the gradient will be stored in the tensor, as we can see in the diagram below.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/computation-graph-1.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111432\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/computation-graph-1.webp\" alt=\"computation graph\" width=\"960\" height=\"754\" \/><\/a><\/p>\n<h3>Example:<\/h3>\n<h4>a. Importing the torch library<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import torch\r\n<\/pre>\n<h4>b. Initialising tensors and checking the value of \u201crequires_grad\u201d parameter<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">a=torch.tensor([1,4])\r\nb=torch.tensor([5,2])\r\n\r\nprint(a.grad,a.requires_grad)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/agrad.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111436\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/agrad.webp\" alt=\"agrad\" width=\"1920\" height=\"106\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">print(b.grad,b.requires_grad)\r\n<\/pre>\n<p><strong>Output<\/strong>:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/bgrad.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111435\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/bgrad.webp\" alt=\"bgrad\" width=\"1920\" height=\"111\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">a=torch.tensor([1.,4.],requires_grad=True)\r\n\r\nb=torch.tensor([5.,2.],requires_grad=True)\r\n\r\nprint(a.grad,a.requires_grad)\r\n\r\nprint(b.grad,b.requires_grad)\r\n<\/pre>\n<p><strong>Output<\/strong>:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/agrad-bgrad.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111437\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/agrad-bgrad.webp\" alt=\"agrad bgrad\" width=\"1920\" height=\"132\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">c=2*a**6-b**9\r\n\r\nprint(a.grad)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/print_agrad.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111433\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/print_agrad.webp\" alt=\"print agrad\" width=\"1917\" height=\"87\" \/><\/a><\/p>\n<h4>c. Calculating gradient in PyTorch<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">c.backward(gradient=torch.tensor([1.,1.]))\r\n\r\nprint(a.grad)\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/gradient.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111434\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/gradient.webp\" alt=\"gradient\" width=\"1920\" height=\"83\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>Autograd proves to be very useful in all the deep learning models we build and is the biggest convenience provided by PyTorch. Finding the partial derivative is an integral step in training our models on the given dataset, and Autograd makes our lives easier by calculating and storing the gradients dynamically<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Autograd is used to compute gradients involving complex functions in a neural network. In building a model, we need to compute the loss, which is the deviation of the predicted output from the given&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":111429,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26498],"tags":[27187],"class_list":["post-111117","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pytorch-tutorials","tag-pytorch-autograd"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PyTorch Autograd - DataFlair<\/title>\n<meta name=\"description\" content=\"Autograd proves to be very useful in deep learning models we build and is the biggest convenience provided by PyTorch. Learn more about it.\" \/>\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\/pytorch-autograd\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PyTorch Autograd - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Autograd proves to be very useful in deep learning models we build and is the biggest convenience provided by PyTorch. Learn more about it.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/\" \/>\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=\"2023-01-12T03:30:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-12T04:34:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/pytorch-autograd.webp\" \/>\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\/webp\" \/>\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=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PyTorch Autograd - DataFlair","description":"Autograd proves to be very useful in deep learning models we build and is the biggest convenience provided by PyTorch. Learn more about it.","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\/pytorch-autograd\/","og_locale":"en_US","og_type":"article","og_title":"PyTorch Autograd - DataFlair","og_description":"Autograd proves to be very useful in deep learning models we build and is the biggest convenience provided by PyTorch. Learn more about it.","og_url":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2023-01-12T03:30:58+00:00","article_modified_time":"2023-01-12T04:34:09+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/pytorch-autograd.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"PyTorch Autograd","datePublished":"2023-01-12T03:30:58+00:00","dateModified":"2023-01-12T04:34:09+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/"},"wordCount":933,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/pytorch-autograd.webp","keywords":["PyTorch Autograd"],"articleSection":["PyTorch Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/pytorch-autograd\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/","url":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/","name":"PyTorch Autograd - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/pytorch-autograd.webp","datePublished":"2023-01-12T03:30:58+00:00","dateModified":"2023-01-12T04:34:09+00:00","description":"Autograd proves to be very useful in deep learning models we build and is the biggest convenience provided by PyTorch. Learn more about it.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/pytorch-autograd\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/pytorch-autograd.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/pytorch-autograd.webp","width":1200,"height":628,"caption":"pytorch autograd"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/pytorch-autograd\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"PyTorch Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/pytorch-tutorials\/"},{"@type":"ListItem","position":3,"name":"PyTorch Autograd"}]},{"@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\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/111117","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=111117"}],"version-history":[{"count":3,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/111117\/revisions"}],"predecessor-version":[{"id":111438,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/111117\/revisions\/111438"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/111429"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=111117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=111117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=111117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}