<?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 Remko Weingarten on Medium]]></title>
        <description><![CDATA[Stories by Remko Weingarten on Medium]]></description>
        <link>https://medium.com/@remko66?source=rss-5669a0f5b374------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MYit6zfzt0T3JpVbX_rUow.png</url>
            <title>Stories by Remko Weingarten on Medium</title>
            <link>https://medium.com/@remko66?source=rss-5669a0f5b374------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 08:06:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@remko66/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[The Missing Link to General Artificial Intelligence]]></title>
            <link>https://medium.com/@remko66/the-missing-link-to-general-artificial-intelligence-8d989222106a?source=rss-5669a0f5b374------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d989222106a</guid>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[whatsapp]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agi]]></category>
            <dc:creator><![CDATA[Remko Weingarten]]></dc:creator>
            <pubDate>Tue, 12 Mar 2024 05:58:47 GMT</pubDate>
            <atom:updated>2024-03-12T05:58:47.595Z</atom:updated>
            <content:encoded><![CDATA[<p>The Missing Link to General Artificial Intelligence</p><p>We are now used to chatbots that we can ask something. And instead of a list of links giving us a nice answer to the question about how to make spaghetti. So now people try to make agents who do everything. It’s nice, and some results are great… But is it really helpful yet? I don’t think so.</p><p>These agents, as a first step, make a plan. Then execute it. I think a vital step is missing here as the agents don’t seem to be smart yet in making it. And they should not have to make the same plan every time we ask them.</p><p>What if we try to model humans? Like Richard Bandler tried to do in the 1980s but now not to teach other humans but bots? If I ask you how do you research a product, let’s say you want to buy an over-ear headset.</p><ul><li>you look at what is available in your price range;</li><li>you look at what are the pros and cons of each;</li><li>you look at the price and what is in stock.</li></ul><p>Or is that just me? So what if we build a ‘semi AGI’. An AGI we feed a plan to and have it execute the plan with the help of both a GPT and normal code. Maybe in the end, we can find a way to rate these plans/strategies so we all can use the best.</p><p>I implemented this plan in my whatsapp bot and results are better then expeced</p><p>Just go to <a href="https://remko.online/remkoforwa">https://remko.online/remkoforwa</a> then to the bot and type</p><h3>shop over ear anc headset under 200 usd</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xNB1Vf4kZx32T69Q6jrP8w.png" /></figure><p>Or</p><p>stock microsoft</p><p>(or any other stock name)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d989222106a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Borderless Whatsapp (auto translate)]]></title>
            <link>https://medium.com/@remko66/borderless-whatsapp-auto-translate-aa9729a43ed0?source=rss-5669a0f5b374------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa9729a43ed0</guid>
            <category><![CDATA[whatsapp]]></category>
            <category><![CDATA[whatsapp-tips-and-tricks]]></category>
            <category><![CDATA[love]]></category>
            <category><![CDATA[translation]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Remko Weingarten]]></dc:creator>
            <pubDate>Tue, 15 Aug 2023 04:08:12 GMT</pubDate>
            <atom:updated>2023-08-15T04:08:12.900Z</atom:updated>
            <content:encoded><![CDATA[<p>We all know that when chatting with someone with whom we don’t share a common language, we can use Google Translate. However, if it’s more than one or two messages, that’s not convenient.</p><p>So, I’ve created a solution for people in long-distance relationships, which might also be useful for others.</p><p>Want to try? It’s really simple:</p><p>Add +6281517084333 to your WhatsApp (it’s a bot named remko.online).</p><p>Say ‘borderless’. (you can also say anything else, will be answered by a gpt in that case)</p><p>Follow the settings link and set your language. It will also assign you a name (for example, if your name is John, you might be assigned john32). Make a note of that.</p><p>That’s it. Other people who are set up can now send you messages like:<br>john32: message in their language<br>(in the same chat/remko.online) <br>and you will receive it in your language. The name will be before the message so you can reply.</p><p>Now, I want to propose an experiment (if you want to help me test):<br>Do as above.<br>Send a message to Eli: she helps me test and is okay with it. She only speaks Bahasa Indonesia.<br>Try to find out where she lives and what she does for work, and post it in the comments.</p><p>Want to talk to me?<br>My handle is Remko.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa9729a43ed0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Translate within whatsapp (remko.online)]]></title>
            <link>https://medium.com/@remko66/translate-within-whatsapp-remko-online-71ebd6cb5fb?source=rss-5669a0f5b374------2</link>
            <guid isPermaLink="false">https://medium.com/p/71ebd6cb5fb</guid>
            <category><![CDATA[whatsapp]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[translation]]></category>
            <category><![CDATA[international-relations]]></category>
            <dc:creator><![CDATA[Remko Weingarten]]></dc:creator>
            <pubDate>Sun, 30 Apr 2023 16:06:30 GMT</pubDate>
            <atom:updated>2023-04-30T16:06:30.973Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E_MCiuruM7l7JRB3pyocAw.jpeg" /><figcaption>Translate your text now within Whatsapp. Quick and easy</figcaption></figure><p>Should you not have it yet, this article pressumes you have remko.online as a contact in your whatsapp. <a href="https://medium.com/web3-use-case/chatgpt-on-whatsapp-and-more-remko-online-fc338e7b22d8">More info here https://medium.com/web3-use-case/chatgpt-on-whatsapp-and-more-remko-online-fc338e7b22d8</a></p><p>Have you ever had to write a WhatsApp message to someone who has limited English and doesn’t seem to understand you? Now it’s easy. Go to Remko.online (+62 815 1708 4333), translate it, and forward it.</p><p>In Remko.online for WhatsApp, you can now translate to over 17 languages, including Chinese, Spanish, Korean, etc. You just need to type the two-letter language code in front of your message. After translating, you can forward it to your contact. If he/she answers in the same language, copy it back to your Remko.online and put “en:” in front of it.</p><p>So, “it: my plane arrives at 5 pm. Can somebody pick me up?” will give back the Italian translations for that text. It’s that simple. And since you are already in WhatsApp, just forward it. Simple.</p><p>Currently the following languages are supported (more comming!):</p><p>en English<br>es Spanish<br>fr French<br>de German<br>it Italian<br>pt Portuguese<br>nl Dutch<br>ru Russian<br>zh Chinese<br>ja Japanese<br>ko Korean<br>ar Arabic<br>he Hebrew<br>hi Hindi<br>th Thai<br>id Bahasa Indonesia<br>ro Romainan<br>pl Polish</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71ebd6cb5fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why i use ChatGPT on whatsapp when programming python (remko.online)]]></title>
            <link>https://medium.com/@remko66/why-i-use-chatgpt-on-whatsapp-when-programming-python-remko-online-a25449b29c2a?source=rss-5669a0f5b374------2</link>
            <guid isPermaLink="false">https://medium.com/p/a25449b29c2a</guid>
            <category><![CDATA[education]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Remko Weingarten]]></dc:creator>
            <pubDate>Thu, 13 Apr 2023 04:01:31 GMT</pubDate>
            <atom:updated>2023-04-14T16:00:44.555Z</atom:updated>
            <content:encoded><![CDATA[<p>My editor, PyCharm, has a ChatGPT plugin, but I hardly use it. Instead, I have web WhatsApp open on Remko.online (+62 815 1708 4333) and use that.</p><p>First of all, I got tired of typing everything that’s obvious, like ‘<em>Find the country code from a phone number in Python, please provide package info and sample code.</em>’ In WhatsApp, I type ‘<em>py phone number to country code</em>’ and get the same result. Also, now the answer is in my WhatsApp history.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BUmsxqEZARiN055wVJ9IKQ.jpeg" /></figure><p>I also use the SQL prompt a lot, such as ‘<em>SQL all records of last 10 minutes from a table.</em>’ It has many prompts for programming, computer science, or generating LaTeX code, etc.</p><p>Here is a list of quick prompts for programming questions:</p><p>py</p><p>sample : py call post api</p><p>js</p><p>sample : js how to show progress bars while uploading</p><p>rust</p><p>sample : rust call post api</p><p>html</p><p>sample : html upload multiple files</p><p>c++</p><p>sample : c++ call post api</p><p>java</p><p>sample : java call post api</p><p>sql</p><p>sample : sql search word in a text field</p><p>And then there is compsc for general computer science questions. Like</p><p>compsc dijkstra algo</p><p>Just try it out. For me it helps</p><p>wa number <a href="http://wa.me/6281517084333"><strong>+62 815 1708 4333</strong></a><strong> </strong>(yes its free)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a25449b29c2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generate LaTex code with ChatGPT (remko.online)]]></title>
            <link>https://medium.com/@remko66/generate-latex-code-with-chatgpt-remko-online-fcae20e088ba?source=rss-5669a0f5b374------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcae20e088ba</guid>
            <category><![CDATA[math]]></category>
            <category><![CDATA[latex]]></category>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[thesis]]></category>
            <dc:creator><![CDATA[Remko Weingarten]]></dc:creator>
            <pubDate>Tue, 11 Apr 2023 17:25:19 GMT</pubDate>
            <atom:updated>2023-04-14T16:00:51.703Z</atom:updated>
            <content:encoded><![CDATA[<p>How to generate LaTeX code just on (web) WhatsApp. It’s simple, add this number to your WhatsApp: +62 815 1708 4333 and type ‘help’ to see what you can do here.</p><p>And start a sentence with latex as the samples below… If you use it in web whatspp you can just copy the output to LaTeX. And will be in your wa history…. (Try: latex abc formula).</p><p>The LaTex document preparation system is great for writing technical texts that contain many equations, symbols and references. However, its power comes at a price: It is effectively a programming language with many commands and environments which people tend to forget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*swd4F_pqEh00z1NNkB-o2g.jpeg" /></figure><p>For instance the code for the approximately equal sign is \approx, for the infinity symbol is \infty.</p><p>Sometimes the code for generating a particular symbol or layout can be quite verbose, for example to make nice tabular structures. If you know the keywords you can look it up in help files, but a latex assistant can be really helpful to accomplish some tasks:</p><p>- Find a command or environment, including example code, from a description which does not include the specialist keywords</p><p>(latex integral symbol with a circle)</p><p>- Fill a matrix or table with elements that have some structure, from a description</p><p>(latex 4x4 matrix with elements a_1, b_1 … a_2, b_2 etc)</p><p>- Provide a template for a well known equation</p><p>Latex abc formula</p><p>latex schroedinger</p><p>Latex chebyshev interpolation</p><p>Latex ground state harmonic oscillator</p><p>- Or a less well known one</p><p>latex korteweg de vries</p><p>latex 7th order Hermite polynomial</p><p>Nevertheless you are well-advised to check the actual equations before using them in a report or paper, as GPT models are known to sometimes mess up math, dropping factors of two or minus signs, which of course I never do.</p><p>I don’t include the output here because that is the point: The system gives you the output and you ever have to remember the keywords or type the lengthy environment descriptors -&gt; LaTex productivity up!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcae20e088ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Proofreading with ChatGPT power (remko.online)]]></title>
            <link>https://medium.com/@remko66/proofreading-with-chatgpt-power-remko-online-4247ff1d5a39?source=rss-5669a0f5b374------2</link>
            <guid isPermaLink="false">https://medium.com/p/4247ff1d5a39</guid>
            <category><![CDATA[proofreading]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[legal]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[language]]></category>
            <dc:creator><![CDATA[Remko Weingarten]]></dc:creator>
            <pubDate>Mon, 10 Apr 2023 07:40:11 GMT</pubDate>
            <atom:updated>2023-04-14T16:00:49.110Z</atom:updated>
            <content:encoded><![CDATA[<p>There are a lot of grammar correctors and spell checkers available. However, my wife was only using the spell checker in Word. The problem was that she is a lawyer and needs to know what changes have been made in a text. There is no alternative to walking through the text herself with the spell checker and correcting the words</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7tXIJE3ZZLWqEhxVY5ccUg.jpeg" /><figcaption>Cartoon generated by remko.online for whatsapp</figcaption></figure><p>No suggestions for other words, nothing ‘fancy’.</p><p>I asked her what she would need to enter 2023. She said she needed a text corrector that lists changes so she can check if there are no consequences to the legal meaning.</p><p>After a lot of playing around with the right prompts, I got it working and added it to my remko.online platform to be used for free (I hope I can keep it free!) by everybody who needs it. You need to do it one to two paragraphs at a time because it cannot handle really long texts. (If you need that, email me and I can look at it.)</p><p>So, how does it work? Let’s download a paragraph in broken English from the web:</p><p>“It rained a lot in 1816…. a lot — like everyday; the weather in Europe was abnormally wet because it rained in Switzerland on 130 out of the 183 days from April to September. If I was Mary Shelley I might decide to write a book too. Afterall, it was the onnly thing you could do without TV or anything. She said that she “passed the summer of 1816 in the environs of Geneva…we occasionally amused ourselves with some German stories of ghosts… These tales excited in us a playful desire of imitation” So, people were stuck inside and bored. Mary Shelley decided to write a book becuase it was so awful outside. I can totally see her point, you know? I guess I would write a novel if there was nothing else to do.”</p><p>Now we feed it to <a href="https://remko.online/proofread">remko.online/proofread</a>:</p><p><strong>RESULT:</strong></p><p>“It rained a lot in 1816 — like every day. The weather in Europe was abnormally wet, with Switzerland experiencing rain on 130 out of the 183 days from April to September. If I were Mary Shelley, I might have decided to write a book too. After all, it was the only thing to do without TV or anything else. She said, “I passed the summer of 1816 in the environs of Geneva…we occasionally amused ourselves with some German stories of ghosts… These tales excited in us a playful desire of imitation.” People were stuck inside and bored, so Mary Shelley decided to write a book because it was so awful outside. I can totally see her point, you know? I guess I would write a novel if there was nothing else to do.”</p><p>Changes made:<br>- Capitalized the first letter of the sentence.<br>- Added hyphen between “a lot” and “like everyday.”<br>- Added comma after “abnormally wet.”<br>- Corrected “becuase” to “because.”<br>- Capitalized “TV.”<br>- Added quotation marks around the quote.<br>- Capitalized “People.”<br>- Added comma after “bored.”<br>- Capitalized “Mary Shelley.”<br>- Added comma after “outside.”<br>- Added period at the end of the sentence.</p><p>So all changes listed to be checked if the meaning is still 100% the same!</p><p>Of course, you can also do it on Remko.online for WhatsApp (add number +62 815 1708 4333 to your WhatsApp, type ‘help’ to see what you can do) and put ‘proofread’ in front of your text. Same prompt, same result. And then it’s in your WhatsApp history. Use it any way you like.</p><p>If you have any ideas for a GPT function that you want or need (which will be provided for free if many people require it), please email me at remko[at]remko.online</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4247ff1d5a39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ChatGPT on Whatsapp (and more, Remko.online)]]></title>
            <link>https://medium.com/@remko66/chatgpt-on-whatsapp-and-more-remko-online-fc338e7b22d8?source=rss-5669a0f5b374------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc338e7b22d8</guid>
            <category><![CDATA[whatsapp]]></category>
            <category><![CDATA[whatsapp-bot]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[image-generation]]></category>
            <category><![CDATA[proofreading]]></category>
            <dc:creator><![CDATA[Remko Weingarten]]></dc:creator>
            <pubDate>Sun, 09 Apr 2023 18:06:07 GMT</pubDate>
            <atom:updated>2023-04-14T16:00:54.731Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HtKAlix-8w549jo4xAzQ_w.jpeg" /><figcaption>Of course, this image was generated on WhatsApp by Remko.online. (in 5 minutes you will make your own)</figcaption></figure><p>First things first, if you want to try the things we discuss here, add this number to your WhatsApp: +62 815 1708 4333 (or click here if you’re reading this on your phone: wa.me/6281517084333?text=help).</p><p>So now you have ChatGPT on your WhatsApp. If that’s all you wanted, you can stop reading here. But hang on, ChatGPT is fun to play with. To make it really useful, you need prompts and a good platform, unless you want to engineer all your prompts yourself.</p><p><strong>Remko online Prompt system</strong></p><p>More and more people are discovering that the way you ask things can make a significant difference in any GPT. It can be the difference between receiving no answer, an answer that is not what you want, or exactly what you need.</p><p>For example, let’s say you are a programmer (I believe many readers here know coding, but if not, you can think of another example). I write a lot of Python code, and</p><p>I can type, ‘Can you explain how to call a POST API in Python and provide some sample code and additional links if necessary?’ I</p><p>can also type ‘py post api’ as a prompt, which serves as a shortcut for my previous request and more. For a non-technical example</p><p>Try “what is paracetamol” vs “pill paracetamol”</p><p>The second one provides much more information, including indications, contraindications, and more.</p><p>But some prompts do things that ChatGPT normally cannot.</p><p>For example “cartoon hello kitty in front of the whitehouse”. Now it makes the cartoon.</p><p>Also try: “proofread this is a text i copy pasted and want to etc…”. Not only did it correct your text (even word can do that), it gave a list of changes made! Something a legal professional needs to have!</p><p>So many prompts to play with, you will soon forget the day when you typed a lot on vanilla ChatGPT and thought that was already handy.</p><p><strong>PROMPTS</strong> — it will do shortcuts to your typing work</p><p>To see all <strong>PROMPTS</strong>, please type “list prompts”</p><p>To limit your usage only to certain category such as legal to <strong>PROMPTS</strong>, type “list prompts legal”</p><p>New style (using prompts) in italic. Will give better results.</p><p><strong>Legal</strong></p><p>“what are the rules and regulations concerning carbon trading in my country?”</p><p><em>“Rr carbon trading”</em></p><p>“<em>What is the status of prenuptial agreement in the Netherlands”</em></p><p><em>“legal prenuptial agreement”</em></p><p><strong>Information Technology</strong></p><p>“Can you give me the commands and examples to call a post API in Python?”</p><p><em>“Py post API”</em></p><p><strong>General Stuffs</strong></p><p>“How to clean my dishwasher in a safe way give step by step answer”</p><p><em>“Howto clean dishwasher”</em></p><p>“Do you have any tips on how to change a diaper?”</p><p><em>“tips change diaper.”</em></p><p>“What is the use of paracetamol”</p><p><em>“pill paracetamol”</em></p><p><em>“Cartoon Hello Kitty in New York”</em></p><p><em>“Img cat in Eiffel Tower”</em></p><p>And, of course, the awesome “proofread” prompt that provides a full list of changes. Want to proofread a website? Remko.online/proofread can still work wonders.</p><p><strong>Does a prompt need to be text</strong></p><p>Glad you asked! No, just share a document or PDF with the bot to get a summary (long docs not yet supported). You can also give it a picture or your location and see what happens! Additionally, you can share a product from the Amazon webstore and the bot will list the pros, cons, and use cases of the product (although Amazon only lists the pros). Most other webshops are not connected yet, but Amazon works and for people in Indonesia, Tokopedia also works.</p><p>For writing emails, memos, or other long texts, I still recommend <a href="https://remko.online/">Remko.online</a>. However, for small questions or checks, WhatsApp is an awesome platform. If you use web WhatsApp when on your computer, it is all saved in your WhatsApp history, so you can read it again on the train.</p><p>You can also try to share a CNN link (an article) with the bot, but a lot of that kind of stuff is still very beta.</p><p>Wow, I was afraid you would stop reading after finding out how to get ChatGPT for free on your WhatsApp.</p><p>If you are into PR or internet marketing, I have a deal for you. Help me promote this tool, and I will give you some prompts that will put you at an advantage. If interested, email remko on the domain remko.online (replace ‘on the domain with @’). If not, have fun using it and don’t keep it a secret from your friends and colleagues, please.</p><p>And remember, ChatGPT is basically only a demo of what GPTs can do. To make it useful, we need platforms built on them…unless you really, really like typing…</p><p><a href="https://remko.online/">Remko.online</a> helped in writing, editing, and creating the image for this text, all on the WhatsApp platform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc338e7b22d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The math of dronken driving will surprise you.]]></title>
            <link>https://medium.com/@remko66/please-drink-and-drive-ae8a1a1bf426?source=rss-5669a0f5b374------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae8a1a1bf426</guid>
            <category><![CDATA[alcohol]]></category>
            <category><![CDATA[correlation]]></category>
            <category><![CDATA[humor]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[driving]]></category>
            <dc:creator><![CDATA[Remko Weingarten]]></dc:creator>
            <pubDate>Wed, 11 Aug 2021 15:10:34 GMT</pubDate>
            <atom:updated>2021-08-11T15:23:34.255Z</atom:updated>
            <content:encoded><![CDATA[<p>How statistic can help you drive any point home</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*UqxkEeHe7XdLy1s3wuU7dw.jpeg" /></figure><p>‘In 2016, 10,497 people died in alcohol-impaired driving crashes, accounting for 28% of all traffic-related deaths in the United States.’*</p><p>This means 72% of all traffic related deaths are caused by drivers who where not alcohol impaired.</p><p>Making consumption of alcohol mandatory prior to driving a car could potentially reduce traffic deaths by 72%!</p><p>Put it an other way, 72% of traffic death occur because a driver suffers from an alcohol deficiency.</p><p>source: <a href="https://www.cdc.gov/motorvehiclesafety/impaired_driving/impaired-drv_factsheet.html?fbclid=IwAR0fxV3q0sAEKKXvewcrf8xWjqyeCV9HvyYO1fgHPym-DBKh4FNVO7iwP08">https://www.cdc.gov/.../impai.../impaired-drv_factsheet.html</a></p><p>So next time when you hear somebody at a party say the risk of drinking and driving is not to big, since when dronk they drive more careful, you can even one-up him/her.</p><p>Don’t forget you read it here first. And don’t forget to follow me on medium (if you are sober that is)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae8a1a1bf426" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[After the progressive GAN, now i propose the conservative GAN (CON-GAN)]]></title>
            <link>https://medium.com/@remko66/after-the-progressive-gan-now-we-have-the-conservative-gan-con-gan-232888f0179f?source=rss-5669a0f5b374------2</link>
            <guid isPermaLink="false">https://medium.com/p/232888f0179f</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[humor]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[nerds]]></category>
            <dc:creator><![CDATA[Remko Weingarten]]></dc:creator>
            <pubDate>Wed, 11 Aug 2021 06:59:47 GMT</pubDate>
            <atom:updated>2021-08-11T07:02:38.186Z</atom:updated>
            <content:encoded><![CDATA[<p>In Many Machine learning courses in America learning the progressive GAN is now mandatory. It uses a resource heavy DC architecture and creates pictures out of noise.</p><p>To counter that I propose the Conservative GAN.</p><p>Like All GAN’s it is made up of 2 models. In this case the Creator model (who creates pictures out of nothing). And the discriminator network.</p><h4>First Lets look at the creator network.</h4><p>Other then with the progressive GAN it is fixed in size and does not evolve. It also doesn’t take noise as input but creates out of nothing.</p><pre>def creator():</pre><pre>p=Input(None)</pre><pre>x=conv2dTranspose()(p)</pre><pre>x=conv2dTranspose()(x)</pre><pre>x=conv2dTranspose()(x)</pre><pre>x=conv2dTranspose()(x)</pre><pre>model=Model(p,x)</pre><pre>model.compile(loss=’elect20’, optimizer=”adam(lr=1e-6”)</pre><p>Lets look at the code, the creator uses the adam optimizer and the elect20 loss function. Also notice the low learning rate. The number of layers will stay 4 and not progress.</p><h4>The discriminator</h4><p>Where it is the function of the creator to make images, it is the function of the discriminator to throw out every image that does look as expected. Since we do not mind to pour extra resources in the discriminator as to keep our images clean, it has more layers(i propose 50 layers all with local conntections).</p><h4>Some images produced by the CONservative GAN:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*AKmBJBO2JauqjDQt-geghA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*q8tFACIeAdqsVLuF6sIkuA.jpeg" /></figure><p>Tips on training:</p><p><strong>To avoid corrupting it please train it at home and not on a public data center or cloud.</strong></p><p>Remko Weingarten</p><p><a href="/service/mailto:remko66@gmail.com">remko66@gmail.com</a></p><p>(As medium.com doesn’t pay authors based on country, this story is brought to you for free).</p><p>For a more serious article about GAN’s look at my corrective GAN: <a href="https://medium.com/@remko66/corrective-neural-networks-cornet-19fefab47219">https://medium.com/@remko66/corrective-neural-networks-cornet-19fefab47219</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=232888f0179f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Corrective neural networks (cornet)]]></title>
            <link>https://medium.com/@remko66/corrective-neural-networks-cornet-19fefab47219?source=rss-5669a0f5b374------2</link>
            <guid isPermaLink="false">https://medium.com/p/19fefab47219</guid>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[keras]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[image-classification]]></category>
            <dc:creator><![CDATA[Remko Weingarten]]></dc:creator>
            <pubDate>Mon, 09 Aug 2021 11:59:54 GMT</pubDate>
            <atom:updated>2021-08-10T14:30:52.887Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to train minimal 3 times faster. Train a big network on your laptop!</h3><p>(works on all deep neural nets, specially works well when there are residual blocks, like most NLP networks and resnet). Although you might expect it to lose accuracy, so far that has not been observed).</p><h3>The basic idea behind cornet</h3><p>We tend to make a complex neural net and then train it all together. In nature that is not how things work. Often during evolution extra complexity is added to add new or improved functionality. Not all layers for at once.</p><p>This idea was taken earlier by Nvida to make the progressive Gan. But although they add layers, everything underneath keeps trainable and therefor changing. It helps with training time, but can we do (much) better…</p><p>Introducing the cornet. Corrective neural net. We train a very simple model till it doesn’t get better then stick on a new layer of complexity to correct what it could not get right. We only train the last block (can be one or multiple layers) and the new block. Everything before we see as set in stone.</p><p>According to common understanding of neural networks this should not give an accurate result.</p><h4>But is the Intuitive conception correct?</h4><p>Lets test is out with a standard, 14 blocks, resnet for image categorization and use cifar10. This method works very well on resnet type of architecture, networks where we add results from an earlier block, but it seems to work well on all deep networks (try it with one of these deep NLP networks!)</p><p>first, the original code as a reference:</p><pre>## Four simple functions to make a 2,5,5,2 resnet<br># i do not know the original author but you can find versions of this code all over stackexchange.<br># whoever made it is one populair man.<br># (So to be specific, i do not claim this code to be mine)<br>#functions extreme self expanitory. But look up resnet if you want to understand this type of net.<br><br>def relu_bn(inputs):<br>    relu = ReLU()(inputs)<br>    bn = BatchNormalization()(relu)<br>    return bn<br><br><br><br>def residual_block(x: Tensor, downsample: bool, filters: int, kernel_size: int = 3,blocknr=1) -&gt; Tensor:<br>    y = Conv2D(kernel_size=kernel_size,<br>               strides=(1 if not downsample else 2),<br>               filters=filters,<br>               padding=&quot;same&quot;)(x)<br>    y = relu_bn(y)<br>    y = Conv2D(kernel_size=kernel_size,<br>               strides=1,<br>               filters=filters,<br>               padding=&quot;same&quot;)(y)<br><br>    if downsample:<br>        x = Conv2D(kernel_size=1,<br>                   strides=2,<br>                   filters=filters,<br>                   padding=&quot;same&quot;<br>                  )(x)<br>    out = Add()([x, y])<br>    out = relu_bn(out)<br>    return out<br><br>def compile_model(model):<br>    model.compile(<br>        optimizer=&#39;adam&#39;,<br>        loss=&#39;sparse_categorical_crossentropy&#39;,<br>        metrics=[&#39;accuracy&#39;]<br>    )<br>def create_res_net():<br>    inputs = Input(shape=(32, 32, 3))<br>    num_filters = 64<br><br>    t = BatchNormalization()(inputs)<br>    t = Conv2D(kernel_size=3,<br>               strides=1,<br>               filters=num_filters,<br>               padding=&quot;same&quot;)(t)<br>    t = relu_bn(t)<br>    num_blocks_list = [2, 5,5, 2]<br>    for i in range(len(num_blocks_list)):<br>        num_blocks = num_blocks_list[i]<br>        for j in range(num_blocks):<br>            t = residual_block(t, downsample=(j == 0 and i != 0), filters=num_filters)<br>        num_filters *= 2<br><br>    t = AveragePooling2D()(t)<br>    t = Flatten()(t)<br>    outputs = Dense(10, activation=&#39;softmax&#39;)(t)<br><br>    model = Model(inputs, outputs)<br>    compile_model(model)<br>    return model</pre><p>Standard resnet as taken from stackexchange (but you find it all over).</p><p>To Train it:</p><pre><br>def train_batch(model,epochs=5,batchsize=64):<br>    <em>&quot;&quot;&quot;<br>    Very standard train loop<br>    </em><strong><em>:param</em></strong><em> model: the model<br>    </em><strong><em>:param</em></strong><em> epochs: number of epcos<br>    </em><strong><em>:param</em></strong><em> batchsize: batchsize<br>    </em><strong><em>:return</em></strong><em>:<br>    &quot;&quot;&quot;<br>    </em>model.summary()<br>    batchnr=int(len(x_train)/batchsize)+1<br>    start = time.time()<br>    for epoch in range(epochs):<br>        for batch in range(batchnr):<br>            xt=x_train[batch*batchsize:(batch+1)*batchsize]<br>            yt=y_train[batch*batchsize:(batch+1)*batchsize]<br><br>            res=model.train_on_batch(<br>                xt,<br>                yt,<br>                sample_weight=None,<br>                class_weight=None,<br>                reset_metrics=False,<br>                return_dict=False,<br>            )<br>            print(epoch+1, &#39;/&#39;, epochs, &#39;-&#39;, batch+1, &#39;/&#39;, batchnr,&#39;--&#39;,res[0],res[1],round(time.time()-start))<br>   model.evaluate(x_test,y_test,verbose=1)<br>    print(&quot;needed&quot;, time.time() - start)<br><br><br><br>#get cifar data (nice and preprocessed)<br>(x_train, y_train), (x_test, y_test) = cifar10.load_data()<br><br>#create our model<br>model = create_res_net()<br>#trainit<br>train_batch(model,epochs=10)</pre><p>Lets first train a standard resnet architecture. See base_ori (model) and train_ori. (you can just run train_ori) (see below for github link)</p><h3>Now the cornet</h3><pre>## Four simple functions to make a 2,5,5,2 resnet<br>#see base_ori for the original code as found all over stackexchange and other place.<br>#this if modified to be able to add bloakcs<br>#we can then train the whole network with added blocks (a progressive resnet) or only the last 2 blocks (a corrective neural net(cornet).<br># the term cornet and corrective neural net are mine, see readme. But call it whatevr you like<br><br><br>def relu_bn(inputs):<br>    <em>&quot;&quot;&quot;<br>    Part of teh resnet block. Nothing changed here<br>    </em><strong><em>:param</em></strong><em> inputs:<br>    </em><strong><em>:return</em></strong><em>:<br>    &quot;&quot;&quot;<br>    </em>relu = ReLU()(inputs)<br>    bn = BatchNormalization()(relu)<br>    return bn<br><br><br><br>def residual_block(x, downsample, filters, kernel_size= 3):<br>    <em>&quot;&quot;&quot;<br>    the standard resnetblock. Nothing changed here!<br>    </em><strong><em>:param</em></strong><em> x:<br>    </em><strong><em>:param</em></strong><em> downsample:<br>    </em><strong><em>:param</em></strong><em> filters:<br>    </em><strong><em>:param</em></strong><em> kernel_size:<br>    </em><strong><em>:return</em></strong><em>:<br>    &quot;&quot;&quot;<br>    </em>y = Conv2D(kernel_size=kernel_size,<br>               strides=(1 if not downsample else 2),<br>               filters=filters,<br>               padding=&quot;same&quot;)(x)<br>    y = relu_bn(y)<br>    y = Conv2D(kernel_size=kernel_size,<br>               strides=1,<br>               filters=filters,<br>               padding=&quot;same&quot;)(y)<br><br>    if downsample:<br>        x = Conv2D(kernel_size=1,<br>                   strides=2,<br>                   filters=filters,<br>                   padding=&quot;same&quot;<br>                  )(x)<br>    out = Add()([x, y])<br>    out = relu_bn(out)<br>    return out<br><br>def compile_model(model):<br>    <em>&quot;&quot;&quot;<br>    standard way to compile a keras network...nothing changed here as well!<br>    </em><strong><em>:param</em></strong><em> model:<br>    </em><strong><em>:return</em></strong><em>:<br>    &quot;&quot;&quot;<br>    </em>model.compile(<br>        optimizer=&#39;adam&#39;,<br>        loss=&#39;sparse_categorical_crossentropy&#39;,<br>        metrics=[&#39;accuracy&#39;]<br>    )<br><br><br>def makeblocklist():<br>    <em>&quot;&quot;&quot;<br>    Make a list of blocks with true/false for downsample and nr of filters. Not all blocks are equal and to keep this experiment meaningfull will stick to the design<br>    </em><strong><em>:return</em></strong><em>:<br>    &quot;&quot;&quot;<br>    </em>blocklist=[]<br>    num_filters=64<br>    num_blocks_list = [2, 5, 5, 2]<br>    for i in range(len(num_blocks_list)):<br>        num_blocks = num_blocks_list[i]<br>        for j in range(num_blocks):<br>           blocklist.append( ((j == 0 and i != 0),num_filters))<br>        num_filters *= 2<br>    return blocklist<br><br><br>def addBlock(x,curblock):<br>    <em>&quot;&quot;&quot;<br>    Add a resnet block to the network<br>    </em><strong><em>:param</em></strong><em> x: last layer<br>    </em><strong><em>:param</em></strong><em> curblock: blocknumber<br>    </em><strong><em>:return</em></strong><em>: new network<br>    &quot;&quot;&quot;<br>    </em>bl=makeblocklist()<br>    x=residual_block(x,downsample=bl[curblock][0],filters=bl[curblock][1])<br>    return x<br><br>def closeblock(t):<br>    <em>&quot;&quot;&quot;<br>    The way to end the network.<br>    </em><strong><em>:param</em></strong><em> t:<br>    </em><strong><em>:return</em></strong><em>: model<br>    &quot;&quot;&quot;<br>    </em>t = AveragePooling2D()(t)<br>    t = Flatten()(t)<br>    t = Dense(10, activation=&#39;softmax&#39;)(t)<br>    return t<br><br>def create_res_net():<br>    <em>&quot;&quot;&quot;<br>    Make a resnet with proper closure but only one residual block. rest added during training<br>    </em><strong><em>:return</em></strong><em>:  model<br>    &quot;&quot;&quot;<br>    </em>inputs = Input(shape=(32, 32, 3))<br>    num_filters = 64<br><br>    t = BatchNormalization()(inputs)<br>    t = Conv2D(kernel_size=3,<br>               strides=1,<br>               filters=num_filters,<br>               padding=&quot;same&quot;)(t)<br>    t = relu_bn(t)<br>    t=addBlock(t,0)<br>    outputs=closeblock(t)<br>    model = Model(inputs, outputs)<br>    compile_model(model)<br>    return model<br><br>def expand_res_net(model,curblock,trainold=True):<br>    <em>&quot;&quot;&quot;<br>    Add one extra block to the model<br>    </em><strong><em>:param</em></strong><em> model: current model<br>    </em><strong><em>:param</em></strong><em> curblock: current block number<br>    </em><strong><em>:param</em></strong><em> trainold: if yes then all old layers remain trainable, making this a progressive network. If no, only last 2 blocks can be trained. Making it a cornet)<br>    </em><strong><em>:return</em></strong><em>: model<br>    &quot;&quot;&quot;<br>    </em>inp=model.inputs<br>    for layer in model.layers[:-11]:<br>        layer.trainable=trainold<br>    x=model.layers[-4].output<br>    x=addBlock(x,curblock)<br>    x=closeblock(x)<br>    model = Model(inp, x)<br>    compile_model(model)<br>    model.summary()<br>    return model</pre><p>The same as before, but now extra logic to add a block and then recompile the model. The create function now only makes a resnet with one residual block.</p><p>Calling expand_res_net adds a block and recompiles the network. Also the ‘closing block’ is always re-added. If trainold=True it is basically a progressive net (all blocks that are in the model stay trainable). To really see it shine set it to false. Like in this training example:</p><pre>def train_batch(model,epochs=10,batchsize=64,stepsperupdate=500):<br>    <em>&quot;&quot;&quot;<br>    Stanar training loop, makes graphs of loss en accuracy<br><br>    </em><strong><em>:param</em></strong><em> model: the model (dah)<br>    </em><strong><em>:param</em></strong><em> epochs: number of epoch<br>    </em><strong><em>:param</em></strong><em> batchsize: batchsize<br>    </em><strong><em>:param</em></strong><em> stepsperupdate: number of steps before putting in a new block (linear here, but in real live better solutions are available)<br>    </em><strong><em>:return</em></strong><em>: absolutely nothing. Just make to print out training data. But can give back to model to work with or inference offcourse<br>    &quot;&quot;&quot;<br>    </em>steps = 1<br>    block=1<br>   <br>    count = 0<br>    model.summary()<br>    batchnr=int(len(x_train)/batchsize)+1<br>    start = time.time()<br>    for epoch in range(epochs):<br>        for batch in range(batchnr):<br>            xt=x_train[batch*batchsize:(batch+1)*batchsize]<br>            yt=y_train[batch*batchsize:(batch+1)*batchsize]<br><br>            res=model.train_on_batch(<br>                xt,<br>                yt,<br>                sample_weight=None,<br>                class_weight=None,<br>                reset_metrics=False,<br>                return_dict=False,<br>            )<br>            steps+=1<br>            if steps&gt;stepsperupdate:<br>                if block &lt; 13:<br>                    model=expand_res_net(model,block,trainold=False)<br>                    block+=1<br>                    print(&quot;expanded!&quot;)<br>                steps=0<br>            print(&#39;\r&#39;,epoch+1, &#39;/&#39;, epochs, &#39;-&#39;, batch+1, &#39;/&#39;, batchnr,&#39;--&#39;,res[0],res[1],round(time.time()-start),block)<br>   <br>    model.evaluate(x_test,y_test,verbose=1)<br>    print(&quot;needed&quot;, time.time() - start)<br><br><br>#get cifar data (nice and preprocessed)<br>(x_train, y_train), (x_test, y_test) = cifar10.load_data()<br><br>#create our model<br>model = create_res_net()<br>#trainit<br>train_batch(model,epochs=10)</pre><p>All three networks where trained on cifar 10 over 10 epochs. Results are from test dataset.</p><p>The Cornet and the pronet start with 1 resblock. A new one in added every 500 batches to end with 14. Same a the basic resnet that is used as a reference.</p><p>NetworkTime for 10 epochs Results (loss) result (acc)resnet</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O34CiZ6iX_882_XW1T7n7g.png" /><figcaption>Results cornet vs standard resnet (and progressive option)</figcaption></figure><p>(*) To try the progressive net set trainold=False to trainold=True in line 68 of train_cornet. In this cornet the number of steps before adding a new block are linear (fixed). This is not the best way to do it, but still working on that.</p><p>Training times on my Lenovo ideapad 3 (ryzen 7, gtx 1650 ). (People from Lenovo if you like this mention feel free to contact me for a donation ;-) )</p><p>This idea/work in mine, code and ideas are mine. Basic keras implementation of resnet and the residual blocks come from the internet (stackexchange). I don’t know the original author.</p><p>Should this cornet already exists under a different name and/or have libs etc. Let me know.</p><p>It helps me train huge NLP networks on my laptop in a fraction of the original time. So more improvements or tips very welcome.</p><p>Remko Weingarten</p><p><a href="/service/mailto:Remko66@gmail.com">Remko66@gmail.com</a> (would love it if you drop me a line, now going on to write a cornet library)</p><h4>ALL CODE ON GITHUB <a href="https://github.com/remko66/cornet2">https://github.com/remko66/cornet2</a></h4><p>Here the loss graph for cornet. Look at its distinctive pattern:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*HokQanMGXdKuxx2F.png" /></figure><p>Compared to the original resnet model:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*YrDK7W5KdA3y5MfLA8R1bQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19fefab47219" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>