You need to have Xcode installed to proceed.
xcode-select --install
sudo xcodebuild -license accept
You need to have Xcode installed to proceed.
xcode-select --install
sudo xcodebuild -license accept
import argparse | |
import psutil | |
import tensorflow as tf | |
from typing import Dict, Any, Callable, Tuple | |
## Data Input Function | |
def data_input_fn(data_param, | |
batch_size:int=None, | |
shuffle=False) -> Callable[[], Tuple]: | |
"""Return the input function to get the test data. |
from: | |
http://chase-seibert.github.io/blog/2014/01/12/python-unicode-console-output.html | |
Print to the console in Python without UnicodeEncodeErrors 12 Jan 2014 | |
I can't believe I just found out about this! If you use Python with unicode data, such as Django database records, you may have seen cases where you print a value to the console, and if you hit a record with an extended (non-ascii) character, your program crashes with the following: | |
Traceback (most recent call last): | |
File "foobar.py", line 792, in <module> | |
print value | |
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 20: ordinal not in range(128) |
import numpy as np | |
import tensorflow as tf | |
__author__ = "Sangwoong Yoon" | |
def np_to_tfrecords(X, Y, file_path_prefix, verbose=True): | |
""" | |
Converts a Numpy array (or two Numpy arrays) into a tfrecord file. | |
For supervised learning, feed training inputs to X and training labels to Y. | |
For unsupervised learning, only feed training inputs to X, and feed None to Y. |
By Adam Anderson
Aggregated links to tutorials with some summaries. Like all of my Gist notes, this document is mostly so I can keep track of useful resources.
#!/usr/bin/env python3 | |
""" | |
License: MIT License | |
Copyright (c) 2023 Miel Donkers | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
By Adam Anderson
These notes are mostly just summaries of the provided references. The purpose of this document is to centralize the resources I found useful so they would be easy to find. Most definitions and explanations are paraphrased or quoted directly from the sources.
"""Simple example on how to log scalars and images to tensorboard without tensor ops. | |
License: BSD License 2.0 | |
""" | |
__author__ = "Michael Gygli" | |
import tensorflow as tf | |
from StringIO import StringIO | |
import matplotlib.pyplot as plt | |
import numpy as np |
% | |
% Send comments to [email protected], or @mcnees on Twitter. | |
% | |
\documentclass[11pt]{article} | |
% ------------------------------------------------ | |
% Specify the margins. | |
% ------------------------------------------------ | |
\usepackage{vmargin} | |
\setmargrb{2cm}{1cm}{2cm}{2cm} |
% © 2016 Henrik Öhman | |
% Distributed under the CC BY-SA 4.0 license | |
\documentclass{article} | |
\usepackage{unicode-math} | |
\usepackage{xcolor} | |
\usepackage{graphicx} | |
\usepackage{tikz} | |
\usepackage{luacode} | |
\usepackage[pdfborder={0 0 0}]{hyperref} |