Question

In: Computer Science

Using Python. In this question, you are expected to use TensorFlow and Keras to perform a...

Using Python.

In this question, you are expected to use TensorFlow and Keras to perform a deep learning process for creating an image classifier to distinguish between dog and cat. You should follow fchollet’s code to create the classifier and test this classifier with one test photo of dog and one test photo cat. Create a screenshot to show the classifying results of these two test photos. The dog and cat in the test photos should not be in your original training dataset, and you may use your own pets or your neighbor’s pets.

Thankyou

use this website for reference:

https://keras.io/examples/vision/image_classification_from_scratch/

Solutions

Expert Solution

Answer :

/ C++ program to create point class

#include <iostream>

#include <cmath>

using namespace std;

class point

{

private:

double x,y;

public:

point();

double getX();

double getY();

void shift(double x_amount, double y_amount);

void rotate90();

bool operator==(point &other);

};

// default constructor to set x and y to 0

point::point() : x(0), y(0)

{}

// return the x-coordinate

double point::getX()

{

return x;

}

// return the y-coordinate

double point::getY()

{

return y;

}

// shift x and y by x_amount and y_amount

void point::shift(double x_amount, double y_amount)

{

x += x_amount;

y += y_amount;

}

// rotate the point by 90 degrees in counterclockwise

void point::rotate90()

{

double temp = x;

x = -y;

y = temp;

}

// returns true if both points are equal else false

bool point::operator ==(point &other)

{

const double EPSILON = 1e-5;

return((fabs(getX()-other.getX()) < EPSILON) && (fabs(getY()-other.getY()) < EPSILON) );

}

//end of point class

// non-member function returns the number of rotations needed to move p into the upper-left quadrant (where x<0, y>0)

int rotations_needed(point p)

{

int count=0;

// loop continues until point p is in third quadrant

while(!((p.getX() <= 0) && (p.getY() >= 0)))

{

count++;

p.rotate90();

}

return count;

}

// non-member function rotate p to move it to the upper-left quadrant

void rotate(point &p)

{

// loop continues until point p is in third quadrant

while(!((p.getX() <= 0) && (p.getY() >= 0)))

{

p.rotate90();

}

}

//end of program

Hi sir, please give 2 to 3 hours I will reupload the answer. Here I had signals problem that's why I asking time.

I hope this answer is helpful to you. Please Upvote(Thums Up) my answer, I'm need of it, Thank you.


Related Solutions

Python #For question 1 and 2 you may not use ''' ''' Question 1 Print the...
Python #For question 1 and 2 you may not use ''' ''' Question 1 Print the messages below without using variables. Output must be 2 lines identical to below: What is the snake's favorite language? "I love Python", said the snake. Question 2 Write a python statements to match the 5 lines of output below. Use a single print statement to produce the list of 4 languages The 3 most popular programming languages of 2020 are: 1.         Python 2.         Javascript 3.         Java 4.         C#...
Using Python Question 1 Write an input function. Then use it to supply the input to...
Using Python Question 1 Write an input function. Then use it to supply the input to following additional functions: i) Print multiplication table of the number from 1 to 12. ii) Print the sum of all the numbers from 1 to up the number given. iii) Print if the number supplied is odd or even. Question 2 Write function that asks for input from a user. If the user types 'end', the program exits, otherwise it just keeps going.
Using Tkinter for GUI, A Python program that will allow the user to perform (i) generate...
Using Tkinter for GUI, A Python program that will allow the user to perform (i) generate RSA keys, (ii) encrypt a given message and (iii) decrypt the message without using any cryptographic library. Your program will generate the values of p unless the user provides them manually. Then the program will generate the keys (private and public). Then the program will allow the user to enter his/her message to be encrypted. Finally, the program will perform the decryption operation as...
you may not use the Python ord() or chr() functions you may not use the Python...
you may not use the Python ord() or chr() functions you may not use the Python ord() or chr() functions you may not use the Python ord() or chr() functions You will write a total of four functions, each of which will take two inputs and return a string: c_encrypt() c_decrypt() vig_encrypt() vig_decrypt() The first argument will be a string containing the plaintext (or clear text) message to be encrypted for the two encrypt functions, and a string containing a...
C++ coding question From the text file given to you- “worldpop.txt”, perform the following tasks using...
C++ coding question From the text file given to you- “worldpop.txt”, perform the following tasks using Boolean function. PS-*Write separate codes for each task* Task 1. Display the names of the countries with: 1. Population >=1000,000,000 2. Population <= 1000,000 Task 2. Display the names of the first 10 countries Task 3. Display the names of the last 10 countries contents of worldpop.txt: Afghanistan 32738376 Akrotiri 15700 Albania 3619778 Algeria 33769669 Andorra 72413 Angola 12531357 Anguilla 14108 Argentina 40677348 Armenia...
Solving Problems Using Recursion (Python): To solve the problem, you have to use recursion and cannot...
Solving Problems Using Recursion (Python): To solve the problem, you have to use recursion and cannot use for or while loops to solve the problems as well as not using global variables. 1. Create a function that takes a positive integer and returns it with neighboring digits removed. Do not convert the integer to a list. Ex. Input = [5555537777721] Output = [53721]
Suppose you want to use Naive Bayes to perform document classification (binary clas- sification) using the...
Suppose you want to use Naive Bayes to perform document classification (binary clas- sification) using the bag of words model where we have D documents and a total of n words. How many probabilities would a Naive Bayes classifier need to learn? Suppose, your boss says, change the order of sentences in each document and re-learn the Naive Bayes classifier, do you expect the learned model to be different? Briefly explain
Question 12.20 – Use these data - incidents of reports of underage drinking – to perform...
Question 12.20 – Use these data - incidents of reports of underage drinking – to perform the following: “Dry” campus, state school: 47, 52, 27, 50 “Dry” campus, private school: 25, 33, 31 “Wet” campus, state school: 77, 61, 55, 48 “Wet” campus, private school: 52, 68, 60 a.) Calculate the cell and marginal means. Notice the unequal Ns b.) Draw a bar graph. c.) Calculate the five different degrees of freedom, and indicate the critical F value based on...
Solve using PYTHON 3 and use functions. You have been hired by a restaurant named "Burger...
Solve using PYTHON 3 and use functions. You have been hired by a restaurant named "Burger Shack" Per the client, you have the following information: the client’s name, burger’s name, time of the day, and the total bill. By the end of the day, your program will provide the following information: 1. Top three best clients (highest bills) 2. Name of the client with the second-to-last lowest bill 3. Busiest hour of the day (number of clients) Assumptions: 1. doesn't...
Question #11 – Regression Analysis Use the data provided to: Perform the “Tests to Check the...
Question #11 – Regression Analysis Use the data provided to: Perform the “Tests to Check the Validity of a Regression” Show both the calculated and critical values Estimate Y when X = 4 (round to 2 decimal places) Use a level of significance of 5% (α = .05). Clearly show the null and alternate hypothesis. Graphs are not required. X Y 3 14 7 26 6 23 4 17 7 28 5 20 8 29 2 11
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT