deeplearning.ai | Adrew Ng 's coursera course | Machine Learning library

 by   XingxingHuang CSS Version: Current License: No License

kandi X-RAY | deeplearning.ai Summary

kandi X-RAY | deeplearning.ai Summary

deeplearning.ai is a CSS library typically used in Artificial Intelligence, Machine Learning, Deep Learning applications. deeplearning.ai has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

The ~~notes and answers~~ of Adrew Ng's coursera course: deeplearning.ai. Course 5 will be released in December. The information in this repo is quit limit, but you can still email me for any questions. If you want to learn basic concept and pratice programme skills about machine learning, you can also try my github folder. It includes the python implementations of the basic machine learning programs. It helps a lot if you implement all basic algorithms by yourself.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              deeplearning.ai has a low active ecosystem.
              It has 269 star(s) with 133 fork(s). There are 39 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 5 open issues and 8 have been closed. On average issues are closed in 10 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of deeplearning.ai is current.

            kandi-Quality Quality

              deeplearning.ai has no bugs reported.

            kandi-Security Security

              deeplearning.ai has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              deeplearning.ai does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              deeplearning.ai releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of deeplearning.ai
            Get all kandi verified functions for this library.

            deeplearning.ai Key Features

            No Key Features are available at this moment for deeplearning.ai.

            deeplearning.ai Examples and Code Snippets

            No Code Snippets are available at this moment for deeplearning.ai.

            Community Discussions

            QUESTION

            Neural network hyperparameter tuning - is setting random seed a good idea?
            Asked 2021-Jan-13 at 17:52

            I am trying to tune a basic neural network as practice. (Based on an example from a coursera course: Neural Networks and Deep Learning - DeepLearning.AI) I face the issue of the random weight initialization. Lets say I try to tune the number of layers in the network. I have two options:

            • 1.: set the random seed to a fixed value
            • 2.: run my experiments more times without setting the seed

            Both version has pros and cons. My biggest concern is that if I use a random seed (e.g.: tf.random.set_seed(1)) then the determined values can be "over-fitted" to the seed and may not work well without the seed or if the value is changed (e.g.: tf.random.set_seed(1) -> tf.random.set_seed(2). On the other hand, if I run my experiments more times without random seed then I can inspect less option (due to limited computing capacity) and still only inspect a subset of possible random weight initialization. In both cases I feel that luck is a strong factor in the process.

            Is there a best practice how to handle this topic?

            Has TensorFlow built in tools for this purpose? I appreciate any source of descriptions or tutorials. Thanks in advance!

            ...

            ANSWER

            Answered 2021-Jan-13 at 17:33

            Tuning hyperparameters in deep learning (generally in machine learning) is a common issue. Setting the random seed to a fixed number ensures reproducibility and fair comparison. Repeating the same experiment will lead to the same outcomes. As you probably know, best practice to avoid over-fitting is to do a train-test split of your data and then use k-fold cross-validation to select optimal hyperparameters. If you test multiple values for a hyperparameter, you want to make sure other circumstances that might influence the performance of your model (e.g. train-test-split or weight initialization) are the same for each hyperparameter in order to have a fair comparison of the performance. Therefore I would always recommend to fix the seed.

            Now, the problem with this is, as you already pointed out, the performance for each model will still depend on the random seed, like the particular data split or weight initialization in your case. To avoid this, one can do repeated k-fold-cross validation. That means you repeat the k-fold cross-validation multiple times, each time with a different seed, select best parameters of that run, test on test data and average the final results to get a good estimate of performance + variance and therefore eliminate the influence the seed has in the validation process. Alternatively you can perform k-fold cross validation a single time and train each split n-times with a different random seed (eliminating the effect of weight initialization, but still having the effect of the train-test-split).

            Finally TensorFlow has no build-in tool for this purpose. You as practitioner have to take care of this.

            Source https://stackoverflow.com/questions/65704588

            QUESTION

            My PyTorch GAN is changing from producing random noise to darkness with no convergence. Why is this?
            Asked 2020-Dec-17 at 10:19

            My code is very basic, just following the first lab from DeepLearning.ai's GAN specialization. However, my code does not have the same output, what is the reason for this. Sorry if this is just a silly mistake, this is my first experience with GANs. I begin by creating the Generator and Discriminator classes, my random noise function, and creating my models. I then run the training loop, but after 3 epochs, all of the outputs from the GAN are black.

            ...

            ANSWER

            Answered 2020-Dec-17 at 10:19

            Your discriminator loss is wrong. The labels for the real images should be 1 instead of 0.

            Updated code:

            Source https://stackoverflow.com/questions/65333797

            QUESTION

            Is there a way to detect if a filter exists in an image or not?
            Asked 2020-Dec-10 at 18:46

            I'm following Andrew Ng's video1 video2 on edge detection and I'm trying to detect if a filter exists in an image.
            So if I have 2 images and 2 filters (1 that detects horizontal lines and 1 that detects vertical lines):

            ...

            ANSWER

            Answered 2020-Dec-10 at 18:46

            Based on the conversation in the comments, we decided to compute the percentage of zeros (or very small values in the matrix). Suppose that the matrix is arr. Then,

            Source https://stackoverflow.com/questions/65239694

            QUESTION

            Tensorflow shared library error; ImportError: libcuda.so.1: cannot open shared object file: No such file or directory
            Asked 2020-Oct-19 at 11:50

            I think there is a problem with my cudatoolkit version ie. 10.0.130. I don't understand this error message. I want to use Gradcam (heatmap generator) on the x-ray image. It is the same code from AI for Medicine by deeplearning.ai, I want to run it on my machine and I am trying to create a REST API for this model.

            ...

            ANSWER

            Answered 2020-Oct-19 at 11:50

            The problem was python 3.7 in my virtual env. I downgraded to python 3.6.5 and everything seems alright.

            Source https://stackoverflow.com/questions/63860741

            QUESTION

            'tensorflow' has no attribute 'space_to_depth' error with tensorflow 2.3 when running yad2k to generate model h5 file
            Asked 2020-Sep-20 at 20:18

            I am trying to generate YOLOv2 model yolo.h5 so that I can load this pre-trained model. I am trying to port Andrew Ng coursera Yolo assignment ( which runs in tensorflow 1.x) to tensorflow 2.3.

            I was able to cleanly port it thanks to tensorflow uprade (https://www.tensorflow.org/guide/upgrade), But little did I realize that I cannot download the yolo.h5 file ( either its get corrupted or the download times out) and therefore I thought I should build one and I followed instructions from https://github.com/JudasDie/deeplearning.ai/issues/2. It looked pretty straight forward as I cloned YAD2k repo and downloaded both the yolo.weights and yolo.cfg. I ran the following the command as per the instructions:

            python yad2k.py yolo.cfg yolo.weights model_data/yolo.h5

            But I got the following error:-

            ...

            ANSWER

            Answered 2020-Sep-20 at 20:18

            The above problem goes away when you upgrade all of your code under yad2k repo ( particularly yad2k.py and python files under models folder to tensorflow 2.x. The beautiful upgrade utility provided by tensorflow does the magic for you by replacing the original call to the compatible tf.compat.v1.space_to_depth(input=x, block_size=...)

            Therefore for those who are planning to do the hard job of downgrading their tensorflow and keras, I would recommend them to try the tensorflow upgrade. This saves a lot of time.

            This takes care of my model h5 file creation. My bad - I didn't think about it when I asking the question.

            Source https://stackoverflow.com/questions/63964143

            QUESTION

            Flattened input layer shape
            Asked 2020-Jul-28 at 02:11

            The code below was taken from TensorFlow in Practice by deeplearning.ai course in Coursera (computer vision example - week 2).

            ...

            ANSWER

            Answered 2020-Jul-28 at 02:11

            Given the model.fit(training_images, training_labels), Tensorflow API automatically passes the training_images to the first layer.

            Training_images is a tensor of shape (m, 28, 28, 1). where, m - Total number of training images, 28x28 - image size, 1 - channel (Gray scale),

            tf.keras.layers.Flatten(), reshapes the(28, 28, 1) 28x28 image into -> (784,).

            View this for the Flatten() method source code. https://github.com/tensorflow/tensorflow/blob/v2.2.0/tensorflow/python/keras/layers/core.py#L598-L684

            Source https://stackoverflow.com/questions/63101648

            QUESTION

            Install issues with 'lr_utils' in python
            Asked 2020-May-08 at 07:11

            I am trying to complete some homework in a DeepLearning assignment [deeplearning.ai by Dr. Andrew N.G.(Stanford University)].

            When I try the assignment in Coursera platform everything works fine, however, when I try to do the same imports on my local machine it gives me an error,

            ModuleNotFoundError: No module named 'lr_utils'

            I have tried resolving the issue by installing lr_utils but to no avail.

            There is no mention of this module online(surprised me a bit) and now I started to wonder if that's a proprietary to deeplearning.ai?

            Or can we can resolve this issue in any other way!

            ...

            ANSWER

            Answered 2018-Apr-01 at 13:13

            "lr_utils" is not official library or something like that. Purpose of "lr_utils" is to fetch the dataset that is required for course.

            1. option (didn't work for me): go to this page and there is a python code for downloading dataset and creating "lr_utils"

              • I had a problem with fetching data from provided url (but at least you can try to run it, maybe it will work)
            2. option (worked for me): in the comments (at the same page 1) there are links for manually downloading dataset and "lr_utils.py", so here they are:

            Source https://stackoverflow.com/questions/49311929

            QUESTION

            image matrix to input feature vector vector
            Asked 2019-Oct-24 at 21:58

            this code converts a 2-dimensional matrix to a vector that contains all the values of the matrix, however, I don't understand what does this means :

            image.reshape(image.shape[0] * image.shape[1] * image.shape[2],1)

            I've searched in other forums such as the deeplearning.ai forum about what this line of code mean ... but it's as if nobody had the same doubt as me...

            """

            GRADED FUNCTION: image2vector

            def image2vector(image):

            ...

            ANSWER

            Answered 2019-Oct-24 at 18:41

            image has the shape in the form of (H, W, C) which stands for H:height, W:width and C:channel. For example, an RGB image of size 256x256 has the shape of (256, 256, 3) and it contains 256*256*3 number of elements in total.

            Same amount of elements can be stored in a vector with shape (256*256*3, 1). This is what numpy.reshape does. Shape of the final array should have the same number of elements in it with the input array.

            Source https://stackoverflow.com/questions/58546389

            QUESTION

            Neural Network (operands could not be broadcast together with shapes (1,713) (713,18) )
            Asked 2019-Oct-05 at 20:39

            I am currently taking the Deep Learning specialization by Deeplearning.ai on Coursera and am on the first assignment that requires implementing Neural Network with Logistic Regression mindset. The problem is that the assignment is implementation of Neural Network as Logistic Regression function for UNSTRUCTURED DATA (IMAGES). I have successfully completed the assignment, getting all the expected outputs. However, I am now trying to use the coded Neural Network for STRUCTURE DATA but come across broadcast error. Part of the code is as below :

            The dataset code

            ...

            ANSWER

            Answered 2019-Oct-05 at 14:11

            The * operator is elementwise multiplication, and your arrays have incompatible shapes. You want matrix multiplication, which you can do with np.matmul() or with the @ operator:

            Source https://stackoverflow.com/questions/58241656

            QUESTION

            How inverting the dropout compensates the effect of dropout and keeps expected values unchanged?
            Asked 2019-Jul-27 at 08:58

            I'm learning regularization in Neural networks from deeplearning.ai course. Here in dropout regularization, the professor says that if dropout is applied, the calculated activation values will be smaller then when the dropout is not applied (while testing). So we need to scale the activations in order to keep the testing phase simpler.

            I understood this fact, but I don't understand how scaling is done. Here is a code sample which is used to implement inverted dropout.

            ...

            ANSWER

            Answered 2019-Jul-27 at 08:58

            I got the answer by myself after spending some time understanding the inverted dropout. Here is the intuition:

            We are preserving the neurons in any layer with the probability keep_prob. Let's say kepp_prob = 0.6. This means to shut down 40% of the neurons in any layer. If the original output of the layer before shutting down 40% of neurons was x, then after applying 40% dropout, it'll be reduced by 0.4 * x. So now it will be x - 0.4x = 0.6x.

            To maintain the original output (expected value), we need to divide the output by keep_prob (or 0.6 here).

            Source https://stackoverflow.com/questions/57193633

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install deeplearning.ai

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/XingxingHuang/deeplearning.ai.git

          • CLI

            gh repo clone XingxingHuang/deeplearning.ai

          • sshUrl

            git@github.com:XingxingHuang/deeplearning.ai.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link