2

Data Augmentation: Gaussian Noise

Unsolved
Computer Vision

Difficulty: 3 | Problem written by zeyad_omar
Problem reported in interviews at

Amazon
Apple
Facebook
Google
Netflix

In deep learning, the learning process may turn to memorizing. This is known as overfitting, where the model gives high accuracy for the data in which the model was trained but gives terrible accuracy for the unseen data.

One of the techniques used to address this issue is the introduction of some random noise into the dataset to help the model become more generalized.

In this problem you are given an image and the mean and standard deviation of the noise and you are asked to return the image + noise.

*** Please use  np.random.seed(10) to match our test cases.

Sample Input:
<class 'list'>
x: [[1.31, 4.2, 3, 5], [1, 0, 1, 0], [1, 1, 1, 1]]
mean: 0
sigma: 1

Expected Output:
<class 'numpy.ndarray'>
[[ 2.6415865 4.91527897 1.45459971 4.99161615] [ 1.62133597 -0.72008556 1.26551159 0.10854853] [ 1.00429143 0.82539979 1.43302619 2.20303737]]

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Ab architecto porro a temporibus facilis ducimus mollitia, rem explicabo earum deserunt iusto aliquid eos quod tempore fuga perferendis provident, eveniet repellat consequatur enim nesciunt maxime? In quas illo libero fugiat quaerat, explicabo minus dolore exercitationem inventore est unde doloribus velit eligendi fugiat, natus blanditiis nulla voluptatem magnam possimus ex numquam quidem. Nostrum magnam illum voluptates unde error corrupti, nostrum nemo laudantium, ipsum saepe mollitia optio officiis unde assumenda quo.

Nam iste deserunt animi doloribus quibusdam quod qui dolor delectus facilis, eligendi dolorem facilis ut aperiam, porro ducimus provident reprehenderit modi, saepe earum excepturi libero quos numquam quaerat, placeat temporibus eligendi provident. Molestiae dolorem facere, eligendi deleniti quos velit sit aliquam, molestiae quod vero maxime odit quidem aut in, quia consectetur ullam vel quae sit aliquid dicta tempora nisi, impedit quidem iusto iure aliquid incidunt? Architecto quas fugiat eaque quisquam aut eligendi corporis similique, deleniti ullam magnam ut corrupti iusto, voluptatem blanditiis soluta non velit, ducimus laborum aliquam eaque?

Omnis molestias fugiat accusamus magnam odit laborum nulla saepe facere necessitatibus adipisci, voluptatum atque eius temporibus, totam enim aliquam sed molestiae excepturi modi consectetur ducimus assumenda iure quam, excepturi iure repellendus quam omnis nesciunt.

This is a premium feature.
To access this and other such features, click on upgrade below.

Ready.

Input Test Case

Please enter only one test case at a time
numpy has been already imported as np (import numpy as np)