This file contains 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 logging | |
# w/o below lines with reloading `logging` no log file will be saved in Jupyter/IPython env, see here: https://stackoverflow.com/questions/31169540/python-logging-not-saving-to-file | |
from imp import reload | |
reload(logging) | |
from contextlib import redirect_stdout, redirect_stderr | |
LOG_FILE_NAME = 'log.txt' | |
# from https://stackoverflow.com/a/36296215 | |
class StreamToLogger(object): |
This file contains 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 PIL | |
from PIL import Image | |
import os | |
from scipy.io import loadmat, savemat | |
from preprocess_img import Preprocess | |
from load_data import * | |
from face_decoder import Face3D |