Skip to content

Instantly share code, notes, and snippets.

View atbe's full-sized avatar
:shipit:
Shipping

Ibrahim Ahmed atbe

:shipit:
Shipping
View GitHub Profile
@atbe
atbe / index.ts
Last active July 1, 2017 18:21
Firebase Functions Simple getUser Route
import * as functions from "firebase-functions";
admin.initializeApp(functions.config().firebase);
// ...
exports.getUser = functions.https.onRequest((req, res) => {
// ...
// note, req.query.uid might be null! If we use a router, the function will never get matched unless the route is matched correctly
const uid = req.query.uid;
// ...
});
@atbe
atbe / index.ts
Last active July 1, 2017 19:47
Firebase Functions Complex getUser Route
import * as express from "express";
import * as admin from "firebase-admin";
import * as functions from "firebase-functions";
admin.initializeApp(functions.config().firebase);
const app = express();
// https://expressjs.com/en/advanced/best-practice-security.html#at-a-minimum-disable-x-powered-by-header
app.disable("x-powered-by");
@atbe
atbe / index.ts
Last active July 1, 2017 19:47
Firebase Functions /api/users Sub-Route
import * as express from "express";
// This is the router which will be imported in our
// api hub (the index.ts which will be sent to Firebase Functions).
export let userRouter = express.Router();
// Now that we have a router, we can define routes which this router
// will handle. Please look into the Express documentation for more info.
userRouter.get("/:uid", async function getUser(req: express.Request, res: express.Response) {
// ...
@atbe
atbe / index.ts
Created July 1, 2017 18:18
Firebase Functions - Attaching the /users Router
import * as express from "express";
import * as admin from "firebase-admin";
import * as functions from "firebase-functions";
import * as usersApi from "./api/users";
admin.initializeApp(functions.config().firebase);
const app = express();
// https://expressjs.com/en/advanced/best-practice-security.html#at-a-minimum-disable-x-powered-by-header
app.disable("x-powered-by");
In this chapter we'll write a computer program implementing a neural network that learns to recognize
handwritten digits. The program is just 74 lines long, and uses no special neural network libraries. But
this short program can recognize digits with an accuracy over 96 percent, without human intervention.
Furthermore, in later chapters we'll develop ideas which can improve accuracy to over 99 percent. In fact,
the best commercial neural networks are now so good that they are used by banks to process cheques, and by
post offices to recognize addresses.
In this chapter we'll write a computer program implementing a neural network that learns to recognize
handwritten digits. The program is just 74 lines long, and uses no special neural network libraries. But
this short program can recognize digits with an accuracy over 96 percent, without human intervention.
Furthermore, in later chapters we'll develop ideas which can improve accuracy to over 99 percent. In fact,
the best commercial neural networks are now so good that they are used by banks to process cheques, and by
post offices to recognize addresses.
In this chapter we'll write a computer program implementing a neural network that learns to recognize
handwritten digits. The program is just 74 lines long, and uses no special neural network libraries. But
this short program can recognize digits with an accuracy over 96 percent, without human intervention.
Furthermore, in later chapters we'll develop ideas which can improve accuracy to over 99 percent. In fact,
the best commercial neural networks are now so good that they are used by banks to process cheques, and by
post offices to recognize addresses.
In this chapter we'll write a computer program implementing a neural network that learns to recognize
handwritten digits. The program is just 74 lines long, and uses no special neural network libraries. But
this short program can recognize digits with an accuracy over 96 percent, without human intervention.
Furthermore, in later chapters we'll develop ideas which can improve accuracy to over 99 percent. In fact,
the best commercial neural networks are now so good that they are used by banks to process cheques, and by
post offices to recognize addresses.
In this chapter we'll write a computer program implementing a neural network that learns to recognize
handwritten digits. The program is just 74 lines long, and uses no special neural network libraries. But
this short program can recognize digits with an accuracy over 96 percent, without human intervention.
Furthermore, in later chapters we'll develop ideas which can improve accuracy to over 99 percent. In fact,
the best commercial neural networks are now so good that they are used by banks to process cheques, and by
post offices to recognize addresses.
"""
Module of SLIM models of LSTM RNNs. Uses the layer LSTM in Keras2.1 to generate
inherited layers of reduced gated and cell parameters.
LSTM1
LSTM2
LSTM3
LSTM4
LSTM5
LSTM6
There are more parameter-reduced models as appeared in arXiv.org: