I'm new to TensorFlow and Data Science. I made a simple module that should figure out the relationship between input and output numbers. In this case, x and x squared. The code in... moreI'm new to TensorFlow and Data Science. I made a simple module that should figure out the relationship between input and output numbers. In this case, x and x squared. The code in Python:
import numpy as np
import tensorflow as tf
# TensorFlow only log error messages.
tf.logging.set_verbosity(tf.logging.ERROR)
model = tf.keras.Sequential([
tf.keras.layers.Dense(units = 1, input_shape = )
model.compile(loss = "mean_squared_error", optimizer = tf.keras.optimizers.Adam(0.0001))
model.fit(features, labels, epochs = 50000, verbose = False)
print(model.predict())
I tried a different number of units, and adding more layers, and even using the relu activation function, but the results were always wrong. It works with other relationships like x and 2x. What is the problem here? less
I recently started studying deep learning and other ML techniques, and I started searching for frameworks that simplify the process of build a net and training it, then I found... moreI recently started studying deep learning and other ML techniques, and I started searching for frameworks that simplify the process of build a net and training it, then I found TensorFlow, having little experience in the field, for me, it seems that speed is a big factor for making a big ML system even more if working with deep learning, so why python was chosen by Google to make TensorFlow? Wouldn't it be better to make it over an language that can be compiled and not interpreted?
What are the advantages of using Python over a language like C++ for machine learning? less
Perhaps too general a question, but can anyone explain what would cause a Convolutional Neural Network to... morePerhaps too general a question, but can anyone explain what would cause a Convolutional Neural Network to diverge?
Specifics:
I am using Tensorflow's iris_training model with some of my own data and keep getting
ERROR:tensorflow:Model diverged with loss = NaN.
Traceback...
tensorflow.contrib.learn.python.learn.monitors.NanLossDuringTrainingError: NaN loss during training.
I've tried adjusting the optimizer, using a zero for learning rate, and using no optimizer. Any insights into network layers, data size, etc is appreciated. less
I have Keras installed with the Tensorflow backend and CUDA. I'd like to sometimes on demand force Keras to use CPU. Can this be done without say installing a separate CPU-only... moreI have Keras installed with the Tensorflow backend and CUDA. I'd like to sometimes on demand force Keras to use CPU. Can this be done without say installing a separate CPU-only Tensorflow in a virtual environment? If so how? If the backend were Theano, the flags could be set, but I have not heard of Tensorflow flags accessible via Keras.
I am using TensorFlow to train a neural network. This is how I am initializing the GradientDescentOptimizer:
init = tf.initialize_all_variables()
sess =... moreI am using TensorFlow to train a neural network. This is how I am initializing the GradientDescentOptimizer:
init = tf.initialize_all_variables()
sess = tf.Session()
sess.run(init)
mse = tf.reduce_mean(tf.square(out - out_))
train_step = tf.train.GradientDescentOptimizer(0.3).minimize(mse)
The thing here is that I don't know how to set an update rule for the learning rate or a decay value for that.
How can I use an adaptive learning rate here?
For example, I'm trying to understand this code
def _get_child_candidates(self, distance, min_dist, max_dist): if self._leftchild and distance - max_dist < self._median: yield... moreFor example, I'm trying to understand this code
def _get_child_candidates(self, distance, min_dist, max_dist): if self._leftchild and distance - max_dist < self._median: yield self._leftchild if self._rightchild and distance + max_dist >= self._median: yield self._rightchild
And this is the caller:
result, candidates = , while candidates: node = candidates.pop() distance = node._get_dist(obj) if distance <= max_dist and distance >= min_dist: result.extend(node._values) candidates.extend(node._get_child_candidates(distance, min_dist, max_dist)) return result
What happens when the method _get_child_candidates is called? Is a list returned? A single element? Is it called again? When will subsequent calls stop? less
My company has been using Jira for production issue tracking for last 6~8 years and as a result, there is a huge amount of production issue details logged in our Jira.
Usually... moreMy company has been using Jira for production issue tracking for last 6~8 years and as a result, there is a huge amount of production issue details logged in our Jira.
Usually each Jira ticket for any production support issues consist of some useful information such as:
Error Message
System Involved
Root Cause
Resolution
Time Taken
etc
My company has its own team chat service that supports the Chatbot API in Java / Python / etc. I would like to build the smart chatbot (if not AI) that is smart enough to exchange conversation like this in the chatroom:
DevOps) Hey Jirabot, what do you know about this error message?
Jirabot) Hi there, in which systems did this occur? Can you choose from one of the followings?
System A
System B
DevOps) 1
Jirabot) Right, it looks like following Jira tickets have experienced the similar issues.. please check the following tickets.
Jira-12zx
Jira-52123zz
Jira-vvvbbb
I would like to ask people with experiences in implementing something similar to this or have any... less
I have a django form, which is collecting user response. I also have a tensorflow sentences classification model. What is the best/standard way to put these two together.... moreI have a django form, which is collecting user response. I also have a tensorflow sentences classification model. What is the best/standard way to put these two together. Details:
tensorflow model was trained on the Movie Review data from Rotten Tomatoes.
Everytime a new row is made in my response model , i want the tensorflow code to classify it( + or - ).
Basically I have a django project directory and two .py files for classification. Before going ahead myself , i wanted to know what is the standard way to implement machine learning algorithms to a web app.
It'd be awesome if you could suggest a tutorial or a repo. Thank you ! less
When I run sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys}) I get InternalError: Blas SGEMM launch failed. Here is the full error and stack... moreWhen I run sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys}) I get InternalError: Blas SGEMM launch failed. Here is the full error and stack trace:
InternalErrorTraceback (most recent call last)
<ipython-input-9-a3261a02bdce> in <module>()
1 batch_xs, batch_ys = mnist.train.next_batch(100)
----> 2 sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys})
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in run(self, fetches, feed_dict, options, run_metadata)
338 try:
339 result = self._run(None, fetches, feed_dict, options_ptr,
--> 340 run_metadata_ptr)
341 if run_metadata:
342 proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.pyc in _run(self, handle, fetches, feed_dict, options, run_metadata)
562 try:
563 results = self._do_run(handle, target_list, unique_fetches,
--> 564 ... less
I'm trying to write a simple RNN in tensorflow, based on the tutorial here: https://danijar.com/introduction-to-recurrent-networks-in-tensorflow/ (I'm using a simple RNN cell... moreI'm trying to write a simple RNN in tensorflow, based on the tutorial here: https://danijar.com/introduction-to-recurrent-networks-in-tensorflow/ (I'm using a simple RNN cell rather than GRU, and not using dropout).I'm confused because the different RNN cells in my sequence appear to be being assigned separate weights. If I run the following codeimport tensorflow as tfseq_length = 3n_h = 100 # Number of hidden unitsn_x = 26 # Size of input layern_y = 26 # Size of output layerinputs = tf.placeholder(tf.float32, )cells = for _ in range(seq_length): cell = tf.contrib.rnn.BasicRNNCell(n_h) cells.append(cell)multi_rnn_cell = tf.contrib.rnn.MultiRNNCell(cells)initial_state = tf.placeholder(tf.float32, )outputs_h, output_final_state = tf.nn.dynamic_rnn(multi_rnn_cell, inputs, dtype=tf.float32)sess = tf.Session()sess.run(tf.global_variables_initializer())print('Trainable variables:')for v in tf.trainable_variables(): print(v)If I run this in python 3, I get the following output:Trainable variables:Firstly,... less
What is the difference between 'SAME' and 'VALID' padding in tf.nn.max_pool of tensorflow?
In my opinion, 'VALID' means there will be no zero padding outside the edges when we... moreWhat is the difference between 'SAME' and 'VALID' padding in tf.nn.max_pool of tensorflow?
In my opinion, 'VALID' means there will be no zero padding outside the edges when we do max pool.
According to A guide to convolution arithmetic for deep learning, it says that there will be no padding in pool operator, i.e. just use 'VALID' of tensorflow. But what is 'SAME' padding of max pool in tensorflow?
I have constructed a CLDNN (Convolutional, LSTM, Deep Neural Network) structure for raw signal classification task.
Each training epoch runs for about 90 seconds and the... moreI have constructed a CLDNN (Convolutional, LSTM, Deep Neural Network) structure for raw signal classification task.
Each training epoch runs for about 90 seconds and the hyperparameters seems to be very difficult to optimize.
I have been research various ways to optimize the hyperparameters (e.g. random or grid search) and found out about Bayesian Optimization.
Although I am still not fully understanding the optimization algorithm, I feed like it will help me greatly.
I would like to ask few questions regarding the optimization task.
How do I set up the Bayesian Optimization with regards to a deep network?(What is the cost function we are trying to optimize?)
What is the function I am trying to optimize? Is it the cost of the validation set after N epochs?
Is spearmint a good starting point for this task? Any other suggestions for this task?
I would greatly appreciate any insights into this problem. less