1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lord [1]
2 years ago
7

Choose the 3 correct statements for the code below.

Computers and Technology
1 answer:
Nookie1986 [14]2 years ago
4 0

Answer:

True

False

True

False

True

Explanation:

So I'll go through each statement and explain why or why not they're correct.

An object of the ActivationLayer class has a name attribute. So because ActivationLayer is inheriting the BaseLayer and it's calling super().__int__("Activation") it's going to call the BaseLayer.__init__ thus setting a name attribute equal to "Activation" for any ActivationLayer object that is initalized. So this is true

An object of the BaseLayer class has a size attribute. While it is true that FC layer is inheriting from BaseLayer and it has a size attribute, this does nothing to change the BaseLayer class. So any object initialized to a BaseLayer object will only have the instance attribute "self.name". So this is false

print(FCLayer(42)) prints FullyConnectedLayer. So whenever you print an object, it tries to convert the object to a string using the __str__ magic method, but if that wasn't defined it then tries the __repr__ method, which the FCLayer class technically doesn't define, but it inherits it from the BaseLayer class. And since whenever you define an FCLayer object it calls super().__init__ with "FullyConnected", which will then be assigned to the instance variable self.name,  it will print "FullyConnectedLayer". So this is true

When creating an object of the ActivationLayer class, the size argument must be given. This is true, because the size is a parameter of the __init__ method of ActivationLayer, it is not an optional parameter, and is something that must be passed otherwise an error will be raised. So this is false

When creating an object of the BaseLayer class, the name argument must be given. This is not true, because name is a default argument. This means if you do not pass an argument for name, then name will equal an empty string

You might be interested in
Which of these IP addresses is not a valid address? a. 199.199.3.3 b. 192.168.258.4 c. 192.168.0.9 d. 10.10.10.40
eduard

Answer:

B. 192.168.258.4

Explanation:

The network layer in the OSI network model introduces the IP header to the data for transmission. This IP header contains the source and destination IP addresses.

IP address is a logical address given to network devices to allow routing of data to different points in a network. There are two versions of IP addresses and they are version 4 and 6.

The IP version 4 is a 32 bit address, divided into dot notations of four octet ( eight bits). Each 8 bits is equivalent to 256 possible address spaces, that is, 2^8 is equal to 256. The address space can not exceed 256.

Example of invalid IP address is 192.168.258.4, where the third octet exceeds 256.

7 0
3 years ago
In 1913, __________ developed a mass production system for cars that made it possible to produce more cars in a shorter period o
kozerog [31]

1: Henry Ford

2: Hot-air

3: Steam

4: the Wright Brothers

5:  It may be B. I don't know for certain.

6:  B?

Sorry I don't know the rest of these. :/

8 0
4 years ago
Read 2 more answers
How do you guys feel about the coronavirus and being Homeschooled
azamat
I wanna kermit because I have no willpower or motivation to do anything and my brain is shutting down
4 0
3 years ago
A higher resolution image will mean a?
suter [353]
Hsusbshsvshsvsubwksvsi ao so sis L O so eka on
3 0
3 years ago
Read 2 more answers
Binary is used to store what on a computer?<br> •Data<br> •Dates<br> •Address
solmaris [256]

Answer:

Data................

5 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program to display a message telling the educational level of a student based on their number of years of school. The us
    6·1 answer
  • ________ is the presentation of information to the user and the acceptance of the user’s commands. a.data storageb.data access l
    7·1 answer
  • Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to pu
    15·1 answer
  • C++
    8·1 answer
  • Hello I'm new to coding and in my class, we have jumped straight into coding with zero experience and or lessons, this is my fir
    14·1 answer
  • Explain the differences between apple and android
    14·2 answers
  • Work-based learning can be defined as educational experiences that focus on
    11·1 answer
  • 2.cite at least 2 example on how multimedia facilitates learning​
    6·1 answer
  • (python) Given the formula for conversion from Celsius to Fahrenheit
    10·1 answer
  • What is geospatial technology ??​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!