Skip to content

Instantly share code, notes, and snippets.

View adiell's full-sized avatar
🏠
Working from home

Adiel Loinger adiell

🏠
Working from home
View GitHub Profile
@adiell
adiell / tensorflow-lattice.py
Created September 29, 2020 08:33
Example for usage of tensorflow lattice on 1d data ("curve fitting") to ensure monotonicity and convexity
import tensorflow_lattice as tfl
import tensorflow
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from tensorflow_estimator.python.estimator.inputs.numpy_io import numpy_input_fn
from tensorflow.python.feature_column.feature_column_v2 import numeric_column
from tensorflow_estimator.python.estimator.canned.dnn import DNNRegressor
n = 100
@adiell
adiell / main_script.py
Created March 25, 2019 09:51
Sagemaker example
from tensorflow.python.keras import Sequential
from tensorflow.python.keras.layers import Dense
from tensorflow.python.keras.optimizers import Adam
import numpy as np
import argparse
import os
import json
import logging
import tensorflow as tf
from tensorflow.python.saved_model import builder