Reader small image

You're reading from  Hands-On Python Deep Learning for the Web

Product typeBook
Published inMay 2020
Reading LevelBeginner
PublisherPackt
ISBN-139781789956085
Edition1st Edition
Languages
Right arrow
Authors (2):
Anubhav Singh
Anubhav Singh
author image
Anubhav Singh

Anubhav Singh, a web developer since before Bootstrap was launched, is an explorer of technologies, often pulling off crazy combinations of uncommon tech. An international rank holder in the Cyber Olympiad, he started off by developing his own social network and search engine as his first projects at the age of 15, which stood among the top 500 websites of India during their operational years. He's continuously developing software for the community in domains with roads less walked on. You can often catch him guiding students on how to approach ML or the web, or both together. He's also the founder of The Code Foundation, an AI-focused start-up. Anubhav is a Venkat Panchapakesan Memorial Scholarship awardee and an Intel Software Innovator.
Read more about Anubhav Singh

Sayak Paul
Sayak Paul
author image
Sayak Paul

Sayak Paul is currently with PyImageSearch, where he applies deep learning to solve real-world problems in computer vision and bring solutions to edge devices. He is responsible for providing Q&A support to PyImageSearch readers. His areas of interest include computer vision, generative modeling, and more. Previously at DataCamp, Sayak developed projects and practice pools. Prior to DataCamp, Sayak worked at TCS Research and Innovation (TRDDC) on data privacy. There, he was a part of TCS's critically acclaimed GDPR solution called Crystal Ball. Outside of work, Sayak loves to write technical articles and speak at developer meetups and conferences.
Read more about Sayak Paul

View More author details
Right arrow

An LSTM-based model for authenticating users

We will break down this section into two major sub-sections:

  1. Building the security check model
  2. Hosting the model as an API

Let's begin with the first section.

Building a model for an authentication validity check

To authenticate the user based on their login activity, we will need an API that checks the requests. We can build this model using the following steps:

  1. Let's begin by developing the authentication model that determines whether a user is not acting in a regular manner. We begin by importing the necessary modules in a Jupyter notebook running Python 3.6+, as shown:
import sys
import os
import json
import pandas
import numpy
from keras.models import Sequential
from...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Python Deep Learning for the Web
Published in: May 2020Publisher: PacktISBN-13: 9781789956085

Authors (2)

author image
Anubhav Singh

Anubhav Singh, a web developer since before Bootstrap was launched, is an explorer of technologies, often pulling off crazy combinations of uncommon tech. An international rank holder in the Cyber Olympiad, he started off by developing his own social network and search engine as his first projects at the age of 15, which stood among the top 500 websites of India during their operational years. He's continuously developing software for the community in domains with roads less walked on. You can often catch him guiding students on how to approach ML or the web, or both together. He's also the founder of The Code Foundation, an AI-focused start-up. Anubhav is a Venkat Panchapakesan Memorial Scholarship awardee and an Intel Software Innovator.
Read more about Anubhav Singh

author image
Sayak Paul

Sayak Paul is currently with PyImageSearch, where he applies deep learning to solve real-world problems in computer vision and bring solutions to edge devices. He is responsible for providing Q&A support to PyImageSearch readers. His areas of interest include computer vision, generative modeling, and more. Previously at DataCamp, Sayak developed projects and practice pools. Prior to DataCamp, Sayak worked at TCS Research and Innovation (TRDDC) on data privacy. There, he was a part of TCS's critically acclaimed GDPR solution called Crystal Ball. Outside of work, Sayak loves to write technical articles and speak at developer meetups and conferences.
Read more about Sayak Paul