#๐Ÿ”’ Back propogation

44 messages ยท Page 1 of 1 (latest)

wild scroll
weary charmBOT
#

@wild scroll

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

wild scroll
#

ive done A

#

i dont know how to do B

#

@slow nova

#

Do u want my code on A?

#

x1 = 0.5
b1 = -0.2
b2 = 0.4
w1 = 0.2
w2 = 0.8
yt = 0.4
n1 = 0.1
def z(v):
return 1/(1+e**-v)

weary charmBOT
#

Hey @wild scroll!

It looks like you're trying to paste code into this channel.

Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
wild scroll
#

h1 = x1 * w1 + b1
O1 =z(h1) * w2 + b2
y = z(O1)
y

slow nova
#

@wild scroll I don't want to mislead you, so I'll need time to work it out on my own

wild scroll
#

๐Ÿ‘

#

U should probably check A

#

im not sure if its correct

wild scroll
#

@slow nova

#

Do u know how I can find the derivative using code

#

Like i want to find the derivative of Err

#

Err = ((1/2) * (yt - y)**2)
Err

#

How would I do that?

slow nova
#

you know that y is sigmoid(o1), and you know that o1 is sigmoid(h1)w2) + b2

#

etc

wild scroll
#

so confused

#

how do i do differntiation in python

slow nova
slow nova
#

but the first line here is the formula for updating w2. and then the first two lines of the derivative.

#

and then you'd do the same thing but replace w2 with w1

wild scroll
#

i know how to find the derivative

#

i just dont know how to write it down in code

#

and the way ur supposed to do it

#

is this

#

new weight = old weight - learning rate * partial derivative of errpr respect to weigt

slow nova
#

expressed only in terms of functions and values that are already defined

wild scroll
#

so e.g

#

nw1 = w1 - n1 * Err`

slow nova
# wild scroll nw1 = w1 - n1 * Err`

you have to actually solve the derivative until you only have operations like multiplication, division, addition, subtraction, and sigmoid.

#

once you've done all that by hand (not with python), you can then write a python statement that calculates it.

wild scroll
#

so like

#

solver it first

#

okay

weary charmBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.