

{"id":79532,"date":"2020-07-21T18:53:58","date_gmt":"2020-07-21T13:23:58","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=79532"},"modified":"2021-08-25T13:49:16","modified_gmt":"2021-08-25T08:19:16","slug":"keras-loss-functions","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/","title":{"rendered":"Keras Loss Functions &#8211; Types and Examples"},"content":{"rendered":"<p>In Deep learning algorithms, we need some sort of mechanism to optimize and find the best parameters for our data. We implement this mechanism in the form of losses and loss functions. Neural networks are trained using an optimizer and we are required to choose a loss function while configuring our model. It&#8217;s very challenging to choose what loss function we require. Different loss functions play slightly different roles in training neural nets. This article will explain the role of Keras loss functions in training deep neural nets. We will also see the loss functions available in Keras deep learning library.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79546\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF.jpg\" alt=\"Keras Loss Functions\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\n<h2>Keras Loss and Keras Loss Functions<\/h2>\n<p>Generally, we train a deep neural network using a stochastic gradient descent algorithm. Here we update weights using backpropagation. The optimization algorithm tries to reduce errors in the next evaluation by changing weights.<\/p>\n<p>While optimization, we use a function to evaluate the weights and try to minimize the error. This objective function is our loss function and the evaluation score calculated by this loss function is called loss. In simple words, losses refer to the quality that is computed by the model and try to minimize during model training.<\/p>\n<p>This loss function has a very important role as the improvement in its evaluation score means a better network.<\/p>\n<h2>Available Loss Functions in Keras<\/h2>\n<h3>1. Hinge Losses in Keras<\/h3>\n<p>These are the losses in machine learning which are useful for training different classification algorithms. In support vector machine classifiers we mostly prefer to use hinge losses.<\/p>\n<p>Different types of hinge losses in Keras:<\/p>\n<ul>\n<li>Hinge<\/li>\n<li>Categorical Hinge<\/li>\n<li>Squared Hinge<\/li>\n<\/ul>\n<h3>2. Regression Loss functions in Keras<\/h3>\n<p>These are useful to model the linear relationship between several independent and a dependent variable.<\/p>\n<p>Different types of Regression Loss function in Keras:<\/p>\n<ul>\n<li>Mean Square Error<\/li>\n<li>Mean Absolute Error<\/li>\n<li>Cosine Similarity<\/li>\n<li>Huber Loss<\/li>\n<li>Mean Absolute Percentage Error<\/li>\n<li>Mean Squared Logarithmic Error<\/li>\n<li>Log Cosh<\/li>\n<\/ul>\n<h3>3. Binary and Multiclass Loss in Keras<\/h3>\n<p>These loss functions are useful in algorithms where we have to identify the input object into one of the two or multiple classes.<br \/>\nSpam classification is an example of such type of problem statements.<\/p>\n<ul>\n<li>Binary Cross Entropy.<\/li>\n<li>Categorical Cross Entropy.<\/li>\n<li>Poisson Loss.<\/li>\n<li>Sparse Categorical Cross Entropy.<\/li>\n<li>KLDivergence<\/li>\n<\/ul>\n<h2>Common Loss and Loss Functions in Keras<\/h2>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Common-Loss-Functions-df.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79547\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Common-Loss-Functions-df.jpg\" alt=\"Common Loss &amp; Functions\" width=\"820\" height=\"465\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Common-Loss-Functions-df.jpg 820w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Common-Loss-Functions-df-300x170.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Common-Loss-Functions-df-150x85.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Common-Loss-Functions-df-768x436.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Common-Loss-Functions-df-520x295.jpg 520w\" sizes=\"auto, (max-width: 820px) 100vw, 820px\" \/><\/a><\/p>\n<h3>1. Squared Error<\/h3>\n<p>In Squared Error Loss, we calculate the square of the difference between the original and predicted values. We calculate this for each input data in the training set. The mean of these squared errors is the corresponding loss function and it is called Mean Squared Error. This loss is also known as L2 Loss.<\/p>\n<p>Available in keras as:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">keras.losses.MeanSquaredError()\r\n<\/pre>\n<h3>2. Absolute Error in Keras<\/h3>\n<p>In Absolute error, we take the mode of the difference of original and predicted values. The mean of these absolute errors is the corresponding mean absolute error.<\/p>\n<p>Available as:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">keras.losses.MeanAbsoluteError()<\/pre>\n<h3>3. Binary Cross Entropy in Keras<\/h3>\n<p>It is used to calculate the loss of classification model where the target variable is binary like 0 and 1.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">keras.losses.BinaryCrossentropy(\r\n    from_logits, label_smoothing, reduction, name=\"binary_crossentropy\"\r\n)\r\n<\/pre>\n<h3>4. Categorical Cross Entropy in Keras<\/h3>\n<p>It is used for the classification models where the target classes are more than two. It is a generalization of binary cross-entropy.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">keras.losses.CategoricalCrossentropy(\r\n    from_logits,\r\n    label_smoothing,\r\n    reduction,\r\n    name=\"categorical_crossentropy\",\r\n)\r\n<\/pre>\n<h3>5. Hinge Loss in Keras<\/h3>\n<p>Here loss is defined as,<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">loss=max(1-actual*predicted,0)<\/pre>\n<p>The actual values are generally -1 or 1. And if it is not, then we convert it to -1 or 1.<\/p>\n<p>This loss is available as:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">keras.losses.Hinge(reduction,name)\r\n<\/pre>\n<h3>6. CosineSimilarity in Keras<\/h3>\n<p>Calculate the cosine similarity between the actual and predicted values.<br \/>\nThe loss equation is:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">loss=-sum(l2_norm(actual)*l2_norm(predicted))<\/pre>\n<p>Available in Keras as:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">keras.losses.CosineSimilarity(axis,reduction,name)\r\n<\/pre>\n<p>All of these losses are available in Keras.losses module. The below code shows an example of how to use these loss functions in neural network code.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">from keras import Sequential\r\nfrom keras.layers import Dense\r\n\r\nmodel=Sequential()\r\nmodel.add(Dense(64,kernel_initializer=\u2019uniform\u2019,input_shape=(20,)))\r\nmodel.compile(loss=\u2019categorical_crossentropy\u2019,optimizer=\u2019adam\u2019,activation=\u2019softmax\u2019)\r\n<\/pre>\n<h2>Custom Loss Function in Keras<\/h2>\n<p>Creating a custom loss function and adding these loss functions to the neural network is a very simple step. You just need to describe a function with loss computation and pass this function as a loss parameter in .compile method.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">def custom_loss_function(actual,prediction):\r\n  loss=(prediction-actual)*(prediction-actual)\r\n  return loss\r\n\r\nmodel.compile(loss=custom_loss_function,optimizer=\u2019adam\u2019)\r\n\r\n<\/pre>\n<h2>Losses with Compile and Fit methods<\/h2>\n<p>The .compile() method in Keras expects a loss function and an optimizer for model compilation. These two parameters are a must.<br \/>\nWe add the loss argument in the .compile() method with a loss function, like:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">from keras.losses import CategoricalCrossentropy\r\nfrom keras.layers import Dense\r\nfrom keras import Sequential\r\n\r\nmodel=Sequential()\r\nmodel.add(Dense(32,kernel_initializer=\u2019uniform\u2019,input_shape=(20,)))\r\nmodel.add(Activation(\u2018softmax\u2019))\r\nloss_function=CategoricalCrossentropy()\r\nmodel.compile(loss=loss_function,optimizer=\u2019adam\u2019)\r\n\r\n<\/pre>\n<h2>Using Inbuilt Loss Function in Keras<\/h2>\n<p>To use inbuilt loss functions we simply pass the string identifier of the loss function to the \u201closs\u201d parameter in the compile method.<\/p>\n<p>For example, to use binary_crossentropy:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">from keras.models import Sequential\r\nmodel=Sequential()\r\nmodel.add(Dense(64,input_shape=(1,),activation=\u2019relu\u2019))\r\nmodel.add(Dense(32,activation=\u2019relu\u2019))\r\n\r\nmodel.compile(loss=\u2019binary_crossentropy\u2019,optimizer=\u2019adam\u2019)\r\n<\/pre>\n<h2>add_loss() API in Keras<\/h2>\n<p>Using this API user can add regularization losses in the custom layers. We use this API in the call method of the custom class. This API keeps the track of loss terms.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">from keras.layers import Layer\r\nclass Custom_layer(Layer):\r\ndef __init__(self,rate=1e-2):\r\nsuper(Custom_layer,self).__init__()\r\nself.rate=rate\r\n\r\ndef call(self,inputs):\r\nself.add_loss(self.rate*tf.square(inputs))\r\nreturn inputs \r\n<\/pre>\n<h2>Summary<\/h2>\n<p>This article is a guide to keras.losses module of Keras. It explains what loss and loss functions are in Keras. It describes different types of loss functions in Keras and its availability in Keras. We discuss in detail about the four most common loss functions, mean square error, mean absolute error, binary cross-entropy, and categorical cross-entropy. At last, there is a sample to get a better understanding of how to use loss function.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Deep learning algorithms, we need some sort of mechanism to optimize and find the best parameters for our data. We implement this mechanism in the form of losses and loss functions. Neural networks&#46;&#46;&#46;<\/p>\n","protected":false},"author":10,"featured_media":79546,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22185],"tags":[22708,22709,22707,22706,22597],"class_list":["post-79532","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-keras","tag-custom-loss-functions-in-keras","tag-inbuilt-loss-functions-in-keras","tag-keras-loss","tag-keras-loss-functions","tag-keras-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Keras Loss Functions - Types and Examples - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about Keras Loss Functions &amp; their uses, four most common loss functions, mean square, mean absolute, binary cross-entropy, categorical cross-entropy\" \/>\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\/keras-loss-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Keras Loss Functions - Types and Examples - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about Keras Loss Functions &amp; their uses, four most common loss functions, mean square, mean absolute, binary cross-entropy, categorical cross-entropy\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/\" \/>\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=\"2020-07-21T13:23:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-25T08:19:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF.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=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Keras Loss Functions - Types and Examples - DataFlair","description":"Learn about Keras Loss Functions & their uses, four most common loss functions, mean square, mean absolute, binary cross-entropy, categorical cross-entropy","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\/keras-loss-functions\/","og_locale":"en_US","og_type":"article","og_title":"Keras Loss Functions - Types and Examples - DataFlair","og_description":"Learn about Keras Loss Functions & their uses, four most common loss functions, mean square, mean absolute, binary cross-entropy, categorical cross-entropy","og_url":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-07-21T13:23:58+00:00","article_modified_time":"2021-08-25T08:19:16+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33"},"headline":"Keras Loss Functions &#8211; Types and Examples","datePublished":"2020-07-21T13:23:58+00:00","dateModified":"2021-08-25T08:19:16+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/"},"wordCount":836,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF.jpg","keywords":["Custom Loss functions in keras","Inbuilt loss functions in keras","Keras loss","Keras loss functions","keras tutorial"],"articleSection":["Keras Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/keras-loss-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/","url":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/","name":"Keras Loss Functions - Types and Examples - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF.jpg","datePublished":"2020-07-21T13:23:58+00:00","dateModified":"2021-08-25T08:19:16+00:00","description":"Learn about Keras Loss Functions & their uses, four most common loss functions, mean square, mean absolute, binary cross-entropy, categorical cross-entropy","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/keras-loss-functions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/07\/Keras-Loss-Functions-DF.jpg","width":1200,"height":628,"caption":"Keras Loss Functions"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/keras-loss-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Keras Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/keras\/"},{"@type":"ListItem","position":3,"name":"Keras Loss Functions &#8211; Types and Examples"}]},{"@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\/a90b082e16aa38d207212d22b0581f33","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team is passionate about delivering top-notch tutorials and resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With expertise in the tech industry, we simplify complex topics to help learners excel. Stay updated with our latest insights.","url":"https:\/\/data-flair.training\/blogs\/author\/dfadteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/79532","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\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=79532"}],"version-history":[{"count":3,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/79532\/revisions"}],"predecessor-version":[{"id":79548,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/79532\/revisions\/79548"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/79546"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=79532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=79532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=79532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}