Tensor Standard NumPy like indexing Joining Tensor Multiplying Tensors 👉🏼 In-place operations Bridge with NumPy NumPy array to Tensor AutoGrad Training a NN Forward Propagation Backward Propagation Adjusts the parameters proportionate to the error Reference: Optimize using gradient descent 3Blue1Brown Single Training Step in PyTorch Differentiation in Autograd Tensor everything is tensor computation happens in compiled c++ code over 300 mathematical operations default float32 seed is used to generate replicable data ...
Stable Diffusion, Staying Put, Being Successful and Her Majesty
Can we believe 👀 anything we see online anymore? Trump picking up Coconuts in Thailand - Image generated artificially Hello 👋🏽 An algorithm generated the picture you see above. It took me 10 minutes to set up and I can generate anything you can think of in some form. Imagine the information you will see going forward - how will you understand whether what you see is real or not? ...
The YAML syntax - get over the config files
A quick reference to basic YAML syntax Lists All members of a list are lines beginning at the same indentation level starting with a “- " (a dash and a space) # a list of models - logreg - randomforest - xgboost - mlp Dictionary key: value (colon followed by a space) rohan: name: Rohan Singh job: Data Scientist III skill: Elite Complicated Data Structures # a list of dictionaries - rohan: name: Rohan Singh job: Geneticist skill: Beginner - emmanuelle: name: Emmanuelle Charpentier job: Professor and Researcher skill: Elite Flow Connections It can be used to represent abbreviated data structures ...
Slow Productivity
✅ 🐢 ❌ 🐇 Slowing driving into San Francisco In the last few weeks, I have been involved in a lot of things at work and after analyzing at the end of the month I realized I did not do any meaningful work during this time. This made me recall an article, I read earlier this year, by Cal Newport on Slow Productivity. It is definitely a game-changer. Building on the idea of System 1 and System 2 in the book, Thinking Fast and Slow by Daniel Kahneman, it could be said that short-circuiting our brain to achieve our assigned task would not be at par with the quality of work that was well thought of using our logical brain a.k.a. System 2. Given a high volume of work, our brain does exactly that - it starts finding shortcuts. Quality work especially in science and technology requires you to analyze and understand the problem deeply which requires mental effort. Therefore, the volume of work assigned to you should be limited as human beings are adapted to make good strategies to achieve a longer-term goal not so much for short-term goals. ...
Old Paradigms
Old ways 🆚 New Ways Hello 👋🏽 Here are two things that I pondered 💭 over the weekend. What do you want in life? A snippet from the Collaboration Fund newsletter blog by Morgan Housel (Author of the Psychology of Money) - … Fifty-four years ago… Sunday Times offered £5,000 to whoever could sail solo nonstop around the world … The two men, Donald Crowhurst and Bernard Moitessier, are astounding examples of how the quality of your life is shaped by whom you want to impress. Their stories are extreme, but what they dealt with was just a magnified version of what ordinary people face all the time, and likely something you’re facing right now… ...
Organize your computer 🗄
Target Users If you use python and like having an organized computer - this article is for you 👋🏽 The data 💿 in your mac 💻 is spread around into downloads, desktop, etc.There is a python 🐍 tool organize-tool which can help you declutter and organize all your data with a simple YAML configuration. The best part is that - you can also have python code in actions. Thanks 😄 to tfeldmann for this awesome 😎 tool ...
Build NLP Apps, quickly! ⏩
Created an app to to zero shot classification using huggingface 🤗 library. In this app, I created a simple streamlit app to try out the zero-shot-classification pipeline provided by HuggingFace. Please take a look at the code here https://github.com/ygivenx/zero-shot-classifier-app Or try it yourself by running Make sure your docker memory is set to over 6GB. docker pull ygivenx/zero-shot-app docker run -it -p 8501:8501 ygivenx/zero-shot-app
List all folders over a GB in terminal
Several times, you realize that you need to see folder with a lot of data in it. I have used this command several times and find it really useful to see all the large folders lying around in the current dir.
So, you got a new Mac 🍺
Update Feb 2024 with Mac OS Sonoma on M3 Pro. I, recently, changed jobs and got a brand new mac. Now, I am a data scientist and I wanted my new mac to be familiar. In this post, I wanted to show what I installed on my new mac to make it somewhat efficient from the get-go. I Hope, this post will help you get started, quickly :) ...