1622173500
In this article, let’s look at how you can use TensorFlow Model Maker to create a custom text classification model. Currently, the TF Lite model maker supports image classification, question answering, and text classification models. It uses transfer learning for shortening the amount of time required to build TF Lite models.
#text-classification #tflite #model-makers #heartbeat
1622173500
In this article, let’s look at how you can use TensorFlow Model Maker to create a custom text classification model. Currently, the TF Lite model maker supports image classification, question answering, and text classification models. It uses transfer learning for shortening the amount of time required to build TF Lite models.
#text-classification #tflite #model-makers #heartbeat
1616514360
TensorFlow is one of the greatest gifts to the machine learning community by Google. An end-to-end open-source framework for machine learning with a comprehensive ecosystem of tools, libraries and community resources, TensorFlow lets researchers push the state-of-the-art in ML and developers can easily build and deploy ML-powered applications. Ever since its release to the public back in November 2015, TensorFlow has grown to become one of the most popular deep learning frameworks. This month, TensorFlow turned five, and in this article, we take a look at its popular libraries.
#model-makers #tensorflow #heartbeat #image-classification #tflite
1650870267
In the previous chapters you've learnt how to select individual elements on a web page. But there are many occasions where you need to access a child, parent or ancestor element. See the JavaScript DOM nodes chapter to understand the logical relationships between the nodes in a DOM tree.
DOM node provides several properties and methods that allow you to navigate or traverse through the tree structure of the DOM and make changes very easily. In the following section we will learn how to navigate up, down, and sideways in the DOM tree using JavaScript.
You can use the firstChild
and lastChild
properties of the DOM node to access the first and last direct child node of a node, respectively. If the node doesn't have any child element, it returns null
.
<div id="main">
<h1 id="title">My Heading</h1>
<p id="hint"><span>This is some text.</span></p>
</div>
<script>
var main = document.getElementById("main");
console.log(main.firstChild.nodeName); // Prints: #text
var hint = document.getElementById("hint");
console.log(hint.firstChild.nodeName); // Prints: SPAN
</script>
Note: The
nodeName
is a read-only property that returns the name of the current node as a string. For example, it returns the tag name for element node,#text
for text node,#comment
for comment node,#document
for document node, and so on.
If you notice the above example, the nodeName
of the first-child node of the main DIV element returns #text instead of H1. Because, whitespace such as spaces, tabs, newlines, etc. are valid characters and they form #text nodes and become a part of the DOM tree. Therefore, since the <div>
tag contains a newline before the <h1>
tag, so it will create a #text node.
To avoid the issue with firstChild
and lastChild
returning #text or #comment nodes, you could alternatively use the firstElementChild
and lastElementChild
properties to return only the first and last element node, respectively. But, it will not work in IE 9 and earlier.
<div id="main">
<h1 id="title">My Heading</h1>
<p id="hint"><span>This is some text.</span></p>
</div>
<script>
var main = document.getElementById("main");
alert(main.firstElementChild.nodeName); // Outputs: H1
main.firstElementChild.style.color = "red";
var hint = document.getElementById("hint");
alert(hint.firstElementChild.nodeName); // Outputs: SPAN
hint.firstElementChild.style.color = "blue";
</script>
Similarly, you can use the childNodes
property to access all child nodes of a given element, where the first child node is assigned index 0. Here's an example:
<div id="main">
<h1 id="title">My Heading</h1>
<p id="hint"><span>This is some text.</span></p>
</div>
<script>
var main = document.getElementById("main");
// First check that the element has child nodes
if(main.hasChildNodes()) {
var nodes = main.childNodes;
// Loop through node list and display node name
for(var i = 0; i < nodes.length; i++) {
alert(nodes[i].nodeName);
}
}
</script>
The childNodes
returns all child nodes, including non-element nodes like text and comment nodes. To get a collection of only elements, use children
property instead.
<div id="main">
<h1 id="title">My Heading</h1>
<p id="hint"><span>This is some text.</span></p>
</div>
<script>
var main = document.getElementById("main");
// First check that the element has child nodes
if(main.hasChildNodes()) {
var nodes = main.children;
// Loop through node list and display node name
for(var i = 0; i < nodes.length; i++) {
alert(nodes[i].nodeName);
}
}
</script>
1622878440
A lot of social media platforms have been using AI these days to classify vulgar and offensive posts and automatically take them down. I thought why not try doing something similar; and so, I’ve come up with this end-to-end tutorial that will help you build your own corpus for training a text classification model, and later export and deploy it on an Android app for you to use. All this, absolutely on a custom dataset of your choice.
So, are you excited to build your own text classifier app? If yes, let’s begin the show.
Now, before we begin, let me tell you that we’ll be doing all the model’s hyperparameter configuration and training on Google Colab. To build the Android app, we’ll need to have Android Studio. If you haven’t installed it yet, find it here.
#nlp #machine-learning #android #tensorflow-lite #text-classification
1621931885
TensorFlow Lite has emerged as a popular platform for running machine learning models on the edge. A microcontroller is a tiny low-cost device to perform the specific tasks of embedded systems.
In a workshop held as part of Google I/O, TensorFlow founding member Pete Warden delved deep into the potential use cases of TensorFlow Lite for microcontrollers.
Further, quoting the definition of TinyML from a blog, he said:
“Tiny machine learning is capable of performing on-device sensor data analytics at extremely low power, typically in the mW range and below, and hence enabling a variety of ways-on-use-case and targeting battery operated devices.”
#opinions #how to design tinyml #learn tinyml #machine learning models low cost #machine learning models low power #microcontrollers #tensoflow latest #tensorflow lite microcontrollers #tensorflow tinyml #tinyml applications #tinyml models