Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
We want to connect the people who have knowledge to the people who need it, to bring together people with different perspectives so they can understand each other better, and to empower everyone to share their knowledge.
What is pink skies about?
"Pink Skies" is a heartfelt song that dives deep into life and death. It paints a vivid picture of a funeral, packed with emotion. In the lyrics, Zach Bryan seems to have a symbolic chat with the person who's passed away. He beams with pride as he mentions how "the kids" came to pay their respects.Read more
“Pink Skies” is a heartfelt song that dives deep into life and death. It paints a vivid picture of a funeral, packed with emotion. In the lyrics, Zach Bryan seems to have a symbolic chat with the person who’s passed away. He beams with pride as he mentions how “the kids” came to pay their respects. The song beautifully weaves in memories of the good times they had, making it a truly engaging and touching listen.
See lessWhich one of the following pieces of code is used to train Autoencoder?
autoencoder.fit(X_train, X_train, epochs=epochs)
autoencoder.fit(X_train, X_train, epochs=epochs)
See lessWhat does model_1 output in this AutoEncoder code snippet?
Answer: Displaying the internal representation of the input the model is learning to replicate.
Answer:
Displaying the internal representation of the input the model is learning to replicate.
See lessCalculate Content Loss Value between Generated and Content Images: 5 2 1 7 vs. 3 5 5 4
=[5 - 3, 2 - 5, 1 - 5, 7 - 4] = [2, -3, -4, 3] =[2^2, (-3)^2, (-4)^2, 3^2] = [4, 9, 16, 9] =4 + 9 + 16 + 9 = 38 =38 * (1/2) = 19 Anwer: 19
=[5 – 3, 2 – 5, 1 – 5, 7 – 4] = [2, -3, -4, 3]
=[2^2, (-3)^2, (-4)^2, 3^2] = [4, 9, 16, 9]
=4 + 9 + 16 + 9 = 38
=38 * (1/2) = 19
Anwer: 19
See lessConsider the following code snippet. How will you include Total Loss Variation in it? Use TensorFlow as tf.
Answer: total_variation_weight * tf.image.total_variation(image)
Answer:
total_variation_weight * tf.image.total_variation(image)
See lessadvance computer vision with tensorflow week4
Q1.Consider the following code for Class Activation Maps. Which layer(s) of the model do we choose as outputs to draw out the class activation map ? Check all that apply. Answer: The layer which holds the extracted features in the model The layer which performs classification on the model QueRead more
Q1.Consider the following code for Class Activation Maps. Which layer(s) of the model do we choose as outputs to draw out the class activation map ? Check all that apply.
Answer:
The layer which holds the extracted features in the model
The layer which performs classification on the model
Question 2
To compute the Class Activation Map you ____________.
Answer:
Take the dot product of the features associated with the prediction on the image, with the weights that come from the last global average pooling layer.
Question 3
In a Salience map you get to see parts of the image the model was paying attention to when deciding what class to assign to the image.
Answer:
False
Question 4
In Saliency Maps, the pixels that most impact the final classification are found by looking at the gradients of the final layers to see which ones had the steepest curve, and figure out their location and plot them on the original image.
Answer:
True
Question 5
Which of the following statements are not true about GradCAM? Check all that apply.
Answer:
The negative values in the heatmapof the gradCAM are kept as they enhance the performance and accuracy of the gradCAM.
advance computer vision with tensorflow week3
Q1. At the heart of image segmentation with neural networks is an encoder/decoder architecture. What functionalities do they perform? Answer: The encoder extracts features from an image and the decoder takes those extracted features and assigns class labels to each pixel of the image. Q2. IsRead more
Q1. At the heart of image segmentation with neural networks is an encoder/decoder architecture. What functionalities do they perform?
Answer: The encoder extracts features from an image and the decoder takes those extracted features and assigns class labels to each pixel of the image.
Q2. Is the following statement true regarding SegNet, UNet and Fully Convolutional Neural Networks (FCNNs):
Unlike the similarity between the architecture design of SegNet & UNet, FCNNs do not have a symmetric architecture design.
Answer: True
Question 3
What architectural difference does the numberrepresent in the names of FCN-32, FCN-16, FCN-8 ?
Answer:
The number represents the factor by which the final pooling layer in the architecture up-samples the image to make predictions.
Question 4
Take a look at the following code and select the type of scaling that will be performed
x = UpSampling2D(
size=(2, 2),
data_format=None,
interpolation=’bilinear’)(x)
Answer:
The upsampling of the image will be done by means of linear interpolation from the closest pixel values
Question 5
What does the following code do?
Conv2DTranspose(
filters=32,
kernel_size=(3, 3)
)
Answer:
It takes the pixel values and filters and tries to reverse the convolution process to return back a 3×3 array which could have been the original array of the image.
Question 6
The following is the code for the last layer of a FCN-8 decoder. What key change is required if we want this to be the last layer of a FCN-16 decoder ?
def fcn8_decoder(convs, n_classes):
…
o = tf.keras.layers.Conv2DTranspose(n_classes, kernel_size=(8,8), strides=(8,8)) (0)
o = (tf.keras.layers.Activation(‘softmax’)) (0)
return o
Answer: kernel_size=(16, 16)
Question 7:
Which of the following is true about Intersection Over Union (IoU) and Dice Score, when it comes to evaluating image segmentation? (Choose all that apply.)
Answer:
Both have a range between 0 and 1
For IoU the numerator is the area of overlap for both the labels, predicted and ground truth, whereas for Dice Score the numerator is 2 times that.
Question 8:
Consider the following code for building the encoder blocks for a U-Net. What should this function return?
def unet_encoder_block(inputs, n_filters, pool_size, dropout): blocks = conv2d_block(inputs, n_filters=n_filters)
after_pooling = tf.keras.layers.MaxPooling2D(pool_size)(blocks)
after_dropout = tf.keras.layers.Dropout(dropout)(after_pooling)
return # your code here
Answer:
blocks
Question 9
For U-Net, on the decoder side you combine skip connections which come from the corresponding level of the encoder. Consider the following code and provide the missing line required to account for those skip connections with the upsampling.
(Important Notes: Use TensorFlow as tf, Keras as keras. And be mindful of python spacing convention, i.e (x, y) not (x,y) )
def decoder_block(inputs, conv_output, n_filters, kernel_size, strides, dropout):
upsampling_layer = tf.keras.layers.Conv2DTranspose(n_filters, kernel_size, strides = strides, padding=’same’)(inputs)
skip_connection_layer = # your code here
skip_connection_layer = tf.keras.layers.Dropout(dropout)(skip_connection_layer)
skip_connection_layer = conv2d_block(skip_connection_layer, n_filters, kernel_size=3)
return skip_connection_layer
Answer:
tf.keras.layers.concatenate([upsampling_layer, conv_output])
TensorFlow Advanced Techniques Specialization
1. Question 1 Lambda layer allows to execute an arbitrary function only within a Sequential API model. False True Answer: False 2. Question 2 Which one of the following is the correct syntax for mapping an increment of 2 to the value of “x” using a Lambda layer? (tf = Tensorflow) tf.keRead more
1.
Question 1
Lambda layer allows to execute an arbitrary function only within a Sequential API model.
False
True
Answer: False
2.
Question 2
Which one of the following is the correct syntax for mapping an increment of 2 to the value of “x” using a Lambda layer? (tf = Tensorflow)
tf.keras.layers.Lambda(x: tf.math.add(x, 2.0))
tf.keras.layers.Lambda(lambda x: tf.math.add(x, 2.0))
tf.keras.Lambda(x: tf.math.add(x, 2.0))
tf.keras.layers(lambda x: tf.math.add(x, 2.0))
Answer: tf.keras.layers.Lambda(lambda x: tf.math.add(x, 2.0))
3.
Question 3
One drawback of Lambda layers is that you cannot call a custom built function from within them.
True
False
Answer: False
4.
Question 4
A Layer is defined by having “States” and “Computation”. Consider the following code and check all that are true:
def call(self, inputs): performs the computation and is called when the Class is instantiated.
You use def build(self, input_shape): to create the state of the layers and specify local input states.
In def __init__(self, units=32): you use the super keyword to initialize all of the custom layer attributes
Answer: You use def build(self, input_shape): to create the state of the layers and specify local input states.
5.
Question 5
Consider the following code snippet.
What are the function modifications that are needed for passing an activation function to this custom layer implementation?
Answer:
def __init__(self, units=32, activation=None):
.
.
self.activation = tf.keras.activations.get(activation)
def call(self, inputs):
return self.activation(tf.matmul(inputs, self.w) + self.b)
See lessTensorFlow-Advanced-Techniques-Specialization Week2
1. Question 1 One of the ways of declaring a loss function is to import its object. Is the following code correct for using a loss object? True False Answer: False 2. Question 2 It is possible to add parameters to the object call when using the loss object. True False Answer: True Read more
1.
Question 1
One of the ways of declaring a loss function is to import its object. Is the following code correct for using a loss object?
True
False
Answer: False
2.
Question 2
It is possible to add parameters to the object call when using the loss object.
True
False
Answer: True
3.
Question 3
You learned that you can do hyperparameter tuning within custom-built loss functions by creating a wrapper function around the loss function with hyperparameters defined as its parameter. What is the purpose of creating a wrapper function around the original loss function?
No particular reason, it just looks neater this way.
The loss ( model.compile(…, loss = ) ) expects a function that is only a wrapper function to the loss function itself.
That’s one way of doing it. We can also do the same by passing y_true, y_pred and threshold as parameters to the loss function itself.
The loss ( model.compile(…, loss = ) ) expects a function with two parameters, y_true and y_pred, so it is not possible to pass a 3rd parameter (threshold) to the loss function itself. This can be achieved by creating a wrapper function around the original loss function.
Answer: The loss ( model.compile(…, loss = ) ) expects a function with two parameters, y_true and y_pred, so it is not possible to pass a 3rd parameter (threshold) to the loss function itself. This can be achieved by creating a wrapper function around the original loss function.
4.
Question 4
One other way of implementing a custom loss function is by creating a class with two function definitions, init and call.
Which of the following is correct?
We pass y_true and y_pred to the init function, the hyperparameter (threshold) to the call function.
We pass the hyperparameter (threshold) , y_true and y_pred to the call function, and the init function returns the call function.
We pass the hyperparameter (threshold) to the init function, y_true and y_pred to the call function.
We pass the hyperparameter (threshold) , y_true and y_pred to the init function, and the call function returns the init function.
Answer:We pass the hyperparameter (threshold) to the init function, y_true and y_pred to the call function.
5.
Question 5
The formula for the contrastive loss, the function that is used in the siamese network for calculating image similarity, is defined as following:
Check all that are true:
If the euclidean distance between the pair of images is low then it means the images are similar.
Y is the tensor of details about image similarities.
Ds are 1 if images are similar, 0 if they are not.
Margin is a constant that we use to enforce a maximum distance between the two images in order to consider them similar or different from one another.
Answer:
TensorFlow Advanced Techniques Specialization Week 1
Question 1 Which of these steps are needed for building a model with the Functional API? (Select three from the list below) Explicitly define an input layer to the model. Define the input layer of the model using any Keras layer class (e.g., Flatten(), Dense(), …) Define disconnected intermediate laRead more
Question 1
Which of these steps are needed for building a model with the Functional API? (Select three from the list below)
Explicitly define an input layer to the model.
Define the input layer of the model using any Keras layer class (e.g., Flatten(), Dense(), …)
Define disconnected intermediate layers of the model.
Connect each layer using python functional syntax.
Define the model using the input and output layers.
Define the model using only the output layer(s).
Answer: 1, 4, 5(Answer)
Question 2
Is the following code correct for building a model with the Sequential API?
False
True
Answer:False
3.
Question 3
Only a single input layer can be defined for a functional model.
False
True
Answer: False
4.
Question 4
What are Branch Models ?
A model architecture with a single recurring path.
A model architecture where you can split the model into different paths, and cannot merge them later.
A model architecture with non-linear topology, shared layers, and even multiple inputs or outputs.
A model architecture with linear stack of layers.
Answer:A model architecture with non-linear topology, shared layers, and even multiple inputs or outputs.
5.
Question 5
One of the advantages of the Functional API is the option to build branched models with multiple outputs, where different loss functions can be implemented for each output.
True
False
Answer: True
6.
Question 6
A siamese network architecture has:
2 inputs, 2 outputs
1 input, 1 output
2 inputs, 1 output
1 input, 2 outputs
Answer: 2 inputs, 1 output
7.
Question 7
What is the output of each twin network inside a Siamese Network architecture?
A softmax probability
An output vector
Binary value, 1 or 0
A number
Answer:An output vector
8.
Question 8
What is the purpose of using a custom contrastive loss function for a siamese model?
A custom loss function is required for using the RMSprop() optimizer.
As a custom built function, it provides better results and it is faster to run.
A custom built function is required because it is not possible to use a built-in loss function with the Lambda layer.
It is a custom built function that can calculate the loss on similarity comparison between two items.
Answer: It is a custom built function that can calculate the loss on similarity comparison between two items.