Breakfast with Zero-Shot NLP

What if I told you that you could pick up a library model and instantly classify text with arbitrary categories without any training or fine tuning? That is exactly what we are going to do with Hugging Face’s zero-shot learning model. We will also be using libpython-clj to do this exploration without leaving the comfort of our trusty Clojure REPL. What’s for breakfast? We’ll start off by taking some text from a recipe description and trying to decide if it’s for breakfast, lunch or dinner: ...

March 15, 2021 · 4 min · Carin Meier

Thoughts on AI Debate 2

AI Debate 2 from Montreal.AI I had the pleasure of watching the second AI debate from Montreal.AI last night. The first AI debate occurred last year between Yoshua Bengio and Gary Marcus entitled “The Best Way Forward for AI” in which Yoshua argued that Deep Learning could achieve General AI through its own paradigm, while Marcus argued that Deep Learning alone was not sufficient and needed a hybrid approach involving symbolics and inspiration from other disciplines. ...

December 24, 2020 · 4 min · Carin Meier

Hugging Face GPT with Clojure

A new age in Clojure has dawned. We now have interop access to any python library with libpython-clj. Let me pause a minute to repeat. ** You can now interop with ANY python library. ** I know. It’s overwhelming. It took a bit for me to come to grips with it too. Let’s take an example of something that I’ve always wanted to do and have struggled with mightly finding a way to do it in Clojure: I want to use the latest cutting edge GPT2 code out there to generate text. ...

January 10, 2020 · 7 min · Carin Meier

Integrating Deep Learning with clojure.spec

clojure.spec allows you to write specifications for data and use them for validation. It also provides a generative aspect that allows for robust testing as well as an additional way to understand your data through manual inspection. The dual nature of validation and generation is a natural fit for deep learning models that consist of paired discriminator/generator models. TLDR: In this post we show that you can leverage the dual nature of clojure.spec’s validator/generator to incorporate a deep learning model’s classifier/generator. ...

October 11, 2019 · 5 min · Carin Meier

Focus On the Generator

In this first post of this series, we took a look at a simple autoencoder. It took and image and transformed it back to an image. Then, we focused in on the disciminator portion of the model, where we took an image and transformed it to a label. Now, we focus in on the generator portion of the model do the inverse operation: we transform a label to an image. In recap: ...

September 6, 2019 · 3 min · Carin Meier

Focus on the Discriminator

In the last post, we took a look at a simple autoencoder. The autoencoder is a deep learning model that takes in an image and, (through an encoder and decoder), works to produce the same image. In short: Autoencoder: image -> image For a discriminator, we are going to focus on only the first half on the autoencoder. Why only half? We want a different transformation. We are going to want to take an image as input and then do some discrimination of the image and classify what type of image it is. In our case, the model is going to input an image of a handwritten digit and attempt to decide which number it is. ...

August 30, 2019 · 4 min · Carin Meier

Simple Autoencoder

If you look long enough into the autoencoder, it looks back at you. The Autoencoder is a fun deep learning model to look into. Its goal is simple: given an input image, we would like to have the same output image. It’s sort of an identity function for deep learning models, but it is composed of two parts: an encoder and decoder, with the encoder translating the images to a latent space representation and the encoder translating that back to a regular images that we can view. ...

August 16, 2019 · 5 min · Carin Meier

Clojure MXNet April Update

Spring is bringing some beautiful new things to the Clojure MXNet. Here are some highlights for the month of April. Shipped We’ve merged 10 PRs over the last month. Many of them focus on core improvements to documentation and usability which is very important. The MXNet project is also preparing a new release 1.4.1, so keep on the lookout for that to hit in the near future. Clojure MXNet Made Simple Article Series Arthur Caillau added another post to his fantastic series - MXNet made simple: Pretrained Models for image classification - Inception and VGG ...

April 26, 2019 · 4 min · Carin Meier

Clojure MXNet March Update

I’m starting a monthly update for Clojure MXNet. The goal is to share the progress and exciting things that are happening in the project and our community. Here’s some highlights for the month of March. Shipped Under the shipped heading, the 1.4.0 release of MXNet has been released, along with the Clojure MXNet Jars. There have been improvements to the JVM memory management and an Image API addition. You can see the full list of changes here ...

March 22, 2019 · 2 min · Carin Meier

Object Detection with Clojure MXNet

Object detection just landed in MXNet thanks to the work of contributors Kedar Bellare and Nicolas Modrzyk. Kedar ported over the infer package to Clojure, making inference and prediction much easier for users and Nicolas integrated in his Origami OpenCV library into the the examples to make the visualizations happen. We’ll walk through the main steps to use the infer object detection which include creating the detector with a model and then loading the image and running the inference on it. ...

January 19, 2019 · 4 min · Carin Meier