What is the difference between np.mean and tf.reduce_mean?

The functionality of numpy.mean and tensorflow.reduce_mean are the same. They do the same thing. From the documentation, for numpy and tensorflow, you can see that. Lets look at an example, Output Here you can see that when axis(numpy) or reduction_indices(tensorflow) is 1, it computes mean across (3,4) and (5,6) and (6,7), so 1 defines across which axis the mean is computed. When it is 0, the … Read more

LSTM Keras input shape confusion

I am trying to build a predictive model on stock prices. From what I’ve read, LSTM is a good layer to use. I can’t fully understand what my input_shape needs to be for my model though. Here is the tail of my DataFrame I then split the data into train / test This yields: Here’s where I am getting confused. … Read more

Import error when trying to import tensorflow with gpu

If you are using TensorFlow with GPU, you need to install CUDA and cuDNN. Please follow instructions on https://www.tensorflow.org/install/ If you have already install CUDA and cuDNN, but still get this error, then you probably forgot to export your libraries: for Linux, you may need to set LD_LIBRARY_PATH to include CUDA libraries.

pip3: command not found

You would need to install pip3. On Linux, the command would be: sudo apt install python3-pip On Mac, using brew, first brew install python3Then brew postinstall python3 Try calling pip3 -V to see if it worked.

What is the difference between sparse_categorical_crossentropy and categorical_crossentropy?

Simply: categorical_crossentropy (cce) produces a one-hot array containing the probable match for each category, sparse_categorical_crossentropy (scce) produces a category index of the most likely matching category. Consider a classification problem with 5 categories (or classes). In the case of cce, the one-hot target may be [0, 1, 0, 0, 0] and the model may predict [.2, .5, .1, .1, .1] (probably right) In the … Read more

Can I run Keras model on gpu?

Yes you can run keras models on GPU. Few things you will have to check first. your system has GPU (Nvidia. As AMD doesn’t work yet) You have installed the GPU version of tensorflow You have installed CUDA installation instructions Verify that tensorflow is running with GPU check if GPU is working sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) for TF … Read more

Cannot uninstall Tensorflow

The following image shows various versions of tensorflow installed however I am not able to uninstall it. I tried pip, pip3, conda and still it does not recognise tensorflow. I even tried all the possibilities from this thread Tensorflow: why ‘pip uninstall tensorflow’ cannot find tensorflow How to remove Tensorflow completely ?

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)