Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

SIKSHAPATH

SIKSHAPATH Logo SIKSHAPATH Logo

SIKSHAPATH Navigation

  • Home
  • Questions
  • Blog
    • Computer Science(CSE)
    • NPTEL
    • Startup
  • Shop
    • Internshala Answers
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • Questions
  • Blog
    • Computer Science(CSE)
    • NPTEL
    • Startup
  • Shop
    • Internshala Answers
  • About
    1. Asked: January 23, 2024In: Computer Science

      TensorFlow Advanced Techniques Specialization

      I'M ADMIN
      I'M ADMIN
      Added an answer on January 27, 2024 at 9:33 pm
      This answer was edited.

      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:

      TensorFlow Advanced Techniques Specialization

       

      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.

       

      After training, this class will return a w*X + b computation, where X is the input, w is the weight/kernel tensor with trained values, and b is the bias tensor with trained values.

       

      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.

      TensorFlow Advanced Techniques Specialization

      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 less
        • 0
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    2. Asked: January 23, 2024In: Computer Science

      TensorFlow-Advanced-Techniques-Specialization Week2

      I'M ADMIN
      Best Answer
      I'M ADMIN
      Added an answer on January 25, 2024 at 2:44 pm

      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?

      TensorFlow-Advanced-Techniques-Specialization Week2

      True

      False

      Answer: False

       

      2.

      Question 2

      It is possible to add parameters to the object call when using the loss object.

      TensorFlow-Advanced-Techniques-Specialization Week2

      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?

      TensorFlow-Advanced-Techniques-Specialization Week2

       

      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.

      TensorFlow-Advanced-Techniques-Specialization Week2

      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:

      TensorFlow-Advanced-Techniques-Specialization Week2

      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:

      • Y is the tensor of details about image similarities.
      • If the euclidean distance between the pair of images is low then it means the images are similar.
      See less
        • 0
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    3. Asked: January 23, 2024In: Computer Science

      TensorFlow Advanced Techniques Specialization Week 1

      I'M ADMIN
      Best Answer
      I'M ADMIN
      Added an answer on January 25, 2024 at 2:40 pm

      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

      TensorFlow Advanced Techniques Specialization Week 1

      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.

       

      See less
        • 0
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    4. Asked: December 31, 2023In: Computer Science

      Select all of the things you can access from the Discover section of the Welcome screen (Select all that apply.)

      I'M ADMIN
      I'M ADMIN
      Added an answer on December 31, 2023 at 9:42 pm

      Answer: 1.Go to a “how-to” video

      Answer:

      1.Go to a “how-to” video

      See less
        • 0
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    5. Asked: December 31, 2023In: Computer Science

      Versions of Tableau are forwards-compatible, but they are not backwards-compatible

      I'M ADMIN
      I'M ADMIN
      Added an answer on December 31, 2023 at 9:39 pm

      Answer: False

      Answer:

      False

      See less
        • 0
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    6. Asked: December 31, 2023In: Computer Science

      What kinds of things can you do in the Discover section of the Welcome screen?

      I'M ADMIN
      I'M ADMIN
      Added an answer on December 31, 2023 at 9:37 pm

      Answer: 3.Find how-to videos

      Answer:

      3.Find how-to videos

      See less
        • 0
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
    1 2 3 4 … 122

    Sidebar

    store ads

    Stats

    • Questions 1k
    • Answers 1k
    • Posts 149
    • Best Answers 89
    • This Free AI Tool Translates Entire Books in Minute !
    • AI News: 🎬 Hollywood’s AI Studios, 🎓 OpenAI’s Latest Gift to Educators, 🚚 Class8 Bags $22M, 🧠 Google Gemini’s Memory Upgrade
    • AI NEWS: Legal Action Against OpenAI, $16M Paid, & Elon Musk’s Praise from Investor 🤖💰📑 | AI Boosts Cloud Seeding for Water Security 🌱💧
    • AI News: 🎬AI Video Tool Scam Exposed🤯, 🛰️ AI-Powered Drones to Ukraine 😱, Google’s $20M AI Push, Sam Altman Joins SF’s Leadership Team
    • AI News: 🤝 Biden Meets Xi on AI Talks, 💡 Xavier Niel’s Advice for Europe, ♻️ Hong Kong’s Smart Bin Revolution, 🚀 AI x Huawei

    Explore

    • Recent Questions
    • Questions For You
    • Answers With Time
    • Most Visited
    • New Questions
    • Recent Questions With Time

    Footer

    SIKSHAPATH

    Helpful Links

    • Contact
    • Disclaimer
    • Privacy Policy Notice
    • TERMS OF USE
    • FAQs
    • Refund/Cancellation Policy
    • Delivery Policy for Sikshapath

    Follow Us

    © 2021-24 Sikshapath. All Rights Reserved