This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# LSTM for sequence classification in the IMDB dataset | |
import numpy | |
from keras.datasets import imdb | |
from keras.models import Sequential | |
from keras.layers import Dense | |
from keras.layers import LSTM | |
from keras.layers.embeddings import Embedding | |
from keras.preprocessing import sequence | |
# fix random seed for reproducibility | |
numpy.random.seed(7) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.models import Sequential | |
from keras.layers import Dense, Activation | |
from sklearn.datasets import load_digits | |
# Loading digits | |
x, y = load_digits(n_class=10, return_X_y=True) | |
# Convert to categorical | |
yhot = keras.utils.to_categorical(y, num_classes=10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO | |
import os | |
import time | |
import requests | |
import subprocess | |
NEXT_BTN = 13 | |
PLAY_PAUSE_BTN = 19 | |
VOL_UP_BTN = 5 | |
VOL_DOWN_BTN = 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a note on how to cross compile opencv for pretty much any ARM device(HardFP supported in this case) and deploy. Native | |
compiling in ARM devices can be painfully slow and they seem to hang often during build(mine got stuck at 43%). So if you happen | |
to have a desktop/laptop/server running ubuntu or similar linux distro, u can build opencv in fractionth of the time taken for | |
native compiling without any issues. | |
Building opencv3 with TBB and NEON and VFP support can boost opencv performance. Thanks to Adrian at pyimagesearch for pointing that out. | |
Both my PC and target machine aka orange pi zero are running ubuntu 16.04 with python2.7 and python 3.5. | |
1.Run the following commands in both machines to install the necessary libraries etc.(mine worked with them,so they should be enough | |
hopefully) | |
sudo apt-get update && sudo apt-get upgrade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
# Import MNIST data | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True) | |
# Parameters | |
learning_rate = 0.01 | |
training_epochs = 10 | |
batch_size = 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
# Import MNIST data | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True) | |
# Parameters | |
learning_rate = 0.01 | |
training_epochs = 10 | |
batch_size = 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
# Import MNIST data | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True) | |
# Parameters | |
learning_rate = 0.01 | |
training_epochs = 10 | |
batch_size = 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Actual Code : https://github.com/aymericdamien/TensorFlow-Examples/blob/master/notebooks/3_NeuralNetworks/convolutional_network.ipynb | |
# Modified By: Manash | |
from __future__ import division, print_function, absolute_import | |
# Import MNIST data | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets("/tmp/data/", one_hot=False) | |
import tensorflow as tf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<style> | |
#exampleIframe { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>D3plus 1.0 Example</title> | |
<!-- Adding D3 and D3plus Libraries --> | |
<script src="https://d3plus.org/js/d3.js"></script> |