<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abhinav Menon on Medium]]></title>
        <description><![CDATA[Stories by Abhinav Menon on Medium]]></description>
        <link>https://medium.com/@abhinav-menon?source=rss-534dcaa32ca6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Y41YXmTIMLkG6kVUpVFsCA.jpeg</url>
            <title>Stories by Abhinav Menon on Medium</title>
            <link>https://medium.com/@abhinav-menon?source=rss-534dcaa32ca6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 22:41:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abhinav-menon/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI Upscaling: Can AI find what’s not there?]]></title>
            <link>https://abhinav-menon.medium.com/ai-upscaling-can-ai-find-whats-not-there-b3d89449fce3?source=rss-534dcaa32ca6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3d89449fce3</guid>
            <dc:creator><![CDATA[Abhinav Menon]]></dc:creator>
            <pubDate>Sat, 07 Jan 2023 01:27:45 GMT</pubDate>
            <atom:updated>2023-01-07T01:27:45.755Z</atom:updated>
            <content:encoded><![CDATA[<p>Can AI make things up? Well the simple answer is yes!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*8NddpegvxSL21mPH.jpg" /></figure><p>Artificial intelligence can be generative which means based on the information it is trained on and is presented at the moment, it is able to create something brand new!</p><p>One class of AI that is interesting here is AI that can take some content (such as a photo) and make it better. Think like Google’s Magic Eraser function on their phones.</p><p>Using artificial intelligence Google is able to erase unwanted things from your photos. When you think about it, this is an algorithm, actually generating pixles and predicating what is supposed to be there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TRCs3J_qMGeSTgx-.jpg" /></figure><p>Another type of image prediction is image upscaling. What do you do if you have a blurry or low-resolution image? If you want to make it bigger, you will need to predict what pixels would be in between the existing ones. This is a task perfect for AI, as it can find patterns between training sets and predict highly effectively and efficiently.</p><h3>Creating a Model</h3><p>Creating a generative simple generative model is a relatively achievable task. With a sufficient amount of data such as a dataset from kaggle and a simple generative network (such as a GAN or Variational Autoencoder) there are good grounds for success.</p><p>Here are the two methods I took to upscaling images.:</p><h4>GAN</h4><p>The first method was using a Generative Adversarial Network (or GAN), this model is based on Nassau. GANs work by splitting a generational task into a generator and discriminator. This is to say that the model learns by having two iterating but competing models which makes eachother better at their task.</p><p>In this case the discriminators job is to identify between pictures that are the original size and pictures that are upscaled. This means that the upscaling will be done by a generator.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5de2e2396f3d3d14743b1e9cbdbd3c98/href">https://medium.com/media/5de2e2396f3d3d14743b1e9cbdbd3c98/href</a></iframe><p>This code is able to create a discriminator based on a convolutional neural network that down samples its input and generator and can use random values and transpose / upscale into a new image. Putting this into a training algorithm means that over many iterations (epochs) the model is able to upscale images consistently.</p><p>To test this out I used a dataset with 64x64 pixel images of cats which provided a wide variety of circumstances for the model to learn from. These 64x64 images could then be turned into 256x256 images, which is very promising.</p><h4>VAE</h4><p>Variational autoencoders work in another way using an encoder and decoder, new outputs can be formed.</p><p>This is because VAE works by mapping data to latent space (a lower dimensional representation of input data) which a decoder tries to generate based on a point in latent space that the decoder picks.</p><p>In the context of upscaling this would look like an encoder which would be of lower resolution and a decoder which would generate a higher resolution version of the data provided.</p><p>However, with this task there were some challenges I needed to face, resulting in a VAE that wasn’t able to properly upscale images. Working on VAE upscaler is something I am working on as of the time of writing.</p><h3>What is the Impact</h3><p>While general upscaling tools exist to remove blurriness from pictures, upscaling becomes a tool with an impact when you consider an important data gap. If the data you have needs to be of greater resolution but it is difficult to reach that higher resolution through imaging alone, an upscaler might be the path to success.</p><p>This is the dilemma which makes AI upscaling relevant in medecine. Specifically in 3D-Bioprinting, where it is important that printed tissue look just like the original counterparts.</p><p>The only realistic way to find out what actual tissue looks like is through tissue-imaging. Technology like MRIs, Xrays and CT scan allow researchers a rare glimpse of tissue, but not at a scale that impact 3D-printers. Since the 3D-bioprinters require data that is at a scale more detailed than the imaging technology available, AI upscaling technology (such as a more advanced version of this proof-of-concept) can be used to accurately predict the data required for printers.</p><p>This becomes especially true when considering the personal tissue printing. In this case while it is unfeasible to get a personalized scan of patient tissue as data for a 3D-bioprint, using generalized information to train an upscaling model, can be a plausibble idea to overcoming a physical limitation of today’s technology.</p><h3>Where This is Going</h3><p>Image upscaling is just one of several examples of how artificial intelligence can be used to overcome roadblocks.</p><p>Although this project is an example of general upscaling technology, it is possible to use preexisting to make this more specialized. In the future I am planning on using imaging data available (such as xrays) to make a model that can upscale, imaging data.</p><p>Ultimately artificial intelligence especially generative AI is a clear path to a bright and healthier future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3d89449fce3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trial and Error No More: Building Organs with AI]]></title>
            <link>https://abhinav-menon.medium.com/trial-and-error-no-more-building-organs-with-ai-44ebccb34602?source=rss-534dcaa32ca6------2</link>
            <guid isPermaLink="false">https://medium.com/p/44ebccb34602</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[bioprinting]]></category>
            <dc:creator><![CDATA[Abhinav Menon]]></dc:creator>
            <pubDate>Wed, 30 Nov 2022 01:59:56 GMT</pubDate>
            <atom:updated>2023-07-23T02:12:22.094Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>One thing we need to face is at this point in time, there are far too many people facing a sad end to their lives because they cannot get the organs that they need.</blockquote><p>Because, <strong>right now</strong>, there is no supply chain, system, or approach that is able to feasibly scale up to the need for organs and various tissue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/0*6Jg-2N3xnIY_3KHy.jpg" /></figure><h3>Introduction</h3><p>Given that patients cannot get the right tissue at the right time, a well-established and promising solution is making more organs.</p><p>You can see a full article about this <a href="https://medium.com/@abhinav-menon/artificial-organs-arent-here-yet-but-there-s-promise-fe03ccb9a12">here</a>, but to summarize the most promising way to meet the demand is to <em>create</em> supply in the form of artificial tissue that can ideally, be indistinguishable from a natural counterpart.</p><p>Of course, this technology is still in its infancy, with various challenges that need to be addressed and worked on. Of those various challenges comes that of quality…</p><p>Pretend you make a brand-new leap in the 3D Bioprinting field and come up with a new tissue, or a new scaffold, or a new method to bioprint. When it comes to a field as broad as this one, we need a way to compare all these metrics and see what product gives us the most quality. Because comparing the “quality” of two different bioprinting solutions can help us find important attributes to consider for the next iteration.</p><p>However, at the end of the day, comparing things which are qualitative can be hard. You need to find the right patterns which are difficult and time consuming, especially when there isn’t an objective measure to go off.</p><h4>Our Good Friend AI</h4><p>What is something that&#39;s really good at understanding relationships we can’t see and can do a good job of classifying things?</p><p>Artificial Intelligence! AI once trained properly are some of the strongest ways to classify something in a consistent fashion. This means it is possible to create an AI that is able to take attributes of bioprinted tissue to assess its viability and quality.</p><h3>Building an AI Classification Model</h3><p>When looking at ways to approach this task, a team of researchers decided there were two main ways to train the model. Those being, using random forest regression or random forest classification.</p><p>The idea is that given a set of labeled data points (training data), the model after picking a random number of data points from this set can make a decision tree with an output. This process can be done many times resulting in many decision trees, whose outputs are averaged out to finalize the model. When a new data point is introduced the output of the model is the mean of outputs of each of decision trees.</p><p>Decision trees are highly accurate because we can think of them as many little models working in tandem.</p><h4>Dataset</h4><p>For this project the dataset used, from the scientific paper “<a href="https://sci-hub.se/10.1089/ten.tea.2020.0191">Machine Learning Guided 3D Printing of Tissue Engineering Scaffolds</a>.” The model in this article is drawn from the code and discoveries they made with their dataset.</p><p>The dataset had multiple permutations of different bioprinting standards which also had a label for success. Characteristics of material proportions, spacing of fibres, speed of the printing, printing pressure and layers per scaffold were all combined in different amounts and tested for success. This also means that at the end, the model given these various characteristics can do the inverse, and project the success of an unknown permutation.</p><h4>Training</h4><p>Now that there is a raw data set, the next step is to give these categories labels as to how effective they are as a bioprinting option. The researchers who compiled the data set also determined that a label for the machine’s precisioncould be determined by looking at the spacing of the fibres bieng printed and the accuracy could be determined with the width of the fibre.</p><p>The code above shows one approach to doing this: Specifically it is:</p><ul><li>Taking information from the dataset</li><li>Preprocessing it by removing the unnecessary or emptyparts and then opening it</li><li>Creating a new data frame and copying over the essential metrics</li><li>Determining the accuracy and precision</li><li>And returning two sets; “dataX” with the metrics and “dataY” with the corresponding labels</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51e6ba2925d13aa8c7794b52aed02fb5/href">https://medium.com/media/51e6ba2925d13aa8c7794b52aed02fb5/href</a></iframe><p>This second part of the code is processing the data furthermore. Specifically, we are training the model on data that is missing some parts to it. This is to ensure the model isn’t tested on data it has seen during training. The values that will be missing are that of the fiber’s spacing and that of the numbers of scaffold layers.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d618154f809a378609dd0c26f153522/href">https://medium.com/media/4d618154f809a378609dd0c26f153522/href</a></iframe><h4>Results</h4><p>With this information the model learns to classify how effective a permutation of printing methods is so that when, new information is given, which has not been tested the model can predict. In fact the model gets &gt;95% accuracy when tested with data that has not been used for training.</p><h3>Implications</h3><p>The fact is, 3D-Bioprinting faces a specific problem in the area of growth.</p><blockquote>There is just too much trial and error going on for effective and iterative improvements to be possible.</blockquote><p>The model replicated here showas just how much pssibility there is in using machine learning tools to validate what we see in the real world. This simple model takes just couple factors and provides a pass or fail. However, a far more sophisiticated model supercharged by much more data can likely do much more.</p><p>A model that has data points regarding the preprocessing, creation, post processing and deployment stages can be far more effective at testing the liklihood that a certain kind of 3D-Bioprininting approach can work.</p><p>This means that researchers can save huge amounts of time and money that they would otherwise need to dedicate to types of 3D printing that might not be as effective. Meanwhile models even at a lower depth unlock the ability to run through millions of combinations, streamlining the trial and error approach. Even disregarding all of this, sophisticated validators can show use patterns present between successful 3D-Bioprinting methods which then can be validated and applied.</p><h4>Conclusion</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/0*kn0qfKJ0yXis6aRN.jpg" /></figure><p>In this field, what AI does that humans cannot, is find patterns in mountains of data. Especially in bioprinting these patterns (if they exist) can be gems of knowledge that can change approaches and help the field grow out of its infancy. This can be one of the tools that changes the feild that can change medicine, and that gives me great optimism. What was done here, is a simply model, a proof concept to show what is possible given more resources, time and strategy.</p><p><em>Hey! I am Abhinav a high schooler who is passionate about the environment, people and technology. If you enjoyed this article, give it a clap! You can find me on </em><a href="http://linkedin.com/in/abhinav-menon"><em>LinkedIn</em></a><em>, I would love to connect! Stay creative!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44ebccb34602" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Artificial Organs Aren’t Here Yet… But There’s Promise]]></title>
            <link>https://abhinav-menon.medium.com/artificial-organs-arent-here-yet-but-there-s-promise-fe03ccb9a12?source=rss-534dcaa32ca6------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe03ccb9a12</guid>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[3d-bioprinting]]></category>
            <category><![CDATA[biotechnology]]></category>
            <dc:creator><![CDATA[Abhinav Menon]]></dc:creator>
            <pubDate>Tue, 11 Oct 2022 03:14:35 GMT</pubDate>
            <atom:updated>2022-10-11T03:15:00.486Z</atom:updated>
            <content:encoded><![CDATA[<p>No matter what era we are in, humanity’s collective imagination of what the future would look like, has one clear pattern.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*YCrjL_xDHegNSGsTPsnMbA.jpeg" /><figcaption><a href="https://wallpapersafari.com/w/4wKkY8">Credit</a></figcaption></figure><blockquote>“The future we all imagine, and our past counterparts too, is one with stunning medical advancements. Where people would succumb to horrible disease and where illness is nothing more than a nightmare.”</blockquote><p>And while we cannot discredit the billions of hours and dollars, we have spent to making this dream come true — and the breakthroughs we have had along the way, here in 2022 the fact is there is still another important stronghold of medicine that humanity has not been able to conquer.</p><p>When we say that imitation is the finest form of flattery, nowhere has that been as true as in the field of science. Some of our finest inventions have come from the observation and mimicry of the nature that surrounds us. And when it comes to medicine, mimicry of nature, at least to the fullest extent is very difficult achieve.</p><p>Making artificial tissue that acts and <em>is </em>nondistinctive from biologically produced tissue is the bastion many have been working to solve. And given that in the medical context, the imitation of a biological force means replicating the various relationships between different (and often unknown) factors, we set the stage for why it hasn’t been done yet.</p><h3>Artificial Tissue 101</h3><h4>Biological Tissue</h4><p>When we think of bones, skin or anything else in the body, we are actually referring to a bunch of cells that create these superstructures. When these cells come together and create functional structures that have a certain purpose, we call them tissue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/0*LEi2pdIbRULxUgCS.png" /><figcaption>Classification of structures in the body | <a href="https://www.easynotecards.com/notecard_set/91616">Source</a></figcaption></figure><p><strong>Right now, tissue can only be formed naturally</strong> within a body and even the repairs done to the tissue (e.g. shedding skin) is constrained to what the body can and is able to do.</p><p>All of that is a naturally a huge constraint in medicine as if something goes wrong with the tissue our only recourse to restoring the tissue to its functional state, is to move a viable counterpart from somewhere else (such as grafting or transplants) or try to promote the tissue to naturally repair (such as some drugs).</p><p>The crux of the problem lies in the inefficiencies present in running our healthcare in this way. People who need tissue can’t find right matches, supply sometimes cannot meet the demand and there are inconsistencies in replacements. By extension it is slow and with an unclear outcome by the end.</p><h4>Artificial Tissue</h4><p>The solution to this problem is artificial tissue because it is something that can get matching tissue to the right people, at the right time, consistently. All of this can be distilled to the fact that artificial tissue is only the means of achieving the same end result. It will still be a structure made of viable and functional cells and ideally is identical to tissue made naturally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6wMb7wqXzkqjc3Bn.jpg" /><figcaption>Artificial tissue of an ear | <a href="https://www.nytimes.com/2022/06/02/health/ear-transplant-3d-printer.html">Source</a></figcaption></figure><p>If we have theoretical goal of having to create artificial tissue that is identical to that of nature, the next logical question would be how to do this. Afterall, cells aren’t just Legos that you can stick together and call it a day.</p><p>In this case, because precision is key, one of the most unique but promising method to making artificial tissue, is 3D bioprinting. This comes from the same idea as normal additive 3D Printing where material is shot out of a mechanism to a set of predetermined instructions, to great some 3D and tangible product at the end.</p><p>3D Bioprinting is not dissimilar where the idea is to spray cells out of a nozzle and build up a 3D structure (presumably a tissue). However, cells are living things not just random liquid plastic, which means much more care is required to do this process correctly.</p><h4>The Cell: A Bioprinter&#39;s biggest challenge</h4><p>Tissue and certainly cells have been purpose built to be part of a larger system that actually allows it to thrive. <strong>This fundamentally clashes with what 3D Bioprinting is</strong>, which is isolating a group of cells to create a structure. Given that this is an unignorable component of cells, in order for bioprinting to be effective, we must also mimic an environment that meets the needs of the cell.</p><p>This is a key challenge where factors like energy resources, oxygen, fluids, electrical balance, thermal needs and ph all matter to a very tight degree.</p><p>The current precedent to facing this challenge is putting the cells in “bioink.” This is a medium that&#39;s designed to give all the nourishment that a cell requires to function correctly. However, when building more complex structures this bioink is not sufficient to keep the whole cell structure viable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*xHImfJvLg_P4NbGfEy_Hqg.png" /><figcaption>How bioink interacts with cells | <a href="https://thebiologynotes.com/3d-bioprinting/">Source</a></figcaption></figure><p>Additionally due to the nature of some of the cells and their structures, it is more effective (or only possible) to allow cells to grow on their own, instead of being mechanically placed. This means additional stipulations are required.</p><p>This is the current state of bioprinting, although theoretically possible and demonstrated in some places, structural and environmental limitations need more research for real tissue to be viable.</p><h3>A Silver Bullet for 3D Bioprinting?</h3><p>With a problem of such great impact to society it is a given that many solutions, ideas and possibilities are being revisited to solve the problem. However, amongst the various propositions, one solution that seems to have a lot of promise and growth, are<strong> bioprinting scaffolds</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/0*QHYDtwkjjAoCO0RJ.jpg" /><figcaption>An abstract representation of a scaffold, in the wider tissue making process | <a href="https://www.frontiersin.org/articles/10.3389/fmedt.2020.607648/full">Source</a></figcaption></figure><p>Scaffolds when something is 3D printed makes perfect sense. You need something for your materials to be placed on and rested. But at the same time, it cannot be permanent because that interferes with whatever its purpose may be. The additional benefit in this circumstance is that scaffolds can provide the additional stability that is desperately needed for cell viability.</p><h4>ECM: The Scaffold Promise</h4><p>Scaffolds are so influential because they are able to simulate the extracellular matrix (ECM) of cell. This is extremally ideal because as the complexity of the tissue increases, the less bioink on its own can help the cell. The ECM specifically helps in tissue regeneration by providing the correct environment, enzymes and interactions that are necessary to promote growth. Additionally, it has the capability to promote structural change and stability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DUF75K3wQKjKiXTi.jpg" /><figcaption>Example of an ECM in a natural situation | <a href="https://manchesterbiogel.com/blog-items/what-is-extracellular-matrix-and-why-important/">Source</a></figcaption></figure><p>This is a key finding because, as discussed earlier (and especially with more difficult-to-make tissue), it is simply not feasible to place every single cell. This means when it comes to tissue that require cell-based growth, an ECM increases its feasibility greatly.</p><p>Based on these factors, there is an area of research dedicated to finding materials that can act as a scaffold for printed tissue. These materials ideally need to also be biodegradable to be a suitable candidate. This is because given it is a proxy ECM, it cannot be removed until it is ready for use (likely in a natural ECM within a body).</p><h4>Additional Benefits</h4><p>While we only explored one challenge facing artificial tissue, in depth, there are other benefits to using a specially designed scaffold.</p><p>This is because the other major problem facing artificial tissue is standardization and consistency. The has to do with how the modelling of the tissue is done before production (similar to a CAD for 3D printers). Scaffolds can be extremally beneficial because it can provide more flexibility to designers and the cells themselves.</p><h3>A Promising Future</h3><p>Tissue printing is undeniably still in its infancy. Yet it has shown so much growth and prospects for a quality future to be ignored. Artificial tissue provides so much more flexibility to the medical community not only with treatment but also in areas like drug testing, biological interactions and disease research.</p><p>We are at the stage of artificial tissue where there are proofs of concepts which then require gradual changes and tweaks to become feasible. Part of that is the introduction and testing of scaffolds that have shown immense promise and growth as an option.</p><p><strong>Organovo</strong> is an example of one of these companies that have successfully engineered aspects of kidneys, livers and skin. These companies already utilize scaffolds, but only for the “simpler” tissue described above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CGke35cWuhFTl-y1" /><figcaption>Organovo works on creating cells for therapeutics | <a href="https://www.proactiveinvestors.co.uk/companies/news/214293/organovo-expects-fda-">Source</a></figcaption></figure><blockquote>Personally, I think that the future promising, not only because of the results we can see here, but because this is the result of an ages long dream of what medicine should look like.</blockquote><p>Now it&#39;s off to making stuff!</p><p>I’m Abhinav a high schooler interested in badminton, arts, materials sciences, programming! Check out other things I do <a href="http://myurls.bio/abhinavmenon">here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe03ccb9a12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why You Should Practice Anti-Complacency]]></title>
            <link>https://abhinav-menon.medium.com/why-you-should-practice-anti-complacency-abfa15a23502?source=rss-534dcaa32ca6------2</link>
            <guid isPermaLink="false">https://medium.com/p/abfa15a23502</guid>
            <dc:creator><![CDATA[Abhinav Menon]]></dc:creator>
            <pubDate>Sun, 13 Feb 2022 04:35:07 GMT</pubDate>
            <atom:updated>2022-02-13T04:35:07.729Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“Everything you do in life is a decision but an overarching principle is that it is a decision whether you are going to do something or not…”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JwVHRBbVwp3dQWU-" /><figcaption>Photo by <a href="https://unsplash.com/@aquaryus15?utm_source=medium&amp;utm_medium=referral">Aquaryus15</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>What is Complacency?</h4><p>To really understand anti-complacency lets first define complacency</p><p>Complacency is the general state of not trying to actively change the way your circumstances are for the better. It usually means that you are just satisfied with what you have or are willing to adjust what you do to meet the needs of the system.</p><p>This is where the real damage of complacency comes because it systematically training yourself to be okay with what you have got and not try to improve your circumstance. This stops your ability to grow and therefore, how much you can impact the world</p><h3>Anti-Complacency!</h3><p>Complacency is easy which is why it is the natural default that many of us go back on. As long as the situation isn’t horrible its usually easier, simpler or less thought-intensive to procrastinate (a form of complacency) or just simply do nothing and adjust.</p><p>Anti-complacency just like the name suggests is actively training yourself to not just accept the circumstances for what they are. It’s a good mindset to kickstart how you think. The importance of anti-complacency is that it also helps find flaws or inefficiencies in the status quo which can help you innovate.</p><h3>BlackBerry a Lesson in Complacency</h3><p>If any of you remember the good ‘ole days before the iPhone (I sure don’t), then you’d remember BlackBerry the market giant. It designed cutting edge phones for multiple years with that iconic keyboard. It was aimed at business professionals and the general consumer a like, but their complacency was their downfall.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*78TDGJgmtQXzfklK" /><figcaption>Photo by <a href="https://unsplash.com/@djyde?utm_source=medium&amp;utm_medium=referral">Randy Lu</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In this case, BlackBerry was complacent in the innovation space, resisting to change and undermining huge competitors like Apple. In the years following Apple’s first iPhone BlackBerry’s technology stayed constant, lacking innovation and cashing in on loyalty. Tl:dr they were complacent pushing the system, making poorly supported devices and underestimating the competition.</p><p>Some would call it arrogance while others would call it sheer stupidity but the fact is their willingness to stay stagnant and ignore change cause their ultimate demise.</p><p><strong><em>Oof that was a billion-dollar mistake…</em></strong></p><h3>Conclusion</h3><p>Ultimately complacency is a behaviour and more so, a group of behaviours coming together and creating a vicious cycle of inaction. It becomes most harmful when the effects on set slowly and the best solution is training yourself to actively avoid staying complacent. Obviously you should do this with balance (pick what’s actually meaningful) and carefully consider the impacts of your actions.</p><p>Here are three ways I stay anti-complacent</p><ul><li>Question the purpose of directions &gt; You get directions from people for a reason, but what is it</li><li>Keep checking arrogance &gt; constantly remind yourself not to be arrogant and if you are, know it and accept it</li><li>Think through easy stuff &gt; if its easy why is it easy, what does it mean when you’re doing something with ease?</li></ul><p>Ultimately, complacency is a decision, a decision not to change? Yes. But a decision nonetheless.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abfa15a23502" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Magic Triangle of Quality]]></title>
            <link>https://abhinav-menon.medium.com/the-magic-triangle-of-quality-45690517b7f3?source=rss-534dcaa32ca6------2</link>
            <guid isPermaLink="false">https://medium.com/p/45690517b7f3</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[mindset]]></category>
            <category><![CDATA[projects]]></category>
            <dc:creator><![CDATA[Abhinav Menon]]></dc:creator>
            <pubDate>Wed, 19 Jan 2022 00:49:13 GMT</pubDate>
            <atom:updated>2022-01-19T00:49:13.013Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>“Is it true? Can the magic triangle judge everything you do?”</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mOwAN5Al5Kc-Aub4" /><figcaption>From <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Okay, well this isn’t exactly true but the magic triangle can judge how well you’ve done a certain task. It is a simple concept to grasp the quality of any work that anybody does and it is pretty flexible, meaning its easy to apply and use.</p><h4>What is quality?</h4><p>Quality is rather abstract. It’s kind of like a line in the sand that can’t be exactly shown.</p><p>Obviously most of us have a sense of quality that lines up with one another, but usually this is a result of comparing our (or other people’s) work against a certain standard (eg a different work, a guideline etc.)</p><p>This can help get the gist of what you are supposed to do, but how are you going to balance <strong>what</strong> you do to achieve the standard of “quality?”</p><h3>Time, Scope and Cost — The Magic Triangle</h3><p>Most endeavours that you will probably pursue will have three constraints to consider. These being time, scope and cost. Visualizing these elements give you the magic triangle…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMOwogyBR9vALN2L6hxBEA.png" /></figure><p><strong>Time:</strong> In this triangle time is the amount of available days, months, years etc, till your deadline.</p><p><strong>Cost: </strong>In this triangle cost is the amount of money, manpower, resources etc. that you will need to feasibly complete your project. But it is also the time you will have to invest to make sure your project is feasible.</p><p><strong>Scope:</strong> Scope is what you mean to achieve with your project and usually is the end goal that you are working towards</p><p>And since its applicable to almost any project, this also means its a great benchmark for quality. We can visualize quality as the result of these three factors as seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RZp7P9lOD3KUWYOSJadX2A.png" /></figure><p>For a greater effect, imagine quality as a delicate and fragile balloon that can easily get damaged… this will be useful for what we’re talking about next.</p><h3>More, Fast or Cheap?</h3><p>In an ideal project the world would be amazing and all three of these factors will <em>magically </em>appear in the perfect equilibrium. But unfortunately the world is not perfect and these factors usually have restraints.</p><p>Here’s an example of an instance where the scope is staying the same but the cost and time is reduced:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QpnenhFXelCjb41vaTkPrg.png" /></figure><p>Here its pretty clear that quality is suffering. Our balloon is getting squeezed which is a major red flag and the only way to sustain good quality is to reduce scope or increase cost and time.</p><p>Furthermore, even keeping two factors constant and changing one of them damages the integrity of your project and by extension the quality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ehy5oRIOSpkSxYC_xKd88g.png" /></figure><h3>Road-mapping Quality in Projects</h3><p>If you’re main point is to deliver the most quality while staying within certain constraints the magic triangle is for you.</p><p>When you start a project you should map out your constraints. Chances are most of them will fall within these three criteria. By mapping them out, you can now see what exactly needs to be done to deliver maximum quality. You can see whether you will need to increase cost or time or whether your scope is unrealistic</p><p>Lets do an example:</p><p><strong>I want to create a 100 page book in the next month by hiring someone to work 1 hour a day. Although I have a daily budget of $50 USD.</strong></p><p>Okay so we can begin by breaking down our goal into the three categories.</p><ul><li><strong>Time:</strong> Next month (30 days)</li><li><strong>Cost:</strong> $50 budget for 1 hour per day,</li><li><strong>Scope:</strong> 100 pages</li></ul><p>Given some other factors like a) 100 page book would be ~250 words per page and b) For $50 the writer will write 500 words per hour gives us enough information to determine our quality.</p><p>Our scope is 100 pages meaning about ~25,000 words which is about 50 hours of writing. This however does not fit our 500 words x 30 days constraint which can only achieve 15,000 words. If we tell our writer to try to achieve 25K words while keeping all these stipulations, the quality will obviously suffer.</p><p>You can either increase the cost by increasing your budget and daily working time to achieve, change your deadline to later or reduce your scope to 60 pages to achieve the best quality.</p><p>Here is the concept of the magic triangle in action.</p><h3>What Does this Mean to Me?</h3><p>Our example was pretty one dimensional where the scenarios had obvious upsides and downsides.</p><p>Chances are your project is not going to be like that. And even more likely is that in our circumstances having the best quality might not be the goal. Although lowering cost and sacrificing quality is not inherantly negative, knowing that you are doing so is smart. This also helps line up different team member’s ideologies and goals to make sure your project meets whatever it aims to be whether that be quality, cost, time, scope are a combination of all these.</p><p><strong>Now the choice is yours, happy building!</strong></p><blockquote>Hey! I am Abhinav a 14-year-old who is passionate about the environment, people and technology. If you enjoyed this article, give it a clap! You can find me on <a href="http://linkedin.com/in/abhinav-menon">LinkedIn</a> or get more details through <a href="http://linktr.ee/AbhinavMenon">Link Tree</a>! Stay creative!<em>🦄</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45690517b7f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are You a Good Fit for The Knowledge Society?]]></title>
            <link>https://abhinav-menon.medium.com/are-you-a-good-fit-for-the-knowledge-society-e2a1ca9323da?source=rss-534dcaa32ca6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2a1ca9323da</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[youth-development]]></category>
            <category><![CDATA[youth]]></category>
            <category><![CDATA[growth]]></category>
            <category><![CDATA[high-school]]></category>
            <dc:creator><![CDATA[Abhinav Menon]]></dc:creator>
            <pubDate>Sat, 15 Jan 2022 02:39:12 GMT</pubDate>
            <atom:updated>2022-01-19T00:19:03.405Z</atom:updated>
            <content:encoded><![CDATA[<p>For many people, right after hearing about The Knowledge Society many questions pop into their head.</p><blockquote>The Knowledge Society… is it good? is it bad? is it a scam? is it legit?</blockquote><p>These are all valid questions people can have when they think of The Knowledge Society (TKS).</p><p>On their <a href="http://tks.world/">website</a>, TKS as a program describes itself as a human accelerator. You’ll hear a lot of success stories in how just 10 months, people are able to achieve amazing things like co-operate with top companies and pioneer solutions to major global problems.</p><p>And you gotta be thinking to yourself, this has to <em>be too good to be true. </em>Well lets break this down step-by-step and understand what TKS is all about.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*PSihoeMW2SidCzOXz_MnRA.png" /></figure><p>This is my personal opinion of what TKS is in a review. This is aimed at someone who is deciding between going or not going to the program. If you want to see more about what I am doing in TKS, check out my <a href="http://abhinavm.webnode.com/">website</a>.</p><h3>Introduction: You are Here</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3xkyDfJ0kLP0Opt4NKu7Hg.png" /><figcaption>Excerpt from <a href="http://tks.life/">TKS.life</a>, a self tracker you get in the program</figcaption></figure><p>I was in a similar position like you, I just heard about the program from my local science fair committee (who usually recommended me with reputable sources) and even in the midst of many many positive reviews, there was still a seed of doubt about how this was actually possible.</p><p>There were a couple of poor reviews that I found on sites like Reddit which brought up some strong points in a pretty passionate format. Ultimately, I took the leap of faith. That’s why I am making this review, because overall, it’s important to be well-informed before taking major decisions.</p><p>The reason why many of us (including me at one point) are skeptical of the program to begin with is because the big results that accompany TKS are unlike what we usually see in society. Thinking in the future: <em>I could be the person there doing X </em>because of the passion or potential you have is appealing but at the moment it may seem unachievable.</p><p>There is something innate within you that has found the value this program <em>might</em> have, but its your job to make sure you’re making the right decision. If you are to visualize it on a timeline, you are on one side and whatever your passion or interest may be is on the other. The program seems too good to be true because often we don’t think about the steps that go into making a big impact, however the more you understand about what the program does, the easier it will be to grasp.</p><h3>TKS: The Path to Make an Impact</h3><p>TKS is not magic, TKS participants are able to make headlines because they are given the resources to thrive and grow. TKS is not magic really means that it doesn’t give you a secret recipe to success.</p><p>Instead, it takes already bright and smart people (probably like yourself) and creates a tool kit where you can take what you do to the next level. By the same metric, just because you have a tool, like a hammer doesn’t automatically mean you get a house. It just <em>enables</em> you to do so.</p><h4>TKS Toolkit</h4><p>What do I mean when I say that TKS is a toolkit to make a huge impact?</p><p>Think of TKS as the hammer to build your house. TKS gives you lots resources, guidance and an environment but at the same time, you are expected to be self sufficient and extract the most potential without being spoon fed.</p><p>There aren’t deadlines, assessments or scores which is a big positive for building skills in the real world (the aren’t going to be 100s outside of school) but also means you have to have time management skills, focus and perseverance (or at least a solid effort to build and work on those skills). This is a prime example of how you will have to work to make your way to make an impact.</p><p>If we take a closer look at the resources, time and guidance in TKS, you will start to understand the actual value that TKS has.</p><p>First we have <strong>resources</strong>. We have programs like Emerging Technology Modules which give you a basic insight into a topic to see if it interests you. Similarly, TKS has lots exclusive opportunities that give you the chance to meet and be part of real world legitimate stuff. Furthermore TKS is built to give you mentors and create the “Focus process” where you go in depth into an area that interests you, like Artificial Intelligence.</p><p>The Focus process in specific, is a TKS pioneered system where you increase your knowledge into a specific topic not with theory but by doing. Your Focus can be action based (called a Technical Focus) where you learn, replicate and create or you can do a Scientific Focus where you learn, apply, review and ideate. At each of these steps you are recommended to make articles (like <a href="https://medium.com/visionary-hub/generating-images-an-introduction-to-gans-by-building-one-a0a273478248">this one</a> from my focus) and create videos to show the depth of your understanding.</p><p>Next we have <strong>guidance</strong>. This is really the people aspect, stuff like building a network, hustling out mentors and meaningful people, starting podcasts and more. You also get feedback from directors, braindates with other members and mindsets. In fact training your mental strength and behaviours with mindsets are so important that the co-founder of TKS, Navid Nathoo, said:</p><blockquote>“The Foundation of The Knowledge Society are the Mindsets that We Recommend”</blockquote><p>The final and highly important category is the <strong>environment</strong>. TKS is not a zero sum game. This means that just because one person succeeds, doesn&#39;t mean another person has to lose out. Yes there are competitions that encourage creativity and mindsets but ultimately the one part of TKS that is extremely unique is its environment.</p><p>Constantly, there is a motivating environment where directors are supportive, honest, and interested. There are TKS alumni and current participants who will become your close friends (many have even became startup co-founders) while keeping you accountable. There are outlets like the TKS Pride Initiative or places dedicated to Gaming that focus on the social values that TKS stands for.</p><h4>TKS: The Long Term</h4><p>Although TKS isn’t magic (as we talked about before), it has one huge benefit to consider when thinking about applying.</p><blockquote><strong><em>TKS is effective in the long run</em></strong></blockquote><p>We talked about the potential concerns people may have and we talked about the methods, but the reason why all of TKS’s theory is so effective, so life changing is because its targeted to youth like us.</p><p>The gradual changes that TKS is built upon is so effective because it changes the way you grow. Think of it like this:</p><p>Whenever a golf player misses their shot, when redoing it, they only make slight (even minuscule) changes to their position and angle. Yet their ball still travels in a completely different way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*BmmeduKC215DlHCIUBzWdg.jpeg" /><figcaption>Slight angle changes make huge differences</figcaption></figure><p>In the same way that millimetres in a change of swing can result in hundreds of feet in difference when playing golf, the concepts and ideas that you learn about in TKS and the change you make, creates huge results as the 10 month program comes and goes and you enter the real world.</p><p>The <strong>key of TKS</strong> is that what you learn here doesn’t stay static but <strong>exponentially</strong> increases your output and by extension, changes the <strong>trajectory </strong>of your life for the better.</p><h4><strong>TKS and Cost</strong></h4><p>Now let’s address the last elephant in the room. TKS is $5,500 USD, and that is by no means an insignificant amount money.</p><p>I know that for me (and many of the people I talked to), the cost was a big talking point. If cost of entry is a barrier for you, financial support is the way to go. Applying is very easy and minimally invasive and this is only done after the application for TKS is accepted. It is a blind needs application and your socioeconomic status will never be a deciding factor for acceptance.</p><p>Furthermore, you can get scholarships based off the past work you’ve done and how you perform through the application process (see below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qBbbZJ34CqtGL4GXHVnn-A.png" /></figure><p>For many people the fees are an investment towards their growth. I definitely have seen lots value with the money we invested.</p><h3>Review Wrap up</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*r_yQXAtsju0CEzze-DOfhg@2x.png" /></figure><p>The decision to apply is now one for you to make. But when considering what path you want to take, consider how much impact you can make and how to get there.</p><p>Like Neil Bohr said: “An expert is a person who has made all the mistakes that can be made in a very narrow field.” TKS is the narrow field because it focuses on the real world. But only the parts of the real world that matter, allow you to make mistakes and grow.</p><blockquote>Learning to make stuff happen in the real world can only be achieved by stepping out of theory and into practice.</blockquote><p>TKS is not school, it <em>is</em> the real world. Instead of thinking of TKS as a magic wand that makes you successful, think about what it really means to you. Are you somebody who wants to deliver high impact change, someone who is self-sufficient, independent, and curious? Then TKS is built for you.</p><p><strong>Now, are you up for the challenge?</strong></p><blockquote>Hey! I am Abhinav a 14-year-old who is passionate about the environment, people and technology. If you enjoyed this article, give it a clap! You can find me on <a href="http://linkedin.com/in/abhinav-menon">LinkedIn</a>, I would love to connect! Stay creative!<em>🦄</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2a1ca9323da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generating Images: An Introduction to GANs by Building One]]></title>
            <link>https://medium.com/visionary-hub/generating-images-an-introduction-to-gans-by-building-one-a0a273478248?source=rss-534dcaa32ca6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0a273478248</guid>
            <category><![CDATA[gans]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Abhinav Menon]]></dc:creator>
            <pubDate>Sun, 09 Jan 2022 17:15:43 GMT</pubDate>
            <atom:updated>2022-01-14T17:31:31.166Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f9xhelFS7j8szfCZuJX3Tg.jpeg" /><figcaption><a href="https://www.microsoft.com/en-us/ai/ai-school">Source</a></figcaption></figure><blockquote>They say that imitation is the finest form flattery…</blockquote><blockquote>… and the same applies for Computers</blockquote><h3>What we’ll cover today</h3><p><a href="#9ebb"><strong>Introduction to this Article</strong></a></p><ul><li>Rundown of AI</li><li>Rundown of GANs</li></ul><p><a href="#f28e"><strong>Overview of GANs</strong></a></p><ul><li>History</li><li>Practical metaphor</li></ul><p><a href="#3e5d"><strong>GAN Use Cases</strong></a></p><ul><li>Style GAN</li><li>Cycle GAN</li><li>Other GANs</li><li>Ethics of GANs</li></ul><p><a href="#91d9"><strong>Introduction to our GAN Model</strong></a></p><ul><li>Architecture</li><li>Datasets</li><li>Libraries</li></ul><p><a href="#e616"><strong>Building a GAN</strong></a></p><ul><li>Discriminator</li><li>Generator</li><li>Combining models</li><li>Getting Our CIFAR Dataset Ready</li><li>Getting fake samples</li><li>Training and summarization</li><li>Control panel</li><li>Once you’re done: Running your model</li></ul><p><a href="#63bb"><strong>Final Thoughts</strong></a></p><ul><li>10 best practices to consider</li><li>Issues in GANs</li><li>Takeaways</li><li>Conclusion</li><li>References</li></ul><h3>Introduction: Creation is Hard, so is Imitation</h3><p>It’s no secret that computers at its simplest are ignorant. They have no sense of context, no intent and no intelligence. But that doesn’t really matter because they are surprisingly smart. This meaning that their sheer resources gives them the ability to increase their skills at an aggressive rate given the proper parameters.</p><h4>A rundown of AI</h4><p>Its just that till now, the ability to quantify abstract data and explain the relationships between different factors is difficult. Since this is the crux, of many of the “intelligent” tasks we want computers want to do, this is an area that sees innovation at a rapid rate. But then using those factors to create something brand new is another challenge that must be faced. Because ultimately, imitation implies that you aren’t making a carbon copy but instead taking inspirations and key relationships (like ideas, colours or etc.) and then using those to create a like but distinctly unique piece of work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MB3u_o26JMGXmiHGoEx0wA.jpeg" /><figcaption>Pretty close, but not the same! | Image source</figcaption></figure><p>Outlining these relationships is where the power of AI comes in. Artificial intelligence is not an all encompassing, data-hungry, computer-brain mixture but a framework to quantify abstract concepts and guide decision making based off the information its given.</p><p>However that also brings up a question about what exactly intelligence is. Is a human smart because we are able to create brand new stuff or because we have the tools that allow us to create new things. Because ultimately some might say, most of the “novel” or “unique” things we create are based off our relationships with nature (like math or science) or based on other people works and personal experiences. This is specifically important because this is the same principle that AI operates under, meaning that there is a way to claim that artificial intelligence is a manifestation of what we do just using different standards.</p><h4>Rundown of GANs: A really ‘smart’ computer</h4><p>So we briefly touched on what artificial intelligence is and how computer models aggressively learn but what does that actually mean in terms of creating a brand new image (which is ultimately what this article is about)? Well to illustrate this we can compare our Model to a Kid and Teacher in school.</p><p>The way we are going to achieve image generation is through the power of feedback. The simplest rundown is that the Student will create something which will then be evaluated by the Teacher who gives feedback with Yes or No. This might sound like bad feedback but following this process many times yields really impressive results.</p><p>What I just outlined is the Basis of Generative Adversarial Network; a zero sum game that is a big win in the artificial intelligence field.</p><h3>GANs: Generative Adversarial Networks</h3><h4>History</h4><p>GANs are a pretty new concept. Originally proposed by <a href="https://en.wikipedia.org/wiki/Ian_Goodfellow">Ian Goodfellow</a> (in 2014 with the paper <a href="https://arxiv.org/abs/1406.2661">Generative Adversarial Networks</a>, this concept that had never even been considered in the past took off like a rocket.</p><p>Year by year the technology increased considerably to the point where technology became so sophisticated that the images no longer had any indication of being fabricated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*1AO12IDKi35v94WIaakqCw.png" /><figcaption>Evolution of GANs, both the clarity and sizes of images have changed significantly | <a href="https://twitter.com/charles2m/status/1418523736991485955">Image source</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s_Hc5pxd1rGYEPSmpR91nA.jpeg" /><figcaption>Which ones are fake? Answers below… | <a href="https://www.theverge.com/2021/4/12/22379880/artificial-intelligence-cat-photos-gan">Image source</a></figcaption></figure><h4>A practical metaphor</h4><p>If we go back to the example of a school child, at the beginning, the child will as expected have no context of what it is meant to do so the child will probably make up some random scribbles and submit this to the teacher. The teacher who would have previously reviewed real works can compare their knowledge to the student’s work to these real images and come to the likely conclusion that the student’s work is not the real thing. It’s important to note that the teacher and student learns at the same time, meaning that although the teacher benefits from seeing real images once every round, the tools required to distinguish between that and the students submission are pretty rudimentary to begin with. Also keep in mind that the real works and students’ works are labelled in such a way that the teacher doesn’t know if a submission is from the data set of real images or a submission from a student.</p><p><em>P.s: If you picked cats 1, 3, 7, 8 as fakes you’re right</em></p><p><em>P.s.s: If you picked 2, 4, 5, 6, and 9 you’re also right; they’re all fake 😉</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iaVVLOVylWMA_uJn1tu6cw.jpeg" /></figure><p>Overtime both the student and the teacher get better at their jobs. This happens through lots and lots of repetition. Repetition means that at some point during the process that we talked about above, something of much importance will occur. The teacher will validate one of the students submissions. Obviously to us whatever this will still look like mindless gibberish but the teacher validating the students submission (meaning that the teacher thinks its part of the data set of real items) indicates to the student that they have done something right that they should repeat in the next round. However, after evaluating all the submissions, when the teacher finds out that they incorrectly assessed the students work, the teacher will also understand that next time they should look out for that kind of thing.</p><p>Slowly overtime, this results in the student understanding the characteristics that please the teacher. Maybe if this whole process was about creating images of cats, the student would understand that the every submission must have two eyes, two ears and the distinct facial features that every cat possess.</p><p>What I described above is the process that training a GAN requires. The student is the generator while the teacher is the discriminator. When they work together they create the model that we consider to be a GAN. And this isn’t far off from what humans do too. When asked to draw a cat there are specific features that we consider, specific relationships between elements (like the size of a cat’s eye to its whole face) and there are specific colour we attribute. These don’t just come from our imagination but are instead a product of the many experiences where we have seen an image of a cat or interacted with it in real life. The only differentiating factor is that our ability to pick up on these relationships is significantly ahead, streamlined and sophisticated.</p><h3>The GAN Use Case</h3><p>GANs are now doubt difficult to compliment. But that also raises the question: what purpose do they serve, because companies can’t just be pouring huge quantities of resources for nothing…</p><p>To answer this question, we are going to look at two of the most sophisticated areas for implementation.</p><p><em>p.s. if you want to see GANs in action got to </em><a href="http://thispersondoesnotexist.com/"><em>thispersondoesnotexist.com</em></a></p><h4>Image generation with StyleGAN</h4><p>Lets startup with he most straightforward and probably most well known type of GAN use case: Image generation. Anyone going into GANs usually starts off with the image generation. The beuty of this area is how versatile this subset is. It can be anything from small image generation (something we’ll cover in quite a lot of depth in the following parts of this article) to ultra-high super realistic images. For this specific instance we will look at StyleGAN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*buGUYq3mf7Cuq6SP3hK3Rw.png" /><figcaption>StyleGAN | <a href="https://naoki.io/dlt/stylegan.html">Image source</a></figcaption></figure><p>StyleGAN which is highly sophisticated GAN from NVDIA designed for human face synthesis. The first iteration of the technology was so impressive that this technology was followed up with StyleGAN2 which is what the website is based on. The code is open to be run and became so successful that in 2021 there was even a StyleGAN3.</p><p>StyleGANs success can be summarized into five unconventional approaches and sophistication in the Generator’s architecture.</p><p><strong>5 steps for Style [GAN]</strong></p><ol><li>Progressive Image Synthesis: To get the quality of the image so high while also retaining a considerable size 1024 x 1024 pixels, the GAN was designed to slowly increase it load. StyleGAN started its journey by generating 4x4 images (really small) but by starting so simple, it was able to gain confidence and master this size very thoroughly. For every size once StyleGAN mastered it, it would double the length and width and restart the process. This meant it went from generating 4x4 images to generating 8x8 then 16x16 and so on until 1024x1024. More on that: <a href="https://arxiv.org/abs/1710.10196">https://arxiv.org/abs/1710.10196</a></li><li>Different Sampling Procedure: Instead of upsampling by transpose convolutional layers (something we’ll talk about later on) it relied on neighbouring layers. This is followed by the major difference that the layers used for upsampling are bilinear layers not just regular layers. See more: <a href="https://arxiv.org/abs/1812.04948">https://arxiv.org/abs/1812.04948</a></li><li>Generating a Style Vector: StyleGAN generates a style vector that uses samples from latent space to create an input that rsults in a 8 layer neural network. This is incorporated into the sampling procedure as a bias that affects the outputted image.</li><li>Avoids Random Inputs: Traditional GANs use samples in latent space (noise) to create the basis for the generated image. StyleGAN uses a standard 4x4x512 input that stays constant and is manipulated later on to compensate for randomness and provide image diversity</li><li>Extra Noise: Guassian Noise is an addition that comes to all parts of the image. The noise is random but results in an added level of fine detail by the end</li></ol><p><strong>Results</strong></p><p>This technology has resulted in ThisPersonDoesNotExist.com which is an example made by an Uber engineer Philip Wang in 2019 to illustrate its capabilities. This has also resulted in stuff like NVDIA’s text to image synthesis site. Although built on a different GAN type (GuaGAN), it is a combination of natural language processing and GANs where a user can input text and get an output of what the model thinks this looks like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ENF9SogiZXEWCiq_uuwVKA.gif" /><figcaption>NVDIA Text-To-Image | <a href="https://blogs.nvidia.com/blog/2021/11/22/gaugan2-ai-art-demo/">Image source</a></figcaption></figure><h4>Image substitution with GANs</h4><p>Image substitution (aka image translation) is a unique process where the GAN is required to not only generate an image but also determine what goes in a specific area based of the surrounding context. Basically, instead of creating a brand new piece of work, it creates a modified version of an already existing image that meet certain parameters. This has a lot of cool applications regarding the manipulation of images which we will talk about. One popularized example of an image translation GAN is CycleGAN</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hsTzShwfMBY3yF3kqvPv1w.png" /><figcaption>A couple examples of CycleGAN | <a href="https://junyanz.github.io/CycleGAN/">Image source</a></figcaption></figure><p>CycleGAN is an image translation model where the objective is to create a modified image. With this being said, one of the limitations that needed to be addressed at the time of CycleGAN was the requirement of a paired dataset. Like every model GANs in general require a large dataset for training that needs to be tens-of-thousands to millions of instances large. Now creating a paired dataset in this example would mean having a before and after image for each of these instances. Since in simplicity the goal is to start with something (before) and change it into something (after), traditionally speaking the GAN would need a huge dataset full of instances where this process has already occurred so it can learn from it.</p><p>CycleGAN’s unpaired image translation approach was the solution to this. Instead of trying to modify the architecture of a traditional GAN (one generator and one discriminator), the approach was to add a another generator and discriminator as an addition. Architecture would allow for the simultaneous training of two pairs of generators and discriminators.</p><p><strong>The architecture</strong></p><ol><li>In CycleGAN the first generator takes from a pool of images as its input and then outputs an image that goes into the second pool. The second generator takes images from the first generator as input and generates a new set of images which then go back into the first pool, repeating the cycle. In the midst of this the discriminators work to evaluate the plausibility of the generated images. All of this is a pretty creative work around but still doesn&#39;t suffice in terms of translating two different images.</li><li>To take this to the next level, the whole GAN is equipped with a concept of cycle consistency. Cycle consistency in this context suggests that if A → B then B → A. For CycleGAN that meant that if generator one sample from pool one and creates an image as an output, then generator two must be able to sample that output as its input and output what generator one sampled to begin with. If you want to think of it in another way, this is the same logic that translators aim to achieve where if you have a statement translated from English to Mandarin then if the Mandarin translation is then reverted back to English the result will stay the same.</li><li>This concept is achieved using the a special Cycle consistency loss function that take finds the difference between the inputted image of the first generator and the outputted image of the second generator often by using L1 Norm or pixel values and adjusts the two generators slightly to become more and more accurate</li></ol><p><strong>Results</strong></p><p>The results of this process is nothing short of amazing. Some results include style transfer: which lets you take an image and turn it into the art style of famous artistic styles, object transfer: that changes the object into another closely related object (apples to oranges, zebras to horses), colour transfer: turning black and white images into colour images, photo enhancements and much more</p><p>Another major breakthrough for CycleGAN-type architecture was with the implementation of the “magic eraser” (spoiler it wasn’t magic) feature on Google Pixel devices. This allowed Pixel 6 users to remove any object the wanted from a photo they captured which would then filled up with what a computer thought should be there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X4Mur93HPbwzWLrVrDu8Ew.gif" /><figcaption>Google’s Magic Eraser likely uses GANs | <a href="https://blog.google/products/photos/magic-eraser/">Image source</a></figcaption></figure><h4>Other GANs to look into</h4><ul><li>MuseGAN: Developing short music samples. <a href="https://salu133445.github.io/musegan/">Site</a></li><li>BigGAN: High-tech image generation GAN similar to StyleGAN but for other objects (like, flowers, burgers etc). <a href="https://github.com/ajbrock/BigGAN-PyTorch/blob/master/README.md">Site</a></li><li>Pix2Pix: Sketch to image GAN that turns your drawings into realistic images. <a href="https://mitmedialab.github.io/GAN-play/">Site</a></li><li>This ____ does not exist websites to go to: <a href="https://thisartworkdoesnotexist.com/">Art</a>, <a href="https://thiscatdoesnotexist.com/">Cat</a>, <a href="https://thishorsedoesnotexist.com/">Horse</a>, <a href="https://thischemicaldoesnotexist.com/">Chemical</a></li><li>Aforementioned NVDIA Text-to-Image GAN. <a href="http://gaugan.org/gaugan2/">Site</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FeLN7hKJ_D3dLXelZY7WIg.png" /><figcaption>BigGAN is super impressive! | <a href="https://medium.com/syncedreview/biggan-a-new-state-of-the-art-in-image-synthesis-cf2ec5694024">Image source</a></figcaption></figure><h4>Ethics of GANs</h4><p>Always when faced with technology of this nature, that can significantly change the way that us as humans interact with the real world, we must take great caution. Here are two dilemmas we do not have solutions for yet:</p><p>Misinformation and disinformation are already huge problems in current society and the easier and more indistinguishable doctored content is from real content, the bigger the problem. There are already phenomena like deepfakes that can use someone&#39;s faces and superimpose that onto another person, meaning that whatever this person does will be misattributed unjustly. Stuff like this is inevitable with the sophistication that we have reached even today (any photo from thispersondoesnotexist can be a fake profile picture for a malicious account, without any traceability to the internet since the generated images are promptly discarded ) and there are no clear cut solutions.</p><p>There’s also the bug dispute over how this will impact real people. For example a (plausible in the current situation) breakthrough in music innovation could be detrimental to instrumental artists and so on. Furthermore there is the question of who owns what the GAN creates. Is it the work of the programmer of the GAN or the work of the people who created the dataset that the GAN was trained on.</p><p>Without either of these parties the final product would not be possible so in turn is it ownership by both of them? But would that be as unreasonable as saying that paint manufacturers should have ownership over paintings using their paint? Or none of them maybe, because its a generation of a machine…</p><p>These questions don’t have answers but with changing technology will come changing standards. For now its onto the next part where you will get to apply what you know with a guided GAN creation.</p><h3>Introduction to Small Images with GANs</h3><p>Congratulations on getting here. Now that we have a brief introduction to GANs, who made them and who’s working on them, what they can do and why this is impactful on society, its time to look at the HOW of GANs by building one ourselves.</p><p>Like we discussed above, the most straightforward approach to learning about GANs comes with image generation. Every GAN (including this one) requires a GAN architecture, a data set and libraries to execute the code.</p><h4>GAN architecture</h4><p>A GAN architecture is the process our model must follow during training to reach an achieved goal. This is the approach for training that we often look at for reference in sophisticated GANs like StyleGAN and CycleGAN.</p><p>The architecture is also the point of reference we most often scrutinize and develop on to increase the performance and abilities of the GAN.</p><p>We will be creating a small image generator which will need a couple of different parts, mainly:</p><ul><li>CNN generator</li><li>CNN discriminator</li><li>A function that combines the generator and discriminator</li><li>A dataset that we can load and select images from</li><li>A function to sample points in latent space</li><li>A way to evaluate what our GAN is doing that is meaningful to us</li><li>And a set of instructions to successfully train our GAN</li></ul><h4>Dataset</h4><p>In this specific instance we are going to work with the <a href="https://www.cs.toronto.edu/~kriz/cifar.html">CIFAR10 Dataset</a> a collection of 60,000 32x32 colour images. It is based off the Tiny-Images database which got sorted and labelled by Alex Kirzhevsky. This is an extremely valuable type of data set because of its easy manipulability, simplicity and consistency which all help simple models. This helps us grasp the valuable parts of image classification and generation while not having to deal with preprocessing and data sorting / cleaning which is not really relevant for us.</p><p>The CIFAR-10 Dataset is specifically split into 10 classes of images those being: Airplane, Automobile, Bird, Cat, Deer, Dog, Frog, Horse, Ship, Truck</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*C0cxdyUVAYwTY0wFB3wxkA.png" /><figcaption>Examples from the CIFAR-10 Dataset | <a href="https://www.machinecurve.com/index.php/2019/12/16/what-is-dropout-reduce-overfitting-in-your-neural-networks/">Image source</a></figcaption></figure><p>The class that an instance of this dataset is from is not operative for the GAN to know but it will help us identify what our generated images are after completion.</p><p>An operative thought to consider is that this is a colour image meaning that there will be three channels to consider (Red, Grean and Blue) each with their own 32x32 array which when put together creates one colour image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*0Y1rmdy_PDZ7x67q_okkrA.png" /><figcaption>Really tiny, only 4 pixels in a 2x2 orientation</figcaption></figure><p>To illustrate this, imagine a really tiny Microsoft logo made of only four pixels. Quantifying this would look like the following.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ac4b913aaa1dc16705650718fb2226a/href">https://medium.com/media/5ac4b913aaa1dc16705650718fb2226a/href</a></iframe><p>We can see that the 2x2 image is represented by their RGB values by creating three separate arrays where pixel values (from 0 to 255) are stored in their respective places.</p><p>Now imagine this but for a a 32x32 image where 3 separate arrays of 1024 pixels has to be stored and you get one instance in the CIFAR-10 database.</p><h4>Libraries</h4><p>Since this is a simple GAN we will only be employing a few well known libraries for some operative tasks. In this project we will be using Keras (+Tensorflow), Numpy and MatPlotLib</p><p><strong>Keras: </strong>Keras is an API of Tensorflow that is specifcally focused towards Machine Learning (and Deep Learning) that really helps with productivity and simplicity. Their official resources state “<em>Being able to go from idea to result as fast as possible is key to doing good research.”</em></p><p><strong>TensorFlow: </strong>TensorFlow is an open-source machine learning library designed by Google which exceeds at building models and provides flexibility for machine learning applications</p><p><strong>NumPy: </strong>NumPy (Numerical Python) is an important library related to arrays (specifically multidimensional / <em>n</em>dimensional). This will be especially useful when manipulating images.</p><p><strong>Matplotlib: </strong>Matplotlib is a library dedicated to visualizations of items. They can make images [something very useful for image generation ;) ] and graphs. This will mostly be used at the last stage to turn our model’s efforts into a tangible product</p><h3>Building a CIFAR-10 GAN</h3><p>We will be building a GAN using Python, ideally you would do this in a Google Colaboratory (and in an .ipynb file) because the GPUs are much faster than doing it locally.</p><h4>Libraries</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0934c12542281b11684bb1b41ad1059c/href">https://medium.com/media/0934c12542281b11684bb1b41ad1059c/href</a></iframe><p>Here we are just importing all the necessary modules from the libraries we discussed earlier. Although we will go into more depth about the purpose of each function later.</p><h4>Discriminator</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/355bd4bfcc3091751412fee375ce340d/href">https://medium.com/media/355bd4bfcc3091751412fee375ce340d/href</a></iframe><p>If we print the process our CNN is following by executing the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3ea75d0ab97430a746801ced318878d5/href">https://medium.com/media/3ea75d0ab97430a746801ced318878d5/href</a></iframe><p>then we get the following output:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/29d0963f76a87636c4b0ab22900c9bf6/href">https://medium.com/media/29d0963f76a87636c4b0ab22900c9bf6/href</a></iframe><p><strong>Downsampling:</strong></p><p>In our discriminator, our goal is to turn a 32x32x3 input into a binary output (true or false). To do this we are going to downsample our image using the <em>keras.layers.Conv2D()</em> function and create a feature map as the output. This will be in the order they are written above due to the <em>Sequential()</em> function.</p><p>The four arguments that we use throughout all our <em>Conv2d()</em> function is: filter, kernel size, strides and padding</p><p>The purpose of the filter is to identify features within the image that’s coming in. In our function, the integer that is the first argument indicates the number of convolutional filters there are in our layer. So if the argument is an integer 128, we know there are 128 convolutional filters who’s goal is to identify features in an image. Each of these filters identify features in the image by starting of with random values (this can be changed by and additional kernel_initializer argument although not necessary here) which slowly get changed through the training process to minimize the loss the model faces. This is an automatic process that comes with time and is not something that we can specify or force onto the filters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*l976gi3Nt7OIwGvL15WJvg.png" /><figcaption>Here is an example of 49 convolutional filters that look for specific relationships | <a href="https://www.cs.toronto.edu/~kriz/">Image source</a></figcaption></figure><p>Next we have kernel size. Kernel size indicates the dimensions and in turn the area that should be covered and downsampled (this is known as the convolutional window). If the numbers in the brackets look like (3,3), then we know that an area of nine pixels in a 3x3 pixel dimension will get their values averaged into just one value that gets added as a pixel at a relative position to the input into the feature map.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*E6CJgd8k-729wRjq5FE-sA.png" /><figcaption>Two types of downsampling, the left takes the maximum value of the convolutional window while the right takes the average. We are doing the latter | <a href="https://www.quora.com/What-is-a-downsampling-layer-in-Convolutional-Neural-Network-CNN">Image source</a></figcaption></figure><p>The next argument strides, indicates how many pixels the filter should move before doing the downsampling again. In our case since the argument is an integer value of 2, the downsampling will occur after the filter moves two pixels over.</p><p>aThe final argument is padding. This relates to the shape of the whole downsampling process. Since in all the functions the type of padding we use is called ‘same’ we will look at this type. The purpose of ‘same’ padding is to keep the feature map the same shape as the input. In order to achieve this, downsampled feature maps have zeros surrounding them which is represented by the white space in the figure below. Although not used in this GAN, ‘same’ padding is similar to the ‘constant’ padding option although that allows specific values in the padding instead of just zeros.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*L5dCixSKTPOBJ5Qq20Bqsg.jpeg" /><figcaption>Visual representation of padding where the blank areas are filled with zeros | <a href="https://www.machinecurve.com/index.php/2020/02/07/what-is-padding-in-a-neural-network/">Image source</a></figcaption></figure><p><strong>LeakyReLU</strong></p><p>A LeakyReLU short for Leaky Rectified Linear Unit is a type of activation function that is important after every manipulation in the layers. Its purpose is to solve the vanishing gradient problem that causes challenges during training. Every part of our convolutional neural network requires its weights to get updated for it to continue training. It does this through stochastic gradient descent. However in some circumstances the gradient will become so insignificant that the value does not get changed and the model does not get trained. The solution to this problem was a Rectified Linear Unit (ReLU).</p><p>ReLU’s are a special kind of function that dictates that if <em>x </em>&lt; 0 then output = 0 but if <em>x &gt; </em>0 then output = <em>x. </em>The issue with this however is that the gradient decent that we use to update our model says that the gradient of 0 is 0 meaning that any input that has negative values (especially big negative values) cannot become better and train themselves causing the neuron to “die” and become useless and detrimental. Meaning using a ReLU only changes the type of problem causing an unstable model. The LeakyReLU solves the vanishing gradient problem and the ReLU’s limitation by dictating that if <em>x &gt; </em>0<em> </em>the output = x but if x &lt; 0 then output = <em>zx. </em>The float within the LeakyReLU function defines the coefficient <em>z</em>, which means in our case <em>x</em> &lt; 0 then output = 0.02<em>x</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*Abt5Hie9xb6FTKUnao1gRg.jpeg" /><figcaption>ReLU v LeakyReLU Comparison. Visually it’ll make sense where the “leak” occurs | <a href="https://towardsdatascience.com/activation-functions-neural-networks-1cbd9f8d91d6">Image source</a></figcaption></figure><p><strong>Flatten + Dropout</strong></p><p>After this process is repeated a couple of times we have the <em>Flatten()</em> function. Since our model is sequential, our 4x4x256 feature map will be the input into the Flatten. Flatten changes the shape of our array so that everything is in one dimension. This in turn means that our 4x4x256 <em>n</em>dimensional array turns into a 4096 on dimensional object. We can also validate this by referencing the above <em>model.summary().</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*Mq6Z9-njyiL0IOOrPAmAbw.png" /><figcaption>Visual Representation of keras.layers.Flatten() | <a href="https://stackoverflow.com/questions/43237124/what-is-the-role-of-flatten-in-keras">Image source</a></figcaption></figure><p>This object now goes into the <em>Dropout()</em> function. Dropout is a type of regularization that is aimed to tackle the problem of overfitting. Overfitting in a quick description is the model learning irrelevant relationships in the training data (i.e. noise etc.) in such great depth that new data that isn’t from the training set cannot be evaluated properly. Dropout’s technique is by training the model to recognize that neurons within the network are unreliable. It does this by briefly “turning off” neurons and its relevant connections and in most cases this helps combat overfitting.</p><p>The float within the function (in our case 0.4) indicates the probability of a neuron getting the Dropout function applied to it. This approach was originally suggested by a <a href="https://jmlr.org/papers/v15/srivastava14a.html">research paper</a> who also found that as a rule of thumb, 0.5 is good for hidden layers and 0.1 is good for input layers although this was based off results from the <a href="https://deepai.org/dataset/mnist">MNIST dataset</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*PANptOH_-XDjir-OPwdwYQ.png" /><figcaption>Brilliantly simple diagram to convey Dropout() | <a href="https://www.machinecurve.com/index.php/2019/12/16/what-is-dropout-reduce-overfitting-in-your-neural-networks/">Image source</a></figcaption></figure><p><strong>Dense + Compiling</strong></p><p>Okay so we now have a 4096, one dimensional array… How are we going to turn this into a binary value of true or false? This is where <em>Dense()</em> function comes in. Dense is most commonly used to change the dimensions and shape of an input object when it comes as an output. In our Dense function, the first argument is the integer 1 which specifies the size of our output. Since our output is simply a True/False, this fits the stipulations perfectly.</p><p>This is followed by a activation which in this case is ‘sigmoid.’ The ‘sigmoid’ function has a ability of changing the Dense’s output into something useful, specifically a number between 0 and 1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*LKMv7fAg8drFxr1A56q7ew.jpeg" /><figcaption>Sigmoid function visually | <a href="https://www.peculiar-coding-endeavours.com/2019/mlp_vs_cnn/">Image source</a></figcaption></figure><p>Finally we compile all of this in our model (ending the Sequential). We start off by evaluating our model with the loss function which maps decisions to its related costs. This will help our discriminator get much better over time. Our loss function is <em>‘binary_crossentropy’</em> (BCE)which means that the loss function is evaluating how good our model is at predicting the True-ness or False-ness of the image. This is achieved by using a sigmoid and a greater loss indicates a worse model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*en_o9da4K7nCK_VyRaz4dg.png" /><figcaption>Our model is trying to gauge the probability that an image is real/fake. Similarly, this BCE is trying to find the likelihood of a dot being green based off its location | <a href="https://towardsdatascience.com/understanding-binary-cross-entropy-log-loss-a-visual-explanation-a3ac6025181a">Source</a></figcaption></figure><p>This is followed with a Adam optimizer which helps update the weights as an extension to the stochastic gradient descent and a metrics value that will be useful for evaluating our discriminator’s predictions later on.</p><h3>Generator</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0dfecad4f9887415cdadde308b43ae7c/href">https://medium.com/media/0dfecad4f9887415cdadde308b43ae7c/href</a></iframe><p>The generator of this model has to take a random points from latent space (random Gaussian-distributed values), and turn it into a 32x32x3 image. In order to do this, we are going to start off with a smaller rudimentary image (in our case 4x4x3).</p><p><strong>Foundations</strong></p><p>A recommended practice when starting off with such a small set of dimensions is providing the model with multiple versions of the smaller image meaning there are simultaneous feature maps. This allows for more diversity and interpretations which helps our model and in this case since the dimensions of our target is 32x32 (4096 pixels) we can fit 256 4x4 feature maps in the same area.</p><p>This gives us our input for our Sequential model, which will go into our Dense function as the size of the output(which we already talked about earlier) along with our latent space (we will come back to this later) which will assign random values to each of the 4096 pixels.</p><p>This goes through a LeakyReLU (which we talked about earlier) and then gets reshaped into our targeted 4x4x256 image that we wanted.</p><p><strong>Upsampling</strong></p><p>Just like we outlined our next step will be to use our CNN to upsample the image to eventually reach the 32x32x3 target. To upsample we will be using the <em>Conv2DTranspose()</em> function. This is just like its downsampling counterpart except each convolution takes the 4x4 pixels as specified by the kernal_size and upsamples it. These are then stored in the feature map output as a relative position to the input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*zhwCfYvx2duGSt3jaeGbww.jpeg" /><figcaption>A transposed convolution where there is a 2x2 kernel and a stride of 1. When the values need to be detrmined that do not exist, multiplication is done between nearest existing neighbours or in the case of a corner, the nearest corner is squared | <a href="https://d2l.ai/chapter_computer-vision/transposed-conv.html">Image source</a></figcaption></figure><p>This is followed by LeakyReLU and then a final downsampling which turns our 32x32x128 feature map into a 32x32x3 RGB image which we can then return.</p><h3>Combining the Two Parts</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb29531359821c55a18f400013f4e567/href">https://medium.com/media/fb29531359821c55a18f400013f4e567/href</a></iframe><p>Here we are basically creating one model that has both the generator and discriminator and then compiling them. The reason we make the discriminator non-trainable is in this setup, the the trainability impacts our discriminator negatively. This however does not stop the layers within the discriminator from getting trained meaning we are going to utilize this feature when updating our discriminator.</p><h3>Getting Our CIFAR Dataset Ready</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c2ec36a694d48812fd7de2929c01e35/href">https://medium.com/media/9c2ec36a694d48812fd7de2929c01e35/href</a></iframe><p>Here we are loading real samples. When we call the CIFAR-10&#39;s <em>load_data() </em>function we are returned with a training set of (50,000 images) with their respective labels and a test set of (10,000 images) with their respective images. In this case we only need the images and not the labels and the test set is not relevant.</p><p>After this, since we need to turn the values from 0 to 255 (the value representing the intensity of the R, G, or B) to values between -1 to 1, we will first turn the integers into floats and then scale them down.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b04cf8e81c53d40a36e3d9e597c51620/href">https://medium.com/media/b04cf8e81c53d40a36e3d9e597c51620/href</a></iframe><p>We can follow this up by defining a function to generate the images. When given the dataset and the number of necessary samples, this has to provide the a number of (the integer determined by n_samples) random instances from the CIFAR-10 Dataset and give them back with the label 1 to indicate they are real and not generated by the generator. The <em>randint()</em> function gives us random integers from the range 0 to the dataset’s shape (in this case 50,000).</p><h3>Generating Fake Samples</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d55e2c62e8bac9bb276f42740eac0937/href">https://medium.com/media/d55e2c62e8bac9bb276f42740eac0937/href</a></iframe><p>To begin generation, our generator needs a foundation to build on. Since we want our generator to be making the image, a random set values (noise) from our latent space (latent_dim) will be needed. The number of random values generated by our <em>randn()</em> function will be determined by the number of samples we need (n_samples) which can then get reshaped for our neural network and returned.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c04661c0f37ee2e4ac5310970e09bfa/href">https://medium.com/media/6c04661c0f37ee2e4ac5310970e09bfa/href</a></iframe><p>Here we see the fake samples actually getting generated. First we call on the <em>generate_latent_points() </em>which we just covered and this goes into our generator who generates the images. This will get sent off with a label of zero meaning that they are fake and by extension not from the dataset.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f85e76dfcfee9d56bbe88e7b49bd4a9/href">https://medium.com/media/3f85e76dfcfee9d56bbe88e7b49bd4a9/href</a></iframe><p>This function will be used during training to plot generated training images into a visual format. Since all our values are between -1 and 1, we need to turn them into values between 0 and 1 for pyplot. After plotting all the images we will give it a file name with the appropriate epoch number (plus one because the epochs start at zero) and then this will be saved. The current configuration is for Google Colaboratory but if you are doing this locally or elsewhere change the directory accordingly.</p><h3>Training and Summarization</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a2eea69509b8b30b6d1e2e090c3fd198/href">https://medium.com/media/a2eea69509b8b30b6d1e2e090c3fd198/href</a></iframe><p>Okay so here is the training function. This may look overwhelming but it is the fundamental basis for allowing the GAN to perform. You will see that the function takes in a lot of arguments, this is by design so that this model can be adapted, changed and reused really easily.</p><p>To figure out how many instances will be in batches we will use the number of specified batches and them by the number of instances available. For the CIFAR-10 dataset, the answer is 390 (rounding down because we can’t make more the 50,000 images) when dictating 128 instances as our n_batch variable. This means each epoch 390 batches will be used.</p><p>We will be using a GAN best practice where we will separate the real and fake images. This also means the discriminator gets an update two times per batch. We start off by calling our <em>generate_dataset_instances()</em> function which brings back the instances from the dataset and a label that they are real. This goes into our discriminator with the <em>train_on_batch()</em> function. This means that the batch will only be used once (not multiple times like <em>fit()</em>) and the discriminator will get updated with the results. The loss of this is then stored to get printed.</p><p>This same process occurs with the generated predictions which are then taken through <em>trained_on_batch()</em> and used to update the discriminator. With this information, we can take the whole GAN model and do another <em>train_on_batch()</em> where the input data is samples from latent space and the target is 1 (the label for a real image). This will update the whole GAN model and the loss will be stored for printing</p><p>We will print the loss statements once every certain number of times which is determined by the batchloss variable. After a whole epoch is complete, we will save the epoch results by calling <em>save_plot()</em> as dictated by our choosing. Furthermore, once every certain epochs (determined by the int represented by summarization) the <em>summarize_performance()</em> will be called on the details of which we will talk about next.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2fd00e4f66ab9a9c87aa9f9f265dbb86/href">https://medium.com/media/2fd00e4f66ab9a9c87aa9f9f265dbb86/href</a></iframe><p>Here we follow similar steps to our train function except instead of <em>train_on_batch()</em> we are evaluating our model’s loss. This means that the models are not updated at this step and metrics (like the one present when we created the discriminator) will be used. These comes as decimals but we will just turn them into percents for ease.</p><p>After we have our performance summarized we will save the weights of our model. Make sure to specify your directory if you aren’t on Google Colaboratory. Saving weights is useful if your model stops training unexpectedly, the program crashes or the model fails. In all these cases the model can get reverted to an earlier instance and retrained from there. Finally we will save the generator itself which is the final product of the GAN. This will be what we use to generate more images after training is done</p><h3>Control Panel</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a98d6379641b24018481f5c2a08da72/href">https://medium.com/media/5a98d6379641b24018481f5c2a08da72/href</a></iframe><p>The control panel gives you some amount of flexibility with what you do without messing with all the previous code. We have the size of the latent space which is arbitrarily set to 100. This can be changed for different results although making it too small could result in mode collapse.</p><p>Summarization indicates how many once every how many times do you want to summarize your performance and save your model. In this case, since the int is 5 it will do so every 5 epochs</p><p>Batchloss dictates how many batches you want to go through before getting a printed batch loss. I set it to 10 and any number is acceptable although when you are diagnosing for problems you might want this to be lower. Set it to over 390 to never get a report and 0 to get one every batch.</p><p>N_epochs means how many epochs you want to run this for, in many cases more is better. N_batch dictates how many instances you want per batch. Changing this will also change the number of batches so be prepared. Save_freq refers to how often you want your images saved from training. In our case, since its 0 we will get one every epoch.</p><p>The load_weights variable is dependant on whether you want to resume training from a previous spot. When set to true this will also require the epochs variable to be consistent with the number on your “params” files. If you are starting from scratch just set load_weights to false and epochs to 0.</p><p>The final lines are just going through everything we already covered and bundling everything up into variables for the <em>train()</em> function.</p><h3>Once You’re Done</h3><p>Once you’re done training to generate new images start by patting yourself on the back! This isn’t easy even at such a small scale!</p><p>But if you want to see the fruits of your labour, follow the code below in a new cell (if you are in Google Colobaratory) or a different file.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7958f26fff1de72a4711dfea5177fc14/href">https://medium.com/media/7958f26fff1de72a4711dfea5177fc14/href</a></iframe><p>Everything here is stuff that we have covered. All we are doing here is using our generator to create images. The number variable decides how many images you want in your plot (remember that this number gets squared so 10 is really 100 images). The only other thing you should consider is the file name. Make sure that matches up with the epoch that you want and everything is splendid!</p><p><strong>See the full code in my </strong><a href="https://github.com/CodeWithAbhinavM/CIFAR10-GAN"><strong>GitHub</strong></a></p><h4><strong>Want to see my results?</strong></h4><p>I’ll be posting a video soon where I share some of my stories and some further steps that I took with this project! Stay tuned (and follow me for updates)!</p><h4>Huge thanks to the following articles for making this project possible!</h4><p>This project is largely based off of: <a href="https://machinelearningmastery.com/how-to-develop-a-generative-adversarial-network-for-a-cifar-10-small-object-photographs-from-scratch/">CIFAR-10 GAN</a> from Machine Learning Mastery</p><p>Additional support from the following: <a href="https://github.com/King-Of-Knights/Keras-ACGAN-CIFAR10/blob/master/cifar10.py">CIFAR-10 ACGAN</a> from King of Knights, <a href="https://machinelearningmastery.com/how-to-develop-an-auxiliary-classifier-gan-ac-gan-from-scratch-with-keras/">MNIST CGAN</a> from Machine Learning Mastery, <a href="https://machinelearningmastery.com/how-to-develop-a-conditional-generative-adversarial-network-from-scratch/">MNIST ACGAN</a> from Machine Learning Mastery</p><h3>Final Thoughts…</h3><p>This article can obviously not tell you about every single thing related to GANs. Its time to experiment and combine different tutorials and broaden your understanding. This is part of my learning journey and a way to account for my understanding. As you move forward in this field consider these best practices from this <a href="https://github.com/soumith/ganhacks">presentation</a> at a GAN conference and this <a href="https://arxiv.org/abs/1511.06434">paper</a>:</p><h4>Best practices with GANs</h4><ol><li>Upsample and downsample using strided convolutions. This is what we did in our models and helps the performance of the generator and discriminator.</li><li>Use LeakyReLU. We talked about the benefits of this above when we used it in our models. Highly recommend especially over just a regular ReLU.</li><li>Using the<em> BatchNormalization()</em> function helps our GAN by rescaling and reestablishing our neural network’s connection although it’s still not clear even between experts how it does this. We didn’t use this in our GAN but this is something to keep in mind.</li><li>Scale images. Scaling our input images to something like -1 to 1 helps our model by keeping consistency with the the labels its outputting, the generated images, and real / fakes inputs. This is something we did do in our GAN.</li><li>Train batches based off their labels. When training the discriminator one common practice was to input both the real and fake samples at the same time. Now it’s seen to perform better when the real and fake samples are trained separately in their own batches. We did this using our <em>train() </em>function.</li><li>Reduce discriminator label reliance. By arbitrarily switching real and fake instance’s class labels (i.e. making a generator’s output a real by labelling 1 even when its not) we can improve performance of the discriminator</li><li>Use Guassian distribution aided latent space. We did this with <em>generate_latent_points() </em>and it helps increase diversity in the images the generator is creating.</li><li>Use the Adam Optimizer. We discussed previously how the Adam optimizer benefits the continued updating of our model’s weights.</li></ol><h4>The two issues to look out for in GANs</h4><p>GANs are obviously not simple in anyway and that also means there are a whole host of problems to consider. Of which the two most important to keep a lookout for is mode collapse and non-convergance</p><p><strong>Mode collapse</strong></p><p>Mode collapse is a severe problem where you’re GAN stops playing by spirit of the GAN game and sets its objective to solely fooling the GAN. In this description we have personified our generator but what really is happening is the GAN is cycling between a select few “modes” to trick the discriminator into validating it. Usually this involves the generator outputting a certain image that the discriminator validates. After finding out it is validated incorrectly, the discriminator now knows that what the GAN sent is the wrong type of image and therefore the other modes are the correct version. This prompts the generator to choose one of the other modes as its next input and the discriminator restarts the cycle by now determining that mode as incorrect and the others ones as correct.</p><p>If we are to take the example of a a generator that is built to make cats and dogs. If our generator submits a cat, the discriminator will now dictate that all cats must be fake and therefore, all dogs must be real. Based off this logic, our generator will create an image of a dog which, reverses the fooled discriminators predictions which will now say all dogs are fake and all cats are real. In this case our two modes are the cat and dog and when printed out as an image we will see and oscillating pattern. The tell tale sign that your GAN has suffered mode collapse are poor diversity amongst images which will be very evident. This is very difficult to resolve and it’ll take a bit of searching to find an answer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*78m1Y18aB9Ap2yZ5d5ANJQ.jpeg" /><figcaption>Loss of a mode collapsed GAN and the discriminator&#39;s accuracy | <a href="https://machinelearningmastery.com/practical-guide-to-gan-failure-modes/">Image Source</a></figcaption></figure><p><strong>Non-Convergence</strong></p><p>Non-convergence is the situation where your GAN doesn&#39;t seem to “converge” from its basic noise stage. Often converging in the GAN is a difficult process that comes with the iterations but seeing noise after several epochs especially without proper colours or shapes is a big tell-tale sign. Make sure this is not the same as your images not looking like your dataset. This is just a matter of training and your GAN working through the situation. If your images don’t look quite right, that is not a sign of non-convergence. However if there is a lot of noise, distorted images and so on, that is non-convergence and reviewing your architecture is quintessential.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*MHxhpZd33CFL1gUhb2Y5yg.png" /><figcaption>This is a instance from my GAN experiments where after 180 epochs my model is suffering from both mode collapse (look for similar patterns) and non-convergence. This is supposed to be a CIFAR-10 ACGAN.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*tmeNUHivuDseSo_OIPwOHQ.png" /><figcaption>Here is an example of a healthy GAN while training based off the tutorial we did today at 180 epochs. This is the CIFAR-10 GAN we did today.</figcaption></figure><h3>10 Takeaways to Consider</h3><ol><li>GANs in a nutshell is a feedback loop where two components compete to outsmart the other one.</li><li>Repetition is key, with slow progress and random chance, great things can happen (I’ve found this true in the real world too)</li><li>GANs is a young area that is ripe for innovation, yet its pure science is slowly having more and more uses in the real world</li><li>GAN architecture is what’s really to consider, architecture = accomplishments</li><li>Be meaningful with what you do, just with any other technology GANs ethics have a huge impact on society</li><li>The discriminator must turn an image into a true and false output and it can do so by using CNNs</li><li>The generator must turn random noise and multiple smaller feature maps into one bigger output. This can be done by upsampling</li><li>Tweaking weights is key for training and using optimizers, and training procedures all aim to do this one thing</li><li>GANs are like building blocks. You can combine them and add new ones to make a completely new architecture. Some of those building blocks are best practices to keep in mind</li><li>Always be aware of GAN problems. The major ones are mode collapse and non-convergence and they don’t have checkbox answer to resolve the problem</li></ol><h3>Conclusion</h3><p>Overall it’s clear the depth and complexity GANs have. For a simple 32x32 GAN there are so many factors to compare. The breakthroughs done by StyleGAN and so on are beautiful and something to marvel. The basic concept is smart, taking right from our evolutionary and societal need to compete and play games. This was introduced not so long ago. In 2014 this concept was nonexistent and now, just 8 years later, we are standing on the shoulders of giants.</p><p>Every function, every optimizer, every method has been carefully reviewed by papers (much longer than this article) proposed, scrutinized. And yet we can argue we still don’t know why GANs work why they do. “GANs are a black box, full of mystery” such a simple quote to such a complex topic. And in a way, every GAN is a unique piece mimicking nature and its randomness. I’ve heard that GANs are kind of like an alien, getting relationships and ideas pretty accurate but just not quite there. Yet the pursuit to make GANs as a whole just a little but more better than yesterday is admirable and a journey that I hope, you will join me on.</p><p>-Abhinav Menon</p><blockquote>Hey! I am Abhinav a 14-year-old who is passionate about the environment, people and technology. If you enjoyed this article, give it a clap! You can find me on <a href="http://linkedin.com/in/abhinav-menon">LinkedIn</a>, I would love to connect! Stay creative!<em>🦄</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0a273478248" width="1" height="1" alt=""><hr><p><a href="https://medium.com/visionary-hub/generating-images-an-introduction-to-gans-by-building-one-a0a273478248">Generating Images: An Introduction to GANs by Building One</a> was originally published in <a href="https://medium.com/visionary-hub">Visionary Hub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Computers Learn — Explaining the Magic of AI]]></title>
            <link>https://medium.com/visionary-hub/how-computers-learn-explaining-the-magic-of-ai-b34ad60dbe5d?source=rss-534dcaa32ca6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b34ad60dbe5d</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machinelerning]]></category>
            <category><![CDATA[basics-machine-learning]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Abhinav Menon]]></dc:creator>
            <pubDate>Sat, 04 Dec 2021 22:05:55 GMT</pubDate>
            <atom:updated>2022-01-24T02:13:36.354Z</atom:updated>
            <content:encoded><![CDATA[<h3>How Computers Learn — Explaining the Magic of AI</h3><p>In every aspect of your life, you’ve probably heard the term artificial intelligence. You’ve probably also heard about Deep Learning, Neural Networks and Machine Learning. All these “buzzwords” claim to completely change the way that our current digital world will work. But they also pose themselves as a complex topic that’s hard to enter due to the high levels of technicality.</p><p>For many people, machine learning, Artificial Intelligence (AI), Deep Learning and Neural Networks are all the same. But the reality is that each of these are very different.</p><p>However… all three are interconnected. IBM has said:</p><blockquote>Perhaps the easiest way to think about Artificial Intelligence, Machine Learning, Neural Networks, and Deep Learning is to think of them like Russian nesting dolls. Each is essentially a component of the prior term:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*V3-heH4zclhOr8v0cSWavQ.png" /><figcaption><em>Image Credit: IBM</em></figcaption></figure><h3>Machine Learning— Expert Detective</h3><p>You can think of machine learning as an expert detective. It has the power to recognize patterns in complex data that has so many different attributes it would be unrealistic for a human to do it. The biggest challenge for machine learning is the training process. There are three common methods to do so these primarily being:<strong> Supervised, Unsupervised and Reinforcement Learning.</strong></p><h4>Supervised Learning</h4><p>Supervised learning is one of the most straightforward learning processes to grasp. The Machine Learning model receives training data that is labelled and then uses certain algorithms to determine similar factors between different data points with the same label. By repeating this process multiple times and having a penalty when wrong decisions are made, the model gets so confident at finding patterns that when an unlabelled set of data comes through and it recognizes a pattern it assigns the associated label.</p><p>We can think of this just like a person at school. If we give 10 pictures of an ice cream cone and 10 pictures of a chocolate bar and tell the child which ones are which, we can train the child by asking them what are some similarities within each category (i.e chocolate bars are brown and rectangular while ice cream cones are pointy a colourful). The only difference between the person and a computer is that a person has senses and tools that allow it to classify or discriminate very easily while computers need lots of repetitions to get a grasp of the pattern. But once the person or computer is trained, you can give them a picture of an ice cream cone or chocolate bar without telling them what it is and based of the criteria (i.e. Is it brown? Is it pointy? etc.) it can provide a label with some amount of confidence.</p><h4><strong>Unsupervised Learning</strong></h4><p>Unsupervised learning on the other hand looks for patterns that we as humans have not seen yet. Unlike supervised learning, unsupervised Machine Learning models use themselves to dictate the patterns that it finds. By looking through a high volume of unlabelled data, unsupervised learning has a better chance of finding relationships between different factors.</p><p>Lets look at it like this: Pretend you are an Machine Learning model who has to look through billions of different search queries and look for trends. In this case there is no way to train for every classification and relationship between all the factors. But by giving time and lots of data the model could start finding out that people who search up “chicken recipes” would like ads about McDonalds. With this being said, unsupervised learning is still not completely hands off. Usually humans will need to validate the end result or give small hints so that the model is more effective and does not go off path.</p><h4><strong>Reinforcement Learning</strong></h4><p>Reinforcement learning works on the basic principle of maximizing reward and minimizing the negative consequences. On this principle, reinforcement learning lets the ML model make decisions which are then judged positively or negatively which then changes how the model makes its next decision. This creates a feedback loop where positive changes are rewarded and then applied in a brand new situation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o-C1IcNyCmUzke-aOjdKAA.png" /><figcaption>Usual steps in a ML project</figcaption></figure><h3>Neural Networks and Deep Learning — Computers Are People Too!</h3><p>Honestly speaking, a considerable number of innovations that the human race has “created” has taken heavy inspiration from nature. It’s a similar story in the case of Neural Networks and Deep Learning Networks. Neural Networks try to replicate human neurons (which is what they’re named after) by either firing (Output = 1) or not firing (Output = 0) which then has a cascading impact on the next layer of connected neurons (similar to our brain). By considering inputs and assigning them a weight and then adding an extra bias, the summation (as seen below) will give a result. This can be run through an activation function to bring the result to something more useful for computers often to a 0 or a 1 like through a Binary Cross Entropy function or with a Leaky ReLU.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*LBqZRbZScMJJly3GcTvzwg.jpeg" /></figure><p>Deep Learning is a qualifier of Neural Networks that indicated that a model has more than three layers (including the input and output layers) making the complexity significantly greater and by extension “deeper.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bfGongma1OAdK28uAIdP6Q.png" /><figcaption>A DL with 4 layers instead of 3</figcaption></figure><h3>Applying AI with Generation— GANs</h3><p>As seen earlier, there are established ways of classifying and organizing large volumes of data. But the other part of that coin is the ability to create new data that is not just derivatives of training data. This is a particularly difficult problem to solve just due to the abstractness of the concept of “creating” something. Although there are many ways to enable AI to generate (create) items, one recent proposition and very flexible idea is that of a generative adversarial network (GANs).</p><h4><strong>GANs: the Inspector vs the Forger</strong></h4><p>The common example that is given to visualize how GANs evolve overtime is that of the Art Inspector against the Art Forger. At the beginning each are both equally as inexperienced. Both have access to a set of real (and valuable) artwork and the forger tries to generate a similar version of that (very poorly to begin with) while the inspector will get the fake plus multiple reals and will have to discriminate between them. At first since even the inspector is very inexperienced it will need lots of resources to distinguish, but the forged one will obviously be an outlier. This gives the inspector some clues on what to look for (increasing his ability to discriminate better next time) and gives the forger clues on what not to do (which results in better generations in the future). Repeating this process hundreds if not thousands of times where both parties slowly better their respective skills, will yield a much stronger inspector and forger to the point where the inspector’s ruling will be 50/50 meaning that the forger’s skills are almost perfect.</p><h4><strong>Applications of GANs</strong></h4><p><strong>Image Generation</strong></p><p>GANs until this point have been used disproportionally on images. However many of the results are astounding. Creating brand new images from merely random noise has become very sophisticated. Websites like <a href="http://thispersondoesnotexist.com/">thispersondoesnotexist.com</a> show how realistic faces have gotten.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*fePxuLRPdQRzibONgiCeMw.png" /><figcaption>This is a GAN in action</figcaption></figure><p>Another area of image generation is image substitution. For example, Google’s Pixel 6 device has the ability to crop out whole people and buildings with the power of GANs. Using the surrounding context, these Convolutional GANs generate what would likely be in that space. Similarly GANs can be used to change one element into another element for example, by changing a horse into a zebra.</p><p><strong>Future of GANs</strong></p><p>The future of GANs lie in the other realms of the digital world. For example the area of video generation by GANs is still in its early stages and that can lead to the video substitutions where the GAN guesses frames in a video clip based of previous and following frames. GAN research into audio is also an area that is not as advanced as imaging. Some examples like wavGAN and museGAN have made examples but progress can be made.</p><h3>More AI and Abstract Classification — NLP</h3><p>NLP otherwise known as Natural Language Processing is another area of Artificial Intelligence focusing on our ability to communicate with computers. Most humans speak in very abstract terms which makes sense to other people but is very difficult for computers to understand. By tokenizing a phrase and by assigning it parts of speech labels, computers can slowly understand what is happening around them.</p><p>We can basically classify natural language into the understanding of language and the generation of language. Right now a lot of focus is towards just the understanding aspect (i.e. sentiment analysis or context identification) which is the key to the generation aspect. This is not a simple task which is why many of the chatbots we use, still rely on yes or no phrases or act as a marginally better search engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*wn5nj7QEJd00E3BJjLH04A.png" /><figcaption>Realms of NLP</figcaption></figure><p><strong>The Current and Future Applications of NLP</strong></p><p>As mentioned earlier, one of the major areas for NLP is communication with a human whether that be through a chat bot, Siri or something else. However, NLP opens doors for a massive untapped pool of wealth by information. The era that abstract languages can be processed and their meaning can be derived at a mass scale like that of Twitter posts, means a huge incentive for tech giants to work in this area. Companies like Amazon already use sentiment analysis to categorize reviews and tailor recommendations. On the other hand language generation at its best form has the potential to create content like books, poetry or scripts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*r_yQXAtsju0CEzze-DOfhg@2x.png" /><figcaption>Our AI trajectory</figcaption></figure><h3>AI is the Future</h3><p>It’s not an unreasonable conclusion to say that AI is going to be an irreplaceable cornerstone of future civilizations just as it is now. Of this, one of the biggest high impact areas is that of Machine Learning and Neural Networks which completely reshapes our perspective for solutions to problems we thought were impossible to solve.</p><p>GANs and NLP are definitely not the only application of AI but they are the two areas that I am looking most into. They key dilemma is how this technology is going to be used in the future. Because, with great power comes great responsibility.</p><h4>Key Takeaways</h4><ul><li>Artificial Intelligence is different from Machine Learning which is different from Neural Networks and Deep Learning</li><li>Machine learning can be sub-classified into three areas: supervised, unsupervised and reinforcement learning</li><li>Neural networks are algorithms that take in inputs, biases and weights and slowly adjust them for the desired effect</li><li>Artificial intelligence have numerous applications; usually based in classification and creation</li><li>GANs are an example of both where two models compete to create the best brand new data from random noise</li><li>NLP is an example of both areas although it highlights the difficulties of classifying abstract concepts</li></ul><h4><strong>Last thought:</strong></h4><p>This is definitely the tip of the iceberg and topics only get more complex from here. However if you enjoyed reading this consider giving it a clap (👏🏽) and subscribe. All my links are below :)</p><p><strong>-Abhinav Menon</strong></p><p>🌐<a href="http://abhinavm.webnode.com/">Website</a>, 🟦 <a href="https://www.linkedin.com/in/abhinav-menon/">LinkedIn</a>, 📧 <a href="http://mail.abhinavmenon@gmail.com/">Email</a>, ☎<a href="https://calendly.com/book-w-abhinav/meet">Meetings</a>,</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b34ad60dbe5d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/visionary-hub/how-computers-learn-explaining-the-magic-of-ai-b34ad60dbe5d">How Computers Learn — Explaining the Magic of AI</a> was originally published in <a href="https://medium.com/visionary-hub">Visionary Hub</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Blooms Taxonomy (and Why its Great)]]></title>
            <link>https://abhinav-menon.medium.com/the-blooms-taxonomy-and-why-its-great-ab0b37bedd46?source=rss-534dcaa32ca6------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab0b37bedd46</guid>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Abhinav Menon]]></dc:creator>
            <pubDate>Sun, 03 Oct 2021 23:04:38 GMT</pubDate>
            <atom:updated>2022-01-02T19:33:42.608Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Learning new skills and abilities is of the utmost importance when progressing through life. It is within human nature to learn and by extension, innovate and progress.</em></p><blockquote><strong><em>What is Learning??</em></strong></blockquote><p>If you were to describe learning in &gt;10 words what would you say?</p><p><em>Is it understanding how to do stuff?</em></p><p><em>Standardized tests</em></p><p><em>Sitting and receiving a lecture?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fmWnh2Szxc5JLFF_" /></figure><blockquote><strong><em>What is it</em></strong></blockquote><p>The idea of blooms Taxonomy is basically to understand the depth and proficiency that any individual has learned and achieved. Its important to distinguish this as we don’t need to be experts on every subject and we don’t need the validation of some test to prove that you have learned something.</p><p><em>Take a moment to read the chart below and the criteria of each level.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*OEn0LlFTq-AoZ8Yopq7JHg.jpeg" /><figcaption>The Blooms Taxonomy</figcaption></figure><blockquote><strong><em>The hierarchy and how its used in life</em></strong></blockquote><p>Think of any subject that you believe you are proficient at, something that is your passion, something you have dedicated and invested your precious time and resources into. Now if you compare this to the image above and chances are you match some of the higher levels criteria such as the ones for “create” and “evaluate.” Meanwhile think of something that you are working towards and you will see that it falls into the lower sections of the pyramid.</p><p><em>Now for most things remembering and understanding is enough, because being an expert at everything is a difficult and in many cases not impactful enough. In many cases being at the lowest stages is arguably the right place to be. That’s why the base of the pyramid is biggest (most things you understand and remember) while the highest level is the smallest (people can only create in a some specific areas of proficiency). </em><strong><em>Consider the following</em></strong></p><p>If you are opening a can with this brand-new state of the art can-opener. After reading the instructions you get a pretty good idea of how to use it. Next time you don’t remember how it works and you find yourself reading the manual again!</p><p><em>The point being is that all parts of the Taxonomy are important for different circumstances and often judging people off their proficiency on an arbitrary subject is detrimental.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-YVfNcQwSLmQn3wh" /><figcaption>Photo by <a href="https://unsplash.com/@bamagal?utm_source=medium&amp;utm_medium=referral">&quot;My Life Through A Lens&quot;</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This means you are still at the “remembering” phase of the Taxonomy, but yet it would make no sense to invest all the time to create a new type of can opener just to prove you are an expert in the subject.</p><blockquote><strong><em>The implications in society</em></strong></blockquote><p><strong>School</strong></p><p>Now that it is clear how to quantify someone’s understanding, we must also look at the impacts it has on society</p><p>Most times someone says they hate school or they feel like what they are doing for eight hours a day is pointless it often a matter of the Bloom’s Taxonomy. In the status quo we see that school is doing in many cases the same thing Google does. It gives us a broad understanding of many topics usually at the “remember” or “understand” level. When people don’t like school its because its taking a round-about and engaging method to meet the simplest and lowest levels of the Taxonomy. This is also the level that quizzes and standardized tests examine and is also the reason why they are profoundly disliked by the majority of students.</p><p>Slowly there has been a reform in school looking at the “apply” and “analyze” stage with the use of collaboration, storytelling, presentations and more. Furthermore, a side affect of all of these are they bring a much more positive outlook on the schooling system and create more engagement and productivity.</p><p><strong>TKS + Extra Curriculars</strong></p><p>Programs like The Knowledge Society and other Extra Cur. like Science Fair and Debate have taken students desire to reach these higher levels of the hierarchy and then give them the medium, resources and support to achieve this. Most often the top of the Taxonomy is the place where the impact is made and the place where world leaders are made. Often you will see these programs have focuses to dive really deep into a certain topic and give the freedom and independence to fail and discover.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*PSihoeMW2SidCzOXz_MnRA.png" /><figcaption>TKS is a Human Accelerator Program</figcaption></figure><p><em>That</em> is the difference between School and programs like TKS.</p><blockquote><strong><em>Conclusion</em></strong></blockquote><p>At the end of the day, learning is the key to impacting millions. It is the only way to change the world we are living in for the better. But understanding when, where and why (using tools like the Blooms Taxonomy) to learn a topic in depth is important as directing your resources to whats most beneficial cannot be done otherwise.</p><p><em>Originally published at my old Medium </em><a href="https://abhinav-m.medium.com/the-blooms-taxonomy-and-why-its-great-77aebe96d5d3"><em>https://abhinav-m.medium.com</em></a><em> on October 3, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab0b37bedd46" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>