Title: ML Days in Tashkent — Day 2: Sprints and Sessions - PyImageSearch

URL Source: https://pyimagesearch.com/2023/12/11/ml-days-in-tashkent-day-2-sprints-and-sessions/

Published Time: 2023-12-11T14:00:00+00:00

Markdown Content:
* * *

**Table of Contents**
---------------------

*   [ML Days in Tashkent — Day 2: Sprints and Sessions](#h2BPTitle)

*   [Kicking Off with a Keynote](#h3Keynote)
*   [Sprints and Sessions: A Showcase of Innovation](#h3Sprints)
*   [Community Focus: Training and Building AI/ML Ecosystems](#h3Focus)
*   [Martin Gorner on Keras: Evolution and Future](#h3Gorner)
*   [Mark McDonald on PaLM API: New Horizons](#h3McDonald)
*   [Build a Chatbot with PaLM API](#h3Build)

*   [Summary](#h2Summary)

*   [Generative AI: The Centerpiece of Innovation](#h3Generative)
*   [Keras 3: A New Era of Flexibility](#h3Keras3)
*   [Community: The Driving Force](#h3Force)
*   [An Invitation to Innovate and Share](#h3Invitation)

* * *

In this tutorial, we will depart from our regular machine learning (ML) blogs and learn how our authors made the most of the Google Machine Learning Community Summit in Tashkent. But again, stick around for a surprise demo at the end. 😉

[![Image 1](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20603%20500'%3E%3C/svg%3E)](https://pyimagesearch.com/wp-content/uploads/2023/12/ML-Days-in-Tashkent-2.png)

This blog is the 2nd of a 3-part series:

1.  [_ML Days in Tashkent — Day 1: City Tour_](https://pyimg.co/g3bha)
2.  [**_ML Days in Tashkent — Day 2: Sprints and Sessions_**](https://pyimg.co/jkhp9) **(this tutorial)**
3.  _ML Days in Tashkent — Day 3: Demos and Workshops_

* * *

[**ML Days in Tashkent — Day 2: Sprints and Sessions**](#TOC-h2BPTitle)
-----------------------------------------------------------------------

> Day 2 of ML Days in Tashkent was a whirlwind of activity, with sprints, sessions, and networking events all happening simultaneously. The recount of past sprints was a great opportunity for participants to showcase their work and projects and get feedback from other attendees. The sessions were packed with interesting talks on a variety of topics, and the networking events were a great way to meet new people and make connections. Overall, Day 2 was a great success, and we are looking forward to seeing what Day 3 brings!

Would you be surprised to know that Google’s PaLM (Pathways Language Model) API was responsible for creating the above text with minimal prompting and just a little bit of context?

Want to get your hands dirty and create something like this on your own? Read on!

* * *

### [**Kicking Off with a Keynote**](#TOC-h3Keynote)

The second day of the Google Machine Learning Community Summit began with an inspiring keynote session by Soonson Kwon, the ML Community Lead at Google. The focus of his presentation was clear and forward-thinking: **Accelerate** AI/ML research and application. This theme set the tone for the rest of the day, highlighting Google’s commitment to pushing the boundaries of what’s possible in the world of Artificial Intelligence (AI) and Machine Learning (ML).

[![Image 2](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20667%20500'%3E%3C/svg%3E)](https://lh7-us.googleusercontent.com/oO3ONLvxzJOu5b82-pL6X9dLz3hOccdpk_zKbJywmO3fnMQwxGoCllHhQxgbBcvVvGI7x0iv6vuJyhKquTBBMvbPrjR1mtH8JQXLvgRv-s4rAiwfYaFBwwtpJnMv1v22hHxrAIro95wZEbeNSD_dnKk)

* * *

### [**Sprints and Sessions: A Showcase of Innovation**](#TOC-h3Sprints)

The day was packed with a series of recounts of sprints and sessions, each of which was designed to demonstrate the latest advancements and applications in AI/ML.

*   **MakerSuite Sprint:** This session involved participants building ML applications using the PaLM API. It was a hands-on experience that showcased the practical application of cutting-edge research in real-world scenarios.
*   **Keras Sprint:** A highlight for us (Aritra Roy and Ritwik Raha) as we participated and contributed to this segment. We focused on creating an accessible guide for beginners to start with Keras and TensorFlow, titled “[The Keras Philosophy](https://youtu.be/mU4Z9bs0Bxc?list=PLT3sJRyVaw-nP-t9F0yJe3wwklbzLNoGP).” Our involvement with the Keras team also contributed to the development of Keras Core. For those interested in a deeper understanding of Keras Core, we’ve detailed our insights in a separate [blog post](https://pyimagesearch.com/2023/07/24/what-is-keras-core/).
*   **Kaggle Learn Sprint:** This was another engaging session aimed at beginners, providing a foundational understanding of Machine Learning in the interactive environment of Kaggle.
*   **Mediapipe / TF Recommenders Sprint:** An eye-opening showcase that demonstrated the integration of ML in web technologies with Mediapipe and the practical applications of TensorFlow Recommendation systems in various industries.

[![Image 3](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20667%20500'%3E%3C/svg%3E)](https://lh7-us.googleusercontent.com/WErHUxHQacsBGbVG7XK2ARCRlCPP1SWeIlSCkdV27s-7-9Gjkm_UDZzdfAxoT3s2eLVq-eTroJNOMH8GSokk3LK0bor_uxRz3zXTOyVnv9M5MOrhZa7-ZEBbGl5J8ToNvp3HlrzE3ihXfv1DxzOS6gM)

* * *

### [**Community Focus: Training and Building AI/ML Ecosystems**](#TOC-h3Focus)

The community’s focus was equally impressive, emphasizing training AI/ML developers and building robust communities.

*   **Keras Community Days:** These events, held worldwide, highlighted the power and utility of Keras as a framework. The emphasis was on its philosophy, “Deep Learning for Humans,” making advanced concepts accessible to a broader audience.
*   **ML Olympiad:** An innovative campaign involving associated Kaggle Community Competitions. The first round, conducted in 2022, was a success, and now the second round is being launched. It aims to provide ML training opportunities by leveraging Kaggle’s robust platform.
*   **ML Study Jams:** These were intensive 4-week learning opportunities, using Kaggle Courses to deepen the understanding of ML among participants.
*   **ML Paper Reading and Writing Clubs:** To foster a culture of continuous learning and research, these clubs were introduced in various ML communities. They focus on promoting ML research, assisting in paper writing, and understanding the mathematical underpinnings of Machine Learning.

[![Image 4](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20375%20500'%3E%3C/svg%3E)](https://lh7-us.googleusercontent.com/jkclAA9hJHItgrjrmjDxZAhAvcxI6F_Jx5NUAnNSpNhr9xNJOK05P5FWTbvs-BFONi5sz3QxjHOXGZ9fBobfi8kBrUEqK7HTFTpjhovg9kSp12iLYLmCLtnmSQYb5otdjNYksGzIddcNfrXfzwV6rQw)

It was not just about the advancements in technology but also about building a community that is well-equipped to harness these advancements.

As we moved through the sessions, we were reminded of the power of collaboration, community, and the relentless pursuit of knowledge in the field of AI and ML.

* * *

### [**Martin Gorner on Keras: Evolution and Future**](#TOC-h3Gorner)

[![Image 5](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20700%20315'%3E%3C/svg%3E)](https://lh7-us.googleusercontent.com/Km174nNRjJrGzRcAGSZqh-9K27zdIjrD1GW6GoQP7YnyFwFbycWjgohXsc7_qxEALu2Tz-4giolFhROldTxSbkMzb5F1rvmAHwFwkxQrU7SfemvDcT19DxuxJVcLMTgzE9_-f8iO73cZViWzEWblJo0)

Martin Gorner’s session was a deep dive into the history and evolution of Keras, one of the most popular frameworks in the Machine Learning community. His talk highlighted:

*   **History and Roots of Keras:** Gorner took us through the journey of Keras, from its inception to its current state. He emphasized how Keras has always been about simplifying the complexity of neural networks, making them more accessible to developers with varying levels of expertise.
*   **Progressive Disclosure of Complexity:** A key principle of Keras is its design philosophy, which focuses on ‘progressive disclosure of complexity.’ This approach allows beginners to easily start with high-level functionalities and gradually delve into the more complex aspects as their understanding grows.
*   **Keras 3: Multi-Backend Support:** An exciting update is the upcoming Keras 3, which will support multiple backends. Users will have the flexibility to choose between Python, TensorFlow, and JAX for their workflows, broadening the scope of applications and ease of use.
*   **Demonstrations and Resources:** For those interested in seeing these updates in action, Gorner pointed to a demo and also referred to a previous blog post for more detailed insights.

* * *

### [**Mark McDonald on PaLM API: New Horizons**](#TOC-h3McDonald)

Mark McDonald’s presentation was centered around updates on the PaLM API, highlighting key developments and future directions.

[![Image 6](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20667%20500'%3E%3C/svg%3E)](https://lh7-us.googleusercontent.com/i8RMrTNUdlbz9OU7Skm8HFjLlccK_pZjR5GK0xWhYssTFp_En3JcFqIvd8ZG0Zp9q6xaiutCzKfxBpnKYtEg3nlwvBtO5Vh1iSx-RhNGDffq2yg5W8Bjrlgqq7j6NpibJFP9k_hCbpw-mG8OwKzaXOw)

*   **Updates on PaLM API:** McDonald shared the latest advancements in the PaLM API, emphasizing its growing capabilities and the broadening scope of applications it can support.
*   **Gemini — The Next Big Thing:** The audience was given a sneak peek into ‘Gemini,’ a forthcoming feature that promises to add new dimensions to the PaLM API’s capabilities.
*   **Med PaLM — A Focused Initiative:** A major area of focus now is Med PaLM, which aims to tailor the PaLM API for medical applications. This initiative is a step toward leveraging AI in healthcare, offering the potential for significant advancements in medical research and practice.
*   **Chatbots and Beyond:** The session also covered how the PaLM API is making it easier and more efficient to create chatbots. These advancements are not just about building chatbots but also about enhancing their quality, context-awareness, and responsiveness.

* * *

### [**Build a Chatbot with PaLM API**](#TOC-h3Build)

Finally, as promised, here is the demo of how to build your own chatbot with PaLM API.

Let’s explore how to interact with Google’s Generative AI for conversational purposes using their Python library in this brief piece of code. We will be using the PaLM API to create a chatbot. Please note that the PaLM API is still unavailable in some countries, and this code might not be reproducible yet.

!pip install -U google-generativeai
import google.generativeai as palm
palm.configure(api\_key='PALM\_API\_KEY')

On **Line 1**, we start by upgrading and installing the `google-generativeai` package. This package presumably provides the tools and functions to access Google’s generative AI models, specifically for conversation generation.

On **Line 2**, the `google.generativeai` module is imported and aliased as `palm`. This module provides functions to interact with Google’s generative AI.

On **Line 3**, we configure the PaLM (Pathways Language Model) API with an API key. This step is crucial for authenticating and gaining access to the API. You can get your own API [here](https://makersuite.google.com/app/apikey).

\# Create a new conversation
response = palm.chat(messages='What is the meaning of life?')

# Last contains the model's response:
response.last

On **Lines 5-8**, we create a new conversation using `palm.chat`, passing a message asking, “What is the meaning of life?” The response from the model is stored in the `response` variable. The `last` attribute of `response` contains the model’s latest response to the conversation.

The meaning of life is a question that has been asked by philosophers and theologians for centuries. There is no one answer that will satisfy everyone, but some possible answers include:

\* To find happiness and fulfillment.
\* To make a difference in the world.
\* To learn and grow as a person.
\* To connect with others and build relationships.
\* To experience the beauty of the world.
\* To leave a legacy behind.

Ultimately, the meaning of life is up to each individual to decide. It is a journey of self-discovery and personal growth. There is no right or wrong answer, and the meaning of life may change over time. The important thing is to live a life that is meaningful to you.

Here are some quotes about the meaning of life:

\* "The purpose of our lives is to be happy." - Dalai Lama
\* "The unexamined life is not worth living." - Socrates
\* "The meaning of life is to find your gift. The purpose of life is to give it away." - Pablo Picasso
\* "Live as if you were to die tomorrow. Learn as if you were to live forever." - Mahatma Gandhi
\* "The greatest use of life is to spend it for something that will outlast it." - William James
\* "The purpose of our lives is to be happy." - Dalai Lama

I hope this helps!

We can see that it is not entirely wrong!

\# Add to the existing conversation by sending a reply
response = response.reply("Are you sure?")
# See the model's latest response in the \`last\` field:
response.last

On **Lines 10-12**, we extend the conversation by sending a reply, “Are you sure?” This is done using the `reply` method on the `response` object. The model’s latest response to this addition can be accessed again through the `last` attribute.

I am not sure. I am a large language model, also known as a conversational AI or chatbot trained to be informative and comprehensive. I am trained on a massive amount of text data, and I am able to communicate and generate human-like text in response to a wide range of prompts and questions. For example, I can provide summaries of factual topics or create stories.

However, I am not able to know for sure what the meaning of life is. This is a question that has been pondered by philosophers and theologians for centuries, and there is no one answer that will satisfy everyone. Ultimately, the meaning of life is up to each individual to decide.

I hope this helps!

response.messages

On **Line 13**, `response.messages` would provide the entire conversation history, including both the user’s messages and the model’s responses.

\[{'author': '0', 'content': 'What is the meaning of life?'},
 {'author': '1',
  'content': 'The meaning of life is a question that has been asked by philosophers and theologians for centuries. There is no one answer that will satisfy everyone, but some possible answers include:\\n\\n\* To find happiness and fulfillment.\\n\* To make a difference in the world.\\n\* To learn and grow as a person.\\n\* To connect with others and build relationships.\\n\* To experience the beauty of the world.\\n\* To leave a legacy behind.\\n\\nUltimately, the meaning of life is up to each individual to decide. It is a journey of self-discovery and personal growth. There is no right or wrong answer, and the meaning of life may change over time. The important thing is to live a life that is meaningful to you.\\n\\nHere are some quotes about the meaning of life:\\n\\n\* "The purpose of our lives is to be happy." - Dalai Lama\\n\* "The unexamined life is not worth living." - Socrates\\n\* "The meaning of life is to find your gift. The purpose of life is to give it away." - Pablo Picasso\\n\* "Live as if you were to die tomorrow. Learn as if you were to live forever." - Mahatma Gandhi\\n\* "The greatest use of life is to spend it for something that will outlast it." - William James\\n\* "The purpose of our lives is to be happy." - Dalai Lama\\n\\nI hope this helps!'},
 {'author': '0', 'content': 'Are you sure?'},
 {'author': '1',
  'content': 'I am not sure. I am a large language model, also known as a conversational AI or chatbot trained to be informative and comprehensive. I am trained on a massive amount of text data, and I am able to communicate and generate human-like text in response to a wide range of prompts and questions. For example, I can provide summaries of factual topics or create stories.\\n\\nHowever, I am not able to know for sure what the meaning of life is. This is a question that has been pondered by philosophers and theologians for centuries, and there is no one answer that will satisfy everyone. Ultimately, the meaning of life is up to each individual to decide.\\n\\nI hope this helps!'}\]

\# See alternate possible model responses
response.candidates

By using `response.candidates` on **Line 15**, we can show alternative responses that the model could have given, offering a glimpse into different ways the AI might have continued the conversation.

\[{'author': '1',
  'content': 'I am not sure. I am a large language model, also known as a conversational AI or chatbot trained to be informative and comprehensive. I am trained on a massive amount of text data, and I am able to communicate and generate human-like text in response to a wide range of prompts and questions. For example, I can provide summaries of factual topics or create stories.\\n\\nHowever, I am not able to know for sure what the meaning of life is. This is a question that has been pondered by philosophers and theologians for centuries, and there is no one answer that will satisfy everyone. Ultimately, the meaning of life is up to each individual to decide.\\n\\nI hope this helps!'}\]

reply = palm.chat(context="Be a personal tutor who breaks down complex concepts to the intellect level of a person whose age is 10 years",
                  messages="Explain deep learning to me")
print(reply.last)

Finally, on **Lines 16-18**, we demonstrate a different use case by creating a new conversation with a specific context: “Be a personal tutor who breaks down complex concepts to the intellect level of a person whose age is 10 years”. The message sent is “Explain deep learning to me”, and the model’s response is printed out using `print(reply.last)`.

Deep learning is a type of machine learning that uses artificial neural networks to learn from data. Neural networks are inspired by the human brain, and they can be used to solve complex problems that traditional machine learning algorithms cannot.

Deep learning has been used to achieve state-of-the-art results in a wide range of fields, including computer vision, natural language processing, and speech recognition. It is also being used to develop new technologies, such as self-driving cars and virtual assistants.

Deep learning is a powerful tool, but it is also complex and difficult to understand. In this article, I will explain deep learning in a way that is easy to understand, even for a 10-year-old.

Let's start with a simple example. Imagine that you want to teach a computer to recognize cats. You could start by showing the computer a bunch of pictures of cats, and then ask it to identify the cats in new pictures. However, this would not be very effective. The computer would only be able to recognize cats that look like the cats that it was trained on.

A better way to teach the computer would be to show it a bunch of pictures of cats, dogs, horses, and other animals. The computer would then learn to identify the features that are common to all cats, such as whiskers, fur, and pointy ears. Once the computer has learned these features, it will be able to recognize cats in new pictures, even if the cats look different from the cats that it was trained on.

This is the basic idea behind deep learning. Deep learning algorithms are trained on large amounts of data, and they learn to identify patterns in the data. Once they have learned these patterns, they can be used to make predictions about new data.

Deep learning is a powerful tool, but it is also complex and difficult to understand. In this article, I have tried to explain deep learning in a way that is easy to understand, even for a 10-year-old. I hope that this article has helped you to understand the basics of deep learning.

* * *

[**Summary**](#TOC-h2Summary)
-----------------------------

The Google Machine Learning Community Summit Day 2 was a remarkable event that showcased not just technological advancements but also the spirit of community in the AI/ML ecosystem. Here’s a summary of the key highlights.

* * *

### [**Generative AI: The Centerpiece of Innovation**](#TOC-h3Generative)

One of the standout themes of the summit was the advances in generative AI, particularly showcased by Google. This area of AI, which focuses on creating content, whether it be text, images, or even code, has seen phenomenal growth and innovation. Google’s contributions and advancements in this field were a major highlight, offering a glimpse into the future of AI-driven content creation.

* * *

### [**Keras 3: A New Era of Flexibility**](#TOC-h3Keras3)

A significant announcement was the upcoming Keras 3, which promises to revolutionize how developers interact with machine learning frameworks. With the ability to choose between frameworks (e.g., PyTorch, JAX, and TensorFlow), Keras 3 will offer unprecedented flexibility. This feature is particularly exciting as it allows users to leverage the best aspects of each framework, tailoring their workflow to their specific needs and preferences.

* * *

### [**Community: The Driving Force**](#TOC-h3Force)

The summit underscored a crucial aspect of the AI/ML world: the community’s role. It was evident that the community is not just a beneficiary of technological advancements but also a significant contributor. From spearheading developments to applying new technologies in creative ways, the community’s involvement is vital. The projects and innovations presented at the summit were a testament to the collaborative spirit that drives the field forward.

* * *

### [**An Invitation to Innovate and Share**](#TOC-h3Invitation)

In keeping with the community spirit, we extend an invitation to everyone engaged in this field: take the code and concepts presented at the summit, experiment with them, and create something unique. Whether it’s building your own chatbots or applying Keras 3 in novel ways, the possibilities are endless. We encourage you to share your creations and experiences with us on Twitter at @pyimagesearch. Let’s continue to learn from each other and push the boundaries of what’s possible in AI and ML.

* * *

![Image 7](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20410%20567'%3E%3C/svg%3E)

#### Join the PyImageSearch Newsletter and Grab My FREE 17-page Resource Guide PDF

Enter your email address below to **join the PyImageSearch Newsletter** and **download my FREE 17-page Resource Guide PDF** on Computer Vision, OpenCV, and Deep Learning.