Skip to content

Instantly share code, notes, and snippets.

View echo66's full-sized avatar

echo66 echo66

  • Lisbon, Portugal
View GitHub Profile
@oiehot
oiehot / tf_estimator_custom.py
Created November 10, 2017 23:35
Tensorflow Custom Estimator
import numpy as np
import tensorflow as tf
# 커스텀 Estimator 모델(func)
def model_fn(features, labels, mode):
W = tf.get_variable('W', [1], dtype=tf.float64) # tf.get_variable(): Gets an existing variable with parameter or create a new one.
b = tf.get_variable('b', [1], dtype=tf.float64)
y = W * features['x'] + b
# loss(오차) 서브 그래프