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 numpy as np | |
| import tensorflow as tf | |
| import tensorflow.keras.layers as L | |
| class SampledSoftmaxLoss: | |
| """ | |
| Class that instantiates a sampled softmax loss | |
| ... |
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 numpy as np | |
| import os | |
| import zconfig | |
| import utils | |
| class DenoisingAutoencoder(object): | |
| """ Implementation of Denoising Autoencoders using TensorFlow. |
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
| #! /bin/bash | |
| # build the environment | |
| mkdir tessenv; cd tessenv | |
| TROOT=`pwd` | |
| mkdir $TROOT/stockfonts; mkdir $TROOT/build; mkdir $TROOT/build/eng | |
| echo "Environment built" | |
| # Get the stock english fonts from Google (old, but they work) | |
| cd $TROOT/stockfonts | |
| GET http://tesseract-ocr.googlecode.com/files/boxtiff-2.01.eng.tar.gz > boxtiff-2.01.eng.tar.gz |
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
| #!/usr/bin/env python |