skflow

How to create `input_fn` using `read_batch_examples` with `num_epochs` set?

╄→尐↘猪︶ㄣ 提交于 2019-12-03 20:39:20
I have a basic input_fn that can be used with Tensorflow Estimators below. It works flawlessly without setting the num_epochs parameter; the obtained tensor has a discrete shape. Pass in num_epochs as anything other than None results in an unknown shape. My issue lies with constructing sparse tensors whilst using num_epochs ; I cannot figure out how to generically create said tensors without knowing the shape of the input tensor. Can anyone think of a solution to this problem? I'd like to be able to pass num_epochs=1 to be able to evaluate only 1 time over the data set, as well as to pass to

skflow regression predict multiple values

被刻印的时光 ゝ 提交于 2019-12-01 16:53:57
问题 I'm trying to forecast a time series: given 50 previous values, I want to predict the 5 next values. To do so, I'm using the skflow package (based on TensorFlow), and this problem is relatively close to the Boston example provided in the Github repo. My code is as follows : %matplotlib inline import pandas as pd import skflow from sklearn import cross_validation, metrics from sklearn import preprocessing filepath = 'CSV/FILE.csv' ts = pd.Series.from_csv(filepath) nprev = 50 deltasuiv = 5 def

TensorFlowDNNClassifier class is deprecated but replacement does not seem to work?

本秂侑毒 提交于 2019-12-01 10:53:33
Using the following with TF .9.0rc0 on 60,000 (train) and 26,000 (test) on or so records with 145 coded columns (1,0) trying to predict 1 or 0 for class identification.. classifier_TensorFlow = learn.TensorFlowDNNClassifier(hidden_units=[10, 20, 10],n_classes=2, steps=100) classifier_TensorFlow.fit(X_train, y_train.ravel()) I get: WARNING:tensorflow:TensorFlowDNNClassifier class is deprecated. Please consider using DNNClassifier as an alternative. Out[34]:TensorFlowDNNClassifier(steps=100, batch_size=32) And then good results quite fast: score = metrics.accuracy_score(y_test, classifier

TensorFlowDNNClassifier class is deprecated but replacement does not seem to work?

笑着哭i 提交于 2019-12-01 08:08:04
问题 Using the following with TF .9.0rc0 on 60,000 (train) and 26,000 (test) on or so records with 145 coded columns (1,0) trying to predict 1 or 0 for class identification.. classifier_TensorFlow = learn.TensorFlowDNNClassifier(hidden_units=[10, 20, 10],n_classes=2, steps=100) classifier_TensorFlow.fit(X_train, y_train.ravel()) I get: WARNING:tensorflow:TensorFlowDNNClassifier class is deprecated. Please consider using DNNClassifier as an alternative. Out[34]:TensorFlowDNNClassifier(steps=100,

Tensorflow Dataset API doubles graph protobuff filesize

被刻印的时光 ゝ 提交于 2019-12-01 06:19:53
Summary : Using the new tf.contrib.data.Dataset doubles the size of my graph protobuff file and I'm unable to visualize the graph in Tensorboard. The details: I'm trying out the new TensorFlow tf.contrib.data.Dataset functionality together with the tf.contrib.learn.Experiment framework. My input data is defined as input functions which return tensors of features and labels. If I create my input function with the tf.train.slice_input_producer function like in the following codeblock (full code here ), then my resulting graph.pbtxt file is 620M and the .meta files are around 165M in size. def

Tensorflow Dataset API doubles graph protobuff filesize

六月ゝ 毕业季﹏ 提交于 2019-12-01 04:26:05
问题 Summary : Using the new tf.contrib.data.Dataset doubles the size of my graph protobuff file and I'm unable to visualize the graph in Tensorboard. The details: I'm trying out the new TensorFlow tf.contrib.data.Dataset functionality together with the tf.contrib.learn.Experiment framework. My input data is defined as input functions which return tensors of features and labels. If I create my input function with the tf.train.slice_input_producer function like in the following codeblock (full code

In Tensorflow, get the names of all the Tensors in a graph

断了今生、忘了曾经 提交于 2019-11-26 21:26:40
I am creating neural nets with Tensorflow and skflow ; for some reason I want to get the values of some inner tensors for a given input, so I am using myClassifier.get_layer_value(input, "tensorName") , myClassifier being a skflow.estimators.TensorFlowEstimator . However, I find it difficult to find the correct syntax of the tensor name, even knowing its name (and I'm getting confused between operation and tensors), so I'm using tensorboard to plot the graph and look for the name. Is there a way to enumerate all the tensors in a graph without using tensorboard? You can do [n.name for n in tf

In Tensorflow, get the names of all the Tensors in a graph

為{幸葍}努か 提交于 2019-11-26 08:58:17
问题 I am creating neural nets with Tensorflow and skflow ; for some reason I want to get the values of some inner tensors for a given input, so I am using myClassifier.get_layer_value(input, \"tensorName\") , myClassifier being a skflow.estimators.TensorFlowEstimator . However, I find it difficult to find the correct syntax of the tensor name, even knowing its name (and I\'m getting confused between operation and tensors), so I\'m using tensorboard to plot the graph and look for the name. Is