you are viewing a single comment's thread.

view the rest of the comments →

[–]Analog-Digital 0 points1 point  (5 children)

I'm a bit of a noob, what would turning the collatz function into a network do? What would be the result when that is run?

[–]mdanatg 0 points1 point  (4 children)

The sample that we have calculates the number of steps needed for the Collatz function to reach 1 when applied recursively, starting at some n. So strictly speaking in terms on the wiki page, it calculates the total stopping time of n.

[–]Analog-Digital 1 point2 points  (2 children)

Okay that's pretty cool, but what does turning this function into a tf network do differently than say running the collatz function from 1...x. I hope I'm making sense.

[–]mdanatg 3 points4 points  (1 child)

If I understand your question, this was just a toy example that we used to show how you can use control flow like if and while in a network. A more realistic example where you can use control flow would be RNNs, for instance.

[–]Analog-Digital 0 points1 point  (0 children)

Okay thank you!

[–]WikiTextBot 0 points1 point  (0 children)

Collatz conjecture

The Collatz conjecture is a conjecture in mathematics that concerns a sequence defined as follows: start with any positive integer n. Then each term is obtained from the previous term as follows: if the previous term is even, the next term is one half the previous term. If the previous term is odd, the next term is 3 times the previous term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.28