<?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 Harald Hentschke on Medium]]></title>
        <description><![CDATA[Stories by Harald Hentschke on Medium]]></description>
        <link>https://medium.com/@hhntschk?source=rss-5725ebe4c3d8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*X0lGBvVyRuS9L1PzBBmu-w.png</url>
            <title>Stories by Harald Hentschke on Medium</title>
            <link>https://medium.com/@hhntschk?source=rss-5725ebe4c3d8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 16:25:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hhntschk/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[Bye-bye, two-wheeled motorized freedom]]></title>
            <link>https://medium.com/@hhntschk/bye-bye-two-wheeled-motorized-freedom-936755ac727f?source=rss-5725ebe4c3d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/936755ac727f</guid>
            <category><![CDATA[motorcycle]]></category>
            <category><![CDATA[maintenance]]></category>
            <category><![CDATA[travel]]></category>
            <dc:creator><![CDATA[Harald Hentschke]]></dc:creator>
            <pubDate>Wed, 26 Jul 2023 19:53:05 GMT</pubDate>
            <atom:updated>2023-09-14T08:37:24.325Z</atom:updated>
            <content:encoded><![CDATA[<h4>Looking back at four decades of motorcycling</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iL8Dv89ztiLTTHL-eAztJA.jpeg" /></figure><p>Last month I sold my BMW F800 S, definitely my last motorbike. That’s it for me with motorcycles, end of story at age 55. Although over the last years I rode very little, motorcycling has been a defining part of myself for four decades, so deliberately putting an end to it hurt. Why did I do it? Circumstances of life. Mainly a life-changing health issue, but also three kids, and a dearth of destinations in everyday life which would be best reached by motorcycle, and by best I mean a mixture of factors to do with fun, ability to take little passengers along, ability to exercise, and carbon footprint. Time for a retrospective of the different motorbikes I had, and some reflection on riding and maintaining motorcycles in general, garnished with lots of anecdotes.</p><p>Who is this for? Primarily myself, but also for those close to me— naturally, my motorcycle buddies may enjoy it most. If I can get anyone else on board, e.g. those of you pondering reasons for or against motorcycling, you’re welcome.</p><h3>Cannonball Chimera (1983–1984)</h3><p>Aged 15, two friends of mine (Dirk and Jan) and myself got our hands onto a two-wheeled something that had plainly been assembled from at least two motorcycles. After lending it to us for a brief trial period, the assembler (just to avoid the term owner), a shady guy from the village across the next hill, offered it to us at a manageable price.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFIbwZr1YhK_Qaic67Bbaw.jpeg" /><figcaption>On Cannonball Chimera — from the rider’s position I’d guess full throttle in 1st gear</figcaption></figure><p>Frame and engine were from a Hercules K 125 BW as used in the German army at that time, and my best guess for the front is an enduro <em>Leichtkraftrad</em> (see next chapter), possibly a Honda MT-8. The original Hercules K 125 BW had 12.5 horsepowers (hp) and weighed in at 130 kg — the army must have stored uranium rounds somewhere in the bike’s frame, otherwise I have no idea how you can fatten a 125 ccm motorcycle to such a degree. Our bare-bones chimera was an improvement on both counts, especially weight, and in addition had a transmission ratio favoring sprints. Being used to tamed 50 ccm mopeds only, we were hooked by the bike’s stellar (in our eyes) acceleration. Unfortunately, it had neither kickstarter nor choke, so push-starting the engine was a strenuous affair, especially on colder days. The bike had decent off-road qualities, and definitely gave me a taste of more to come. It also performed well on stealthy road trips at night (occasionally necessary for changing base camp), particularly in scaring the shit out of oncoming drivers who didn’t expect to encounter a screeching cannonball without headlights.</p><p>Eventually, with the advent of parentally endorsed two-wheelers, we lost interest in it, and gave it a semi-final resting place in the backyard of a friendly neighbor near my parents’ house. Rumor has it that a boy from the neighboring village snatched it from its leafy surroundings and breathed new life into it. Farewell, oddball.</p><h3>Honda MB-8 (1984–1986)</h3><p>Legally unchallenged fun and freedom started with a Honda MB-8. Luckily for me, my older brother Martin fought all major battles with my parents on the pros and cons of letting 16 year-olds loose on a vehicle that can harm or kill you if you’re inattentive or reckless, or just have plain bad luck. Sounds familiar? In our case, formal pro argument #1 was the remote location of our home. School, friends, any urban infrastructure worth the term were at least 3–4 seriously hilly km away. We marked days in the calendar when friends made the strenuous or parent-propelled trip to our home, and we argued that we had had enough exercise in the past mastering the hills by bicycle. Of course, real argument #1 was having fun and fulfilment on two wheels, the promise of freedom and self-reliance. Well, formal and real arguments #1 had some overlap and were maybe on equal ground. After much sweat and tears, my parents gave in. All children granted equal rights, I didn’t have to fight. My younger brother Guido had a Honda Dax, a monkey-bike style, slower moped, so there was even less concern here (spoiler: we all emerged unscathed from our respective two-year adolescent motorized riding periods).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wJpIwZXWq75yz6VfelRtng.jpeg" /><figcaption>Google Bard says the MB-8 was designed for city riding, and that mine, shown here, was red (as of 2023–07–16). I’d disagree with the color, and add that it was fine for the countryside, too.</figcaption></figure><p>The MB-8 was a basic two-wheeler with an air-cooled two-stroke engine producing 7.2 hp, a fairing, not too bad looks (in the eye of the beholder), and pretty much standard fare in most other respects. Technical side note: It was a so-called ‘Leichtkraftrad’, a small-bore type of motorcycle for 16 year-olds introduced to Germany in 1980: top speed 80 kph, displacement no more than 80 ccm, maximum power to be reached at 6000 rpm. Our bureaucrats set such strict rules for the specs, as the idea had been to replace the screeching and accident-prone 50 ccm-’Kleinkraftrad’. Naturally, these specs could only be achieved with a two-stroke engine.</p><p><em>Leichtkrafträder</em> were allowed on the autobahn and could carry a passenger, so my range of destinations and activities jumped upwards overnight. I roamed the near and far surroundings, with Christian followed the course of a small river from its spring to our home town in the course of a tiny environmental project, and with Dirk paid nightly surprise visits to adored beauties well beyond our, ahem, romantic reach (we knew it all along, but what the heck). Speaking of which, the Honda didn’t really help me win over the other sex, who were just completely indifferent to us — I guess both vehicle and rider weren’t cool enough. No, I’m sure.</p><p>The seven horsepowers proved eminently tamable, and had me longing for more power pretty soon. I couldn’t wait to turn 18, the legal age for riding real motorcycles.</p><h3>Honda XL 500 R (1986–1996)</h3><p>Yeah, this was the real deal. I felt so much empowered by this vehicle, it’s almost embarassing to relive these emotions today. The XL 500 R was an enduro with decent suspension and off-road capabilities, featuring a 33 hp four-stroke single cylinder engine. I suspect the engine wasn’t properly throttled to 27 hp, as it should have been according to German regulations. It had a kickstarter, and was generally willing to go about its combustion business after a resolute kick. Which is not to say starting it was easy, as all my friends who tried it for the first time and afterwards rubbed their ankles can testify: the engine had a penchant for hitting you back, even if you knew the inner workings of four-stroke engines well enough to bring the piston into the theoretically optimal position. It was a bit like Mixed Martial Arts and Aikido— exert full force, and expect to have to redirect an equally hard response. At one point I ruined my beloved semi-Cowboy boots kicking this ass to life. Also, due to a tendency to occasionally misfire at low revs, the Honda once made me perform a short piece of nightly street ballet: from standstill, start a left turn, then change gears on the apex of the curve. Next, bike on the ground, rider on his feet, intoning a mournful chant. Ok, I didn’t sing, but for sure uttered words, and not nice ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yQ3fSk1PzQl2tIy0pCV2Vw.jpeg" /><figcaption>The Honda XL 500 R with the Paris-Dakar reservoir, ready to be burdened with camping gear.</figcaption></figure><p>In the first year with this bike I became friends with my classmate Axel, proud rider of a Yamaha XT 500. Naturally, he had previously had a Leichtkraftrad, too, and we had entertained friendly motor talk before. But if I remember correctly, it was this ‘real’ motorcycle phase that got us closer. Single cylinder large-displacement engines in the eighties needed some tending to, especially when operated by hormone-fuelled young adults, and Axel had a deep understanding of all things technical, and no less admirable manual skills. Plus, his family had a formidable workshop at their mid-sized, family owned factory (producing things made of concrete), and his father was so generous as to permit his boys plus friends free access to it all around the clock. So, it was here where Axel showed me how to properly adjust valve clearance. But of course it didn’t stop there. Soon, we took the bikes apart and put them together, more than once. That is to say, initially Axel (and his brother Hanspeter) were the masters, myself the eager, at times mesmerized pupil. We replaced pistons and piston rings, valves, camshafts and, in the case of the XL 500 R, the camshaft chain, as its tightening mechanism was known to not work well. Harken to my words.</p><p>Naturally, next up was a motorcycle trip. I bought the big Paris-Dakar reservoir for more range and the cool looks. We welded and mounted racks and added bells and whistles, including tyres suitable for the occasional off-road stunt. In the Honda’s case, the sturdy Continental TKC 80 on the rear, and the incredibly soft Michelin T61 on the front. Then, one windy, rainy day in June we set out for Norway, our sights set on the Nordkapp. Somewhere in the south of Norway I came closest yet to ruining my health by motorcycling (too fast on a snowy, muddy track with treacherous ruts), but that just as an aside. After the first rainy days, we had a fantastic time traveling north. Close to the arctic circle, we traversed an area with gentle hills completely covered in low-lying shrubs and snow from the previous cold season, a rail line in the distance, the road we were on, and nothing else. We set up camp. The sky was blue and the sun disappeared only for one or two hours behind a hill. Magnificient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W8IWErqYDEn1Qz_FjCPEMw.jpeg" /><figcaption>Norway in June, just north of the Arctic Cirle.</figcaption></figure><p>Mere kilometers away from the Nordkapp, I noticed a loss of power of the engine, and particularly a very sluggish reaction to quick twists of my gas hand. I told Axel that I feared the engine was about to break down in a manner we had discussed and anticipated for some time in the future, but not so soon — loose camshaft chain, which would eventually slip or even jump off the cog, setting valves and piston on a collision course. Since of course there was no motorcycle dealer close to the Nordkapp, we decided to skip it and drive very gently south, to the next town. It was a hard decision for Axel, who would dearly have loved to reach that pinnacle of our trip. It testifies to his character that he renounced it without any haggling and lost no hard words afterwards. Strangely, the next day the engine seemed to behave normally again, so after a cautionary grace period I rode as before, and we made it home without any trouble. Except for the mosquitos in Finland (have you ever cooked spaghetti on a finnicky camping stove with full motorcycle gear on, including helmet?), but let’s not digress.</p><p>My concerns were vindicated a few days after we returned. I wanted to set off for some afternoon activities. Right after leaving the driveway, the engine clattered and spluttered briefly, and game was over — in the manner anticipated, as revealed in the subsequent repair session.</p><p>I did a few other, less adventurous tours with the XL, a trip to Normandy with Dirk and Tom, and a weekend tour to the Netherlands with my brother Guido, all without engine or other trouble. Oh, and I remember another tour through France with my friend Martin. At the end of a long day, we encountered a road closure shortly before our destination. Ha, let’s ignore it, all the more so as it promised some off-road fun. No no, said the police officers waiting for us at the end of the road, you’re in France, you can’t do this. But, we replied, we’re poor students, with little money on us, and we just wanted to reach that camping ground really close by… They wagged their fingers, gave us directions and let us go. Next morning, different small road leading into a bigger road, stop sign. We ignored the stop sign. Police stopped us. Same officers as the day before. I’ve never seen such a prime example of a dropping jaw when one of them recognized us. This time, <em>pas de pitié</em>. I lost what I had in French cash in my wallet, as did Martin. Which is not to say that we rode on without cash, fortunately, because the French coffee is just so good, we needed it as much as our bikes needed gas.</p><p>Two side notes. In my dreams involving motorcylces, almost invariably the XL shows up, which testifies to the impression it had made on me in my early two-wheeled formative years. Second, this is also the bike that made me agonize over the best tread pattern on tyres for a bike meant to be driven both on and off the road — an obsession I never shook off, and nowadays enact on my cyclocross bicycle. Anyone else suffer from the same tic?</p><p>I cannot end this chapter without giving account of the last, sad episode. Before a long trip across Canada, I sold the Honda to a young guy. When I returned, I was contacted by a police officer who wanted to know whether the bike had been in good shape when I sold it (it was). He then told me that the guy had had a fatal accident, crashing into a parked trailer. He seemingly veered onto the gravely bank of a country road, maybe because he wanted to playfully test the bike’s off-road capabilities. It was a late afternoon, and likely because the sun was low and blinded him he didn’t see the trailer. It was a shock, and a reminder that on two wheels caution is a prime obligation, and errors must at all cost be avoided.</p><h3>Suzuki DR 600 S (1995–1996)</h3><p>I never fell in love with this one. I bought it in Montréal, Canada. I opted for this bike because i) it was an enduro, and I was wedded to this type of bike back then, ii) my friend Christian had ridden it before, also in Canada, reporting no problems, and iii) judging by its representation in the classified ads it seemed to be reasonably liked by Canadians, which helps if you have limited time to buy and eventually sell a motorcycle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*47OdadclUYyTm2_LZvPTJA.jpeg" /><figcaption>This must be the St. Lawrence river, maybe close to Trois-Rivières, on one of the few weekend trips.</figcaption></figure><p>Its power was sufficient, brakes and suspension were alright, and overall I liked the looks. However, much of it felt and looked somewhat raw and clumsy, like a bike from the seventies that had gotten a superficial makeover for the nineties. Its handling wasn’t exactly nimble, at least in my recollection. If you revved up the engine, it would furnish the promised 44 hp, but in such a linear manner that my blood wouldn’t heat up a fraction of a centigrade.</p><p>I didn’t ride it that much in and around Montréal; I was busy doing experiments in the lab and writing my thesis. Also, riding conditions in that corner of the world aren’t very inviting for a substantial part of the year, unless you want to take your bike for a spin in the literal sense. However, in 1996 my then girlfriend Imke and I traversed the continent on this bike (thanks again, Adam, for storing the bike!), without it giving us any trouble, so for the sake of fairness I should add sturdiness and reliability to its properties. It easily changed hands on Vancouver Island, our final destination.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uBggDa4kO1duuyHYuRqugg.jpeg" /><figcaption>Somewhere in Canada. Chilly, but sunny.</figcaption></figure><h3>Yamaha XT 600 Ténéré (1996 — 2003)</h3><p>Back in Germany, I wanted to ride the queen of enduros, a Yamaha XT 600 Ténéré. Dirk had had one, and I was impressed by how much better this motorcycle was than my previous enduros in almost all respects, but particularly the front suspension. Soft as butter on small wrinkles, yet firm on tougher terrain. While Dirk owned the first edition, the 34L with its gigantic reservoir, I bought a 1989 3AJ, the one with a fixed fairing and twin headlights — and, importantly, no more of the trouble with an overheating engine that hounded the 1986 1VJ.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IDQ18RivvCqTCfi3cYIHug.jpeg" /><figcaption>How many place names exist with three accents aigu? I mean in general, not only on motorcycles.</figcaption></figure><p>I still remember the purchasing act. I was in the owner’s apartment for the paperworks. He filled in the details in the agreement to sell, not appearing super happy, while his partner busied herself with a laptop in a remote corner of the same room. She displayed an ostentatious disinterest in our dealings; yet, I had the feeling of being observed, that with every fiber of her body she reconnoitered the letters that were produced on paper. Maybe, I thought, they had only recently been a couple, and his partner, afraid of her sweetheart hurting himself in a traffic accident, made selling the bike a condition for their future relationship (’It’s either it or me!’). Did she suspect us of signing just a lease? No no no, I said to myself, I never want to be in a situation like this, I don’t want a girlfriend who turns out to be opposed to motorcycling (wish was granted).</p><p>Anyways, the Ténéré proved to be a very agreeable bike for the everyday commute as well as traveling — I remember a trip to Sardinia and Corsica with Christof in late spring. As mentioned above, compared to XL and DR, it had much better suspension, brakes, power, … [please continue by naming all components and properties of a motorcycle except the carburator]. Yes, the carburator. It was a dual design; the ‘main’ one for low to mid-range power (let’s call it Joe), and the secondary, smaller one to kick in when more power was in demand (Jeff). While this design was in theory plausible and superior to a single-Joe-design, in practice it had some problems, as evident in the numerous accounts of ‘hickups’ and other ungainly phenomena of engines with this carburator. I didn’t mind the delay in power increase when Jeff was called from zero to moderate duty, that is, when a moderate increase in power was abruptly called for. The most unnerving phenomenon was that at medium to high revs, throttle about two thirds open, opening the throttle fully would result in the engine sputtering. So, exactly when you needed power the most (e.g. overtaking), it wasn’t furnished. While at first the phenomenon either wasn’t prominent or I didn’t care that much, in the last two or so years with this bike it drove me crazy. Two Yamaha repair shops tried their hands, but improved the situation only somewhat. One day, gripped by fury and the resolution to put an end to this, I spent half a freaking day adjusting the carburator this or that way (mostly the position of Jeff’s jet needle), testing the outcome, adjusting again, and so on. At the end of the day, the skin of my hands soaked with gasoline and brittle, I gave up. Joe and Jeff had an intricate mechanical design with many moving parts, and I just couldn’t cover parameter space this way.</p><p>Another, more funny anecdote. Chain and sprockets had to be replaced, and I decided to do it myself. The one in the front proved obstinate, the screw wouldn’t let loose, although I had given it a good whack beforehand, in line with the idea that firm blows on screws break or soften the connections, or molecular bridges, or whatever it is, between screw and thread (if you know better what I’m talking about, or even have a pointer to a paper or so, please let me know in the comments). I sat under the bike, between front and rear wheel, cog and screw just at the right distance in front of me. I then breathed deeply and calmly for a minute, imagined that every muscle fiber in my body existed only for the purpose of loosening that screw, and pulled with all the might in my body. When I regained conscience, the screw was loose. Heck, did I faint for an instance? I think I did. It was an almost spiritual experience.</p><p>In 2003, before leaving Germany again for some time, I was happy to find a buyer. He was a middle-aged guy who, judged by the vehicles parked in his backyard, was an apt mechanic and a frequent visitor to the deserts on this planet. He seemed to be happy to get his hands on the Ténéré and didn’t bargain over the price. I figured I didn’t have to explain the carburator issue to someone like him.</p><h3>Kawasaki ZRX 1100 (2004–2005)</h3><p>I had an academic spell in Madison, Wisconsin, USA. In the spirit of being open-minded when changing places, and getting rid of some convictions and habits I decided to give an entirely different type of bike a try: a four cylinder naked/muscle bike, with horsepowers in the three digits. I didn’t have a fixation on the naked aspect, but definitely to the muscle, and had set my sights on the ZRX a while before I eventually bought it. And disappointed I wasn’t! This beast had so much power… I rode it home awe-strikken, very slowly and cautiously. The engine’s growling, the low center of mass, the mass itself, and the instant push forward upon the slightest twist of the right hand — it felt like an altogether different world of motorbiking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x1j81vSQK5T397MkSoC08Q.jpeg" /><figcaption>The Green Queen, here already for sale.</figcaption></figure><p>In the US, as pretty much elsewhere in the world except Germany, there are speed limits also on highways, so to enjoy the muscle of the bike I accelerated it hard, if even only on ludicrously brief stretches of tarmac. There was just one <em>fuck-yer-all</em> moment when I let loose without regard for speed limits. Late afternoon on Labor Day, somewhere deep in the Wisconsin hinterland on the way to the Mississipi, Claudia on the back seat. Straight road rolling gently up and down on. When we reached yet another of those hilltops, I just had to let go for a few seconds. Yeeaaaaah! When on the next workday we gave a casual account of our weekend, our American colleagues raised their eyebrows, insinuating that we had played with our lives, or at least our health. No, not because of speeding, but because we spent overnight somewhere in the bushes, on unfenced private ground, just in our motorcycle clothes. Even the lousiest motel was full, so we had no real alternative, we said. But, we were admonished, what with that startled owner, fetching his gun upon stumbling over us?</p><p>I commuted with the bike, but also made further tours through the countryside, mostly either by myself or with Misha, who was equipped with a Triumph Triple Speed. Looking left and right on these tours, I noticed an uncanny similarity of what I saw to landscapes in Germany. Small wonder that German immigrants felt at home and settled there, as did immigrants from other European beer-brewing countries, and that as a result Wisconsin has one of the most diverse and enjoyable landscapes of craft beers in the US.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p1qJw_UL0Asu2UE7oAbVGg.jpeg" /><figcaption>Spot Misha. I took the picture with an analog SLR camera encased in a styrofoam box strapped to the reservoir, and the remote release fixed onto the handlebar. Worked like a charm.</figcaption></figure><p>When my stay neared its end, I sold the bike. I briefly considered importing it to Germany, but then decided against it, because after all it was a mass product, and instead of paying dearly for having it shipped across the Atlantic and then haggling with German customs officers and other bureaucrats over the details of modifications to be made, I could simply get a German incarnation of it. So, I placed it in the classified ads, with very modest resonance. There was one guy — elderly, judging from his voice — who was bent on buying it from me, but whose even higher priority had obviously been to push the price into terrain that was simply inacceptable. I told him that I was short on time, this was my price, end of discussion; take it or go to… Iowa. He let the deadline pass, only to call after I sold it to a motorcycle dealer, initiating the call with the exact same phrase as before. I told him it was sold. ‘HARALD, THIS WAS A GRAVE MISTAKE’, I heard a voice that suddenly had a totally different tonality, sounding quite menacing. I hung up on him, drew the curtains, called my friends and positioned them, machine gun in hands, 24/7 in my apartment. No, seriously, what an imbecile, stubborn jerk.</p><p>On the few miles to the dealer, I passed a road construction site, thinking no harm. Once I was at my destination, the dealer made an employee take the ZRX for a quick spin to test whether it was in shape. Fine, I said. Returning, the testing guy said that brakes, engine and so on were all good, but had I realized that the cooler had a leak? No, I hadn’t! I did remember that on the construction site I passed there had been some high-pressure cleaning activity going on. So, we mused, a single high-speed grain of rock must have hit the cooler. Rats! I was entirely not amused about the loss of 500 $, and the impression of having sold a reliable, friendly machine far below its worth sank deep into my mind for the remainder of my stay.</p><h3>Yamaha TDM 900 (2005–2011)</h3><p>Back in Germany, reason ruled. Harald, you had your big fun moments, now let’s be a little more environmentally friendly and get a two-cylinder bike. These must be fun, too! The TDM was just in the right ballpark — sufficient power (86 hp), relatively lightweight, cool looks, and as it resembled enduros with its ample suspension travel it should be suitable for tall guys like me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mqTOi6QdOaITX4HLABBh8w.jpeg" /><figcaption>Suboptimal photo, what with the shade, I know. Maybe a bit symbolic, as the TDM initially received only lukewarm responses from the biking community.</figcaption></figure><p>I was right on all counts — the TDM was a pretty good motorcycle that handled well and had sufficient power — but switching to it from the ZRX took some time to get used to. For one, the center of mass was so different on the two bikes. It’s like mounting a giraffe after having traveled on a rhino. Also, numbers matter — the number of cylinders. Although a two-cylinder engine is much better than a single cylinder engine in terms of smoothness, a four cylinder machine is just in a different sphere. In the same vein, the more cylinders, the less a single failed ignition matters, and the more relaxed you can drive very slow curves (and switch gears).</p><p>So, what did I do with this bike. Commute, visit my then girlfriend on the weekend, and travel. The latter two activities propelled me through the <em>Schwarzwald </em>(Black Forest, southwestern Germany), and to Slovenia and Italy. It was a good bike for all these purposes, also with a passenger. It was in fact so unproblematic and low-maintenance that I have a hard time recalling memorable moments. In the Schwarzwald, right after a 180 degrees bend on an ascending four-lane road, a souped-up Audi tried to race me. I usually didn’t fall for this kind of child’s play, but on this occasion I wanted to teach the driver a physics lesson: no matter what you do to your Audi within legal limits, you just cannot beat the acceleration of a motorcycle with horsepowers in the high double digits and a healthy body mass index. Don’t know whether he learned the lesson, because after the ascent he was too far behind me and I couldn’t see the expression on his face. Sorry, no more speed talk and bragging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nW1UB5VGvOpmf4Oq0ILFTw.jpeg" /><figcaption>In full travel mode. See the elderly couple looking out of their window, right below the siren? One of the most hilarious sights on this trip. I recall I fetched the camera and kind of pretended to take shots of the TDM only to capture them.</figcaption></figure><p>The guy I sold it to had an old Honda CBX750 F which, according to his account, was falling apart. This Honda had been an object of my adolescent motorcycle daydreams, and was not entirely different from the TDM: dual headlights, sleek fairing, ample suspension travel at the front, relaxed riding position, and around 90 hp. So, understandable that he opted for the TDM. Unfortunately, he came by car — I would have dearly liked to take a quick ride on this one, just for the experience.</p><h3>Kawasaki ZRX 1200 S (2011 — 2014)</h3><p>Honestly, I have no idea anymore why I gave up the TDM and caved in to obviously unsatisfied, childish desires. Possibly deep down in my ‘motor cortex’ (neurobiologists: ignore this) I resented not having had the chance to ride a big bike at full throttle for more than just a few seconds, and now was the time to re-enact the dream with an even souped-up version of the ZRX. And I also faintly remember some twisted thinking along the lines ‘Now that I don’t use the motorcycle very often anymore, from an environmental point of view it doesn’t really matter whether it’s big or big-big’. At one point I was so impatient I even got the S version instead of the R with its smaller fairing, which I would have preferred for the looks, but there was no R for sale close by.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DDFDwLxgGfatvglz3lcpZA.jpeg" /><figcaption>Good to see here: the sleek, rounded fairing grates a bit with the more angular style elsewhere on the bike.</figcaption></figure><p>Anyways — there it was, mightier than both ZRX 1100 and TDM 900, and with better protection from the flow of air. It served me well, but fascination with the sheer power of the bike wouldn’t really materialize. First, the TDM wasn’t exactly atrophic, and it was lighter, so the difference with regard to acceleration and even top speed wasn’t great. Second, and maybe more importantly, this kind of fascination had worn itself thin. Yes, I raced the autobahn, but very rarely so, and it surely didn’t give me a particular kick. Had I finally grown up?</p><p>There was one memorable, somewhat dangerous situation with the ZRX. Luise (then my girlfriend, now my wife) and I were on our way back home on the <em>Schwäbische Alb</em> (another rural region in southwestern Germany), when at a crossroads an exhausted-looking car driver approached from the right. Disregarding our right of way, he turned left, into the road we were on. Luckily, I saw it coming, and was able to evade him. He immediately realized what had happened, stopped on the bank (as did we), ran over to us — almost got run over himself in the act — and apologized profusely. He had played soccer, was in fact tired, and had overlooked us. Apology accepted, and one of my prime principles validated: look road users around you into the face, if possible, to gather their state of attention, and always anticipate the worst.</p><p>The decision to part with this bike came shortly after the birth of our first child. Ever more aware that a motorcycle accident would now definitely affect more than my own life, I decided to take a motorcycle safety course. No, not of the kind where some bored dude would roll pumpkin-sized foam cubes into your path, making you perform a leisurely evasive maneuver. After some reserach, I found a weekend course led by a former motorcycle racer who was bent on pointing us to the limits of physics and our own, personal limits. The magic formula consisted of specially prepared bikes, an excellent agenda including practice and theory, and a boss who displayed a mix of fatherliness and irony, if not cynicism occasionally. Unforgettable when on the morning of one course day he tested our protective gear. Strolling around the room with a hammer, he gave each of us a well-calibrated knock on the knee. If the response was ‘Ouch’ or such, he would bend down in front of you, make sure that his weather-beaten face would cover at least half of your visual field, and ask, with his thick Bavarian accent, ‘If this little feather stroke of mine makes you weep, what do you think will happen to your knee if you have an accident and skid across a rail?’, or variations thereof (I passed the test, phew).</p><p>Performing an emergency braking maneuver from 100 kph was the decisive experience. Even though the ZRX had powerful, well controllable brakes, and I was mentally prepared for the feat, I needed five attempts to stop the bike within a braking distance typical of bikes with ABS systems. So, now imagine you’re not that acutely prepared, and maybe there is dirt on the road — it’s pretty clear that normal riders like me would perform much worse than in this ideal case. On my way home the decision had already been made, a bike with ABS it had to be.</p><h3>BMW F800 S (2014–2023)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wG3i8UhkWKLKQ_RH_e8-pw.jpeg" /><figcaption>S as in ‘For sale’</figcaption></figure><p><a href="https://www.youtube.com/watch?v=jofNR_WkoCE">What does the fox say?</a> In 2015, one fox probably said ‘wise choice’. On my way back home from a friend, I rode a curvy road leading through a small stretch of forest south out of Stuttgart. Because of the curves, this was my favorite stretch of the trip, but it being late evening, my pace was moderate. This, plus the workings of the ABS, saved the life of said fox, which popped up out of nowhere. It vindicated my choice of the bike, and reassured me that I would really engage the brakes as hard as possible in situations like these and worse. How would I have reacted on the Kawa? The awareness that braking too hard will inevitably lead to a jammed front wheel, and thus a fall, had been a constant companion throughout my biking life, and I know very well that I had never gotten really close to that thin line between a rolling and a jammed wheel, simply because I hadn’t been in situations requiring maximal braking. Would the fox have made me? Likely not. In the split seconds requiring action my ‘motor cortex’ (neurobiologists, you know what to do) would probably have decided to rather run it over because foxes are too small to trigger a potentially self-harming action (sorry, guys). Well, it’s all speculation; not even the fox knows.</p><p>I bought the bike in its original state, that is, with M-shaped handlebars, forcing the rider into a hunched, sportsy position. Also, it was a relative lightweight, and again the number of cylinders halved, so almost by definition, its center of mass was higher than that of the ZRX 1200. So, this time round, switching bikes felt extremely funny, even more than what I experienced during the transition from the ZRX 1100 to the TDM; I felt quite insecure on the first few kilometers back home. Consequently, one of my first acts was to mount superbike-type handle bars, as well as lower footpegs. More precisely, to have them mounted — at a certain stage in life you simply don’t spend hours screwing things on and off your bike anymore. Of course I could have gotten the touring version of the bike, the F800 ST, to begin with, but I found its looks lame. Wow, what a difference it made — sitting on the bike in a relaxed, upright position made the F800 handle superbly. At the same time, irrespective of these modifications of course, it was extremely stable, no matter whether we’re talking about curves or top speed; it felt as if you were on rails, as my friend Dirk (another Dirk) put it. The engine was also great; both sufficiently powerful for me, the very occasional rider, and economical. What I particularly liked about it was its almost afterburner-like characteristic; if you needed maximum power you just revved it up to 8000 rpm and were rewarded with that delightful extra shove forward. Oh, and I loved the belt drive. No more adjustments of the drive chain’s slack, no more oily fingers from lubricating the chain, no more bad feelings about neglecting one of the most strained and weather-exposed parts of the bike.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ROon_gAzg-VpHyhJ_26hYA.jpeg" /><figcaption>In the Alps with the other Dirk. He rode a TDM 850.</figcaption></figure><h3>Concluding thoughts</h3><p>I’ve had some of the most joyful and peaceful moments in life riding motorbikes. Glide through a picturesque landscape on a powerful steed able to instantly catapult you forward with great might, should you so wish. Focus on the road, listen to the purring of the engine, melt into one unit with your machine. Fresh air in your face, the scent of the landscape in your nose; instantly sense minute changes in the air. Sing, or scream at the top of your lungs, if you like, nobody will hear you. All mundane sorrows blown away. Stop to marvel at specific views, or to set up camp, or continue chasing the horizon and swinging around curves as long as you wish. Freedom.</p><p>If the circumstances of my life were different, I’m pretty sure I’d still be riding, if only rarely. However, having enjoyed it for decades, and with other sources of joy having popped up in my life, I can be a happy person without. All the best to those of you who discover the pleasures of motorized traveling on two wheels at any time in your life — see e.g. story below.</p><p><a href="https://sheilatracy.medium.com/i-bought-a-motorcycle-at-53-6a3b1ebfc53b">I Bought My First Motorcycle at 53</a></p><p>As to the risks, it’s a very personal thing to weigh them against the happiness motorbiking can inject into your life, and that caclulation may change over time. The same statement, however, applies to many activities which are not exactly low-risk, including e.g. riding a bicycle in a city like Berlin.</p><p>Have fun, and may the force of acceleration be with you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=936755ac727f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sigmoid Activation and Binary Crossentropy — A Less Than Perfect Match?]]></title>
            <link>https://medium.com/data-science/sigmoid-activation-and-binary-crossentropy-a-less-than-perfect-match-b801e130e31?source=rss-5725ebe4c3d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b801e130e31</guid>
            <category><![CDATA[keras]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[loss-function]]></category>
            <category><![CDATA[activation-functions]]></category>
            <dc:creator><![CDATA[Harald Hentschke]]></dc:creator>
            <pubDate>Thu, 21 Feb 2019 10:20:40 GMT</pubDate>
            <atom:updated>2019-02-21T10:24:30.299Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sigmoid Activation and Binary Crossentropy —A Less Than Perfect Match?</h3><h4>Investigating concerns of numerical imprecision</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IuTHos-gLgL7RWMRYL6RNg.png" /><figcaption>Really cross, and full of entropy…</figcaption></figure><p>In neuronal networks tasked with <strong>binary classification</strong>, <strong>sigmoid</strong> activation in the last (output) layer and <strong>binary crossentropy (BCE)</strong> as the loss function are standard fare. Yet, occasionally one stumbles across statements that this specific combination of last layer-activation and loss <a href="https://www.kaggle.com/iafoss/pretrained-resnet34-with-rgby-0-460-public-lb">may result in <strong>numerical imprecision or even instability</strong></a>. I wanted to make sure I get the argument, down to the numbers, especially in the framework which I use so far, <strong>Keras</strong>. Sounds interesting? Realize that this may also be relevant for some image segmentation tasks, or multiclass, multilabel problems, not just cats_vs_dogs kind of problems? Then, please follow along. If you appreciate a refresher on BCE beforehand, I’d like to point to <a href="https://towardsdatascience.com/understanding-binary-cross-entropy-log-loss-a-visual-explanation-a3ac6025181a">an excellent, in-depth explanation of BCE</a> by <a href="https://medium.com/u/c79695e37339">Daniel Godoy</a>.</p><h4>1. Definition of the problem</h4><p>Let’s start by dissecting Keras’ implementation of BCE:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1127419ec8952754f0d8b63009fbdc7d/href">https://medium.com/media/1127419ec8952754f0d8b63009fbdc7d/href</a></iframe><p>So, input argument output is clipped first, then converted to logits, and then fed into TensorFlow function tf.nn.sigmoid_cross_entropy_with_logits. OK…what was logit(s) again? In mathematics, the logit function is the inverse of the sigmoid function, so in theory logit(sigmoid(x)) = x.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*59xmdS1z6OfGIMogPM9P0g.png" /><figcaption>Figure 1: Curves you’ve likely seen before</figcaption></figure><p>In Deep Learning, logits usually and <a href="https://stackoverflow.com/a/52111173/4334743">unfortunately</a> means the ‘raw’ outputs of the last layer of a classification network, that is, the output of the layer <strong>before</strong> it is passed to an activation/normalization function, e.g. the sigmoid. Raw outputs may take on any value. This is what sigmoid_cross_entropy_with_logits, the core of Keras’s binary_crossentropy, expects. In Keras, by contrast, the expectation is that the values in variable outputrepresent probabilities and are therefore bounded by [0 1] — that’s why from_logitsis by default set to False. So, they need to be converted back to raw values before being fed into sigmoid_cross_entropy_with_logits. To repeat, we <strong>first run numbers through one function (sigmoid), only to convert them back using the inverse function (logit)</strong>. This appears circuitous. The real potential problem, though, is the numerical instability that this to and fro may cause, resulting in an overflow in the extreme case. Look at the output of y = logit(sigmoid(x)) when x is of type float32, the default in Keras and, as far as I know, in most other frameworks, too:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dz0UO9oONGHRp87WYf5BbQ.png" /><figcaption>Figure 2: Numerical imprecisions with float32</figcaption></figure><p>Starting at about x=14.6 errors hit the 1% range, and above about x=16.6 game’s over due to division by zero. Division by zero occurs when the denominator in the sigmoid evaluates to exactly 1 and the denominator in the logit then evaluates to zero. We could have estimated the limit of x via np.log(np.finfo(np.float32).eps), but I found the numerical zigzagging entertaining and worth showing. Anyways, this is why the values of input variable outputin the Keras function need to be and in fact are clipped. So, to dispel one notion right at the beginning:</p><p><strong>Keras’s binary_crossentropy, when fed with input resulting from sigmoid activation, will not produce over- or underflow of numbers.</strong></p><p>However, the result of the clipping is a flattening of the loss function at the borders. To visualize this, let’s</p><ol><li>copy the <a href="https://stackoverflow.com/questions/52125924/why-does-sigmoid-crossentropy-of-keras-tensorflow-have-low-precision">neat trick of setting up minimalistic networks</a> with manually set weights, and</li><li>run single inputs (samples, batch size of 1) through the networks.</li></ol><p>Thus, we are able to compare the values of BCE as computed from sigmoid activation in Keras with the values computed from raw outputs in TensorFlow. Here is the first model, using sigmoid activation and Keras’s standard BCE:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2778e7e64d102ef16f734f3f32f943e/href">https://medium.com/media/f2778e7e64d102ef16f734f3f32f943e/href</a></iframe><p>The model without sigmoid activation, using a custom-made loss function which plugs the values directly into sigmoid_cross_entropy_with_logits:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f299b56201daaf8eaba4e025e605a2a7/href">https://medium.com/media/f299b56201daaf8eaba4e025e605a2a7/href</a></iframe><p>So, if we evaluate the models on a sweeping range of scalar inputs x, setting the label (y) to 1, we can compare the model-generated BCEs with each other and also to the values produced by a naive implementation of BCE computed with a high-precision float. Note again that we’re computing BCE from single samples here in order to distil the differences between the methods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RfwuCbZOemfCjGQ3VOy46A.png" /><figcaption>Figure 3: Binary crossentropy computed for single samples in three ways. Note logarithmic y axis in the left plot, and linear y axes in the others.</figcaption></figure><p>Interesting! The curve computed from raw values using TensorFlow’s sigmoid_cross_entropy_with_logitsis smooth across the range of x values tested, whereas the curve computed from sigmoid-transformed values with Keras’s binary_crossentropyflattens in both directions (as predicted). At large positive x values, before hitting the clipping-induced limit, the sigmoid-derived curve shows a step-like appearance. Most notable may be what happens on the left border, which is best appreciated on a linear scale (Fig. 3, center): the more negative the raw value, the more severe the underestimation of its BCE value due to clipping. Finally, even with a float128 we won’t get very far if we derive the BCE values from sigmoid-transformed input (gray curve in leftmost plot).</p><p>As the loss function is central to learning, this means that a model employing last-layer sigmoid + BCE <strong>cannot discriminate among samples whose predicted class is either in extreme accordance or extreme discordance with their labels</strong>. So, in theory it is true that there is a drawback to using sigmoid + BCE. However, does it matter in practice? After all, we are talking about extreme edge cases. And before we answer that question, a more basic question is in order: do raw last layer outputs reach such extreme values in practice? Let’s see.</p><h4>2. Checking individual samples’ raw output values in binary classification networks</h4><p>I trained three different networks to the task of categorizing dogs vs. cats, using a subset of the 2013 Kaggle competition data set (2000 training images, 1000 for validation; following the example of F. Chollet (<em>Deep Learning with Python</em>. Manning Publications Co, Shelter Island, New York. 2017.)). Yes, cats and dogs again, for the sake of ease and focusing on the issue at hand.</p><p>The figures and numbers below stem from a simple, hand-crafted convnet: four pairs of 2D convolution/max pooling layers, followed by a single dropout and two dense layers, all with relu activation. The last, single-element, output layer was without activation, and as the loss function I used above-mentioned Keras wrapper for TensorFlow’s sigmoid_cross_entropy_with_logits.</p><p>First, let’s find out whether individual images can in fact result in extreme raw values of the output layer. After training, I ran the same images as used for training through the network and obtained their raw output from the last layer. Additionally, I computed the sigmoid-transformed output, as well as the BCE values derived from both outputs. This is what I got after training for <strong>eight epochs</strong>, so with relatively little learning having taken place:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fQ5X84Hdfsxcs7KL6T1rHA.png" /><figcaption>Figure 4: Left and center, distribution of outputs of the last layer after training the network for <strong>eight epochs</strong>. Input for prediction consisted of the same 2000 images as used for training. Left, raw values; center, sigmoid-transformed values. Right, scatter plot of BCE values computed from sigmoid output vs. those computed from raw output. Batch size = 1.</figcaption></figure><p>Obviously, in the initial phase of training, we are outside the danger zone; raw last layer output values are bounded by ca [-3 8] in this example, and BCE values computed from raw and sigmoid outputs are identical. Also nice to see is the strong ‘squashing’ effect of the sigmoid (Fig. 4, center).</p><p>What is the picture like when the network is <strong>fully trained</strong> (here defined after not having shown a reduced loss in 15 consecutive epochs)?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XURS4acMxD_A9bJmFw1b7A.png" /><figcaption>Figure 5: Same depiction as in Fig. 4, but after <strong>full training </strong>of the network (test accuracy of ca. 0.85). Same conventions as in Fig. 4 apply. Note clipping of BCE values computed from sigmoid outputs (right).</figcaption></figure><p>Aha —we see a much clearer separation between the classes, as expected. And a small number of images did in fact result in extreme logit values that fall into the clipping range. Let’s focus on class 1 (dogs; orange color in the figures); the argument runs similar for the other class. None of the samples result in raw output values more negative than ca. -4, so again that is fine. However, a certain number of samples — the doggiest dogs — reach raw output values larger than about 16. Accordingly, the associated BCE, computed via sigmoid + Keras’s binary_crossentropy, is clipped at ca. 10⁻⁷ (Fig. 5, right; see also Fig. 3). This is a really small value. Would we expect learning to happen in a systematically different fashion if BCE values of doggy dogs and catty cats were smaller (and individually different) when computed without clipping-induced limits? <strong>Particularly if we use reasonable batch sizes, the samples with intermediate or low raw output values will dominate the loss.</strong> Figure 6 illustrates this for the same data as above with a batch size of 4, which is still really on the low side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*2-VFXmk4ScSKFkQ9DTeqzA.png" /><figcaption>Figure 6: scatter plot of BCE values computed from sigmoid output vs. those computed from raw output of the fully trained network with batch size = 4.</figcaption></figure><p>Results were <strong>qualitatively similar with VGG16- and Inception V3-based networks</strong> pretrained on the imagenet data set (trained without fine-tuning of the convolutional parts).</p><h4>3. Conclusions</h4><p>First of all, let’s reiterate that fears of number under- or overflow due to the combination of sigmoid activation in the last layer and BCE as the loss function are unjustified — in Keras using the TensorFlow backend. I am not familiar with other frameworks (yet), but I would be very surprised if they did not feature similar precautions.</p><p>Based on the ‘experiments’ above with the venerable cats_vs_dogs data set it appears that sigmoid +BCE is fine also in terms of precision. Particularly if you use a reasonable batch size and properly scaled data, it should not matter how BCE is computed. However, this is just one data set and very few models tested on them.</p><p>So, my <strong>tentative summary</strong>: If</p><ol><li>you know or suspect that raw outputs of many of your samples at the last layer attain extreme values, and</li><li>your batch size is very small, and/or</li><li>you want to exclude numercial imprecision as a possible (if unlikely) cause of trouble,</li></ol><p>it can’t harm to compute BCE from raw outputs. Otherwise, just stick with sigmoid+BCE.</p><p>Comments, suggestions, experience with other frameworks? Happy to hear about it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b801e130e31" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/sigmoid-activation-and-binary-crossentropy-a-less-than-perfect-match-b801e130e31">Sigmoid Activation and Binary Crossentropy — A Less Than Perfect Match?</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>