Imported from https://github.com/paarthneekhara/byteNet-tensorflow