{"action":"created","issue":{"url":"https://api.github.com/repos/CodingTrain/Rainbow-Topics/issues/963","repository_url":"https://api.github.com/repos/CodingTrain/Rainbow-Topics","labels_url":"https://api.github.com/repos/CodingTrain/Rainbow-Topics/issues/963/labels{/name}","comments_url":"https://api.github.com/repos/CodingTrain/Rainbow-Topics/issues/963/comments","events_url":"https://api.github.com/repos/CodingTrain/Rainbow-Topics/issues/963/events","html_url":"https://github.com/CodingTrain/Rainbow-Topics/issues/963","id":320374686,"number":963,"title":"Water ripples in tf.js","user":{"login":"nikudyshko","id":18248994,"avatar_url":"https://avatars1.githubusercontent.com/u/18248994?v=4","gravatar_id":"","url":"https://api.github.com/users/nikudyshko","html_url":"https://github.com/nikudyshko","followers_url":"https://api.github.com/users/nikudyshko/followers","following_url":"https://api.github.com/users/nikudyshko/following{/other_user}","gists_url":"https://api.github.com/users/nikudyshko/gists{/gist_id}","starred_url":"https://api.github.com/users/nikudyshko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikudyshko/subscriptions","organizations_url":"https://api.github.com/users/nikudyshko/orgs","repos_url":"https://api.github.com/users/nikudyshko/repos","events_url":"https://api.github.com/users/nikudyshko/events{/privacy}","received_events_url":"https://api.github.com/users/nikudyshko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"shiffman","id":191758,"avatar_url":"https://avatars0.githubusercontent.com/u/191758?v=4","gravatar_id":"","url":"https://api.github.com/users/shiffman","html_url":"https://github.com/shiffman","followers_url":"https://api.github.com/users/shiffman/followers","following_url":"https://api.github.com/users/shiffman/following{/other_user}","gists_url":"https://api.github.com/users/shiffman/gists{/gist_id}","starred_url":"https://api.github.com/users/shiffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiffman/subscriptions","organizations_url":"https://api.github.com/users/shiffman/orgs","repos_url":"https://api.github.com/users/shiffman/repos","events_url":"https://api.github.com/users/shiffman/events{/privacy}","received_events_url":"https://api.github.com/users/shiffman/received_events","type":"User","site_admin":false},"assignees":[{"login":"shiffman","id":191758,"avatar_url":"https://avatars0.githubusercontent.com/u/191758?v=4","gravatar_id":"","url":"https://api.github.com/users/shiffman","html_url":"https://github.com/shiffman","followers_url":"https://api.github.com/users/shiffman/followers","following_url":"https://api.github.com/users/shiffman/following{/other_user}","gists_url":"https://api.github.com/users/shiffman/gists{/gist_id}","starred_url":"https://api.github.com/users/shiffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiffman/subscriptions","organizations_url":"https://api.github.com/users/shiffman/orgs","repos_url":"https://api.github.com/users/shiffman/repos","events_url":"https://api.github.com/users/shiffman/events{/privacy}","received_events_url":"https://api.github.com/users/shiffman/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-05-04T18:05:42Z","updated_at":"2018-05-15T14:00:14Z","closed_at":null,"author_association":"NONE","body":"During live session I've noticed, that this pseudo-code\r\n```\r\nfor every non-edge element:\r\nloop\r\n    Buffer2(x, y) = (Buffer1(x - 1, y) +\r\n                     Buffer1(x + 1, y) +\r\n                     Buffer1(x, y + 1) +\r\n                     Buffer1(x, y - 1)) / 2 - Buffer2(x, y)\r\n                     Buffer2(x, y) = Buffer2(x, y) * damping\r\nend loop\r\n```\r\ncan be rewritten in terms of matrices: \r\n```\r\nBuffer2 = conv2d(Buffer1, kernel) - Buffer2 \r\nBuffer2 *= damping\r\n``` \r\nwhere `kernel` is a 3*3 matrix of the following \r\n```\r\n[[0.0  0.5  0.0], \r\n [0.5  0.0  0.5], \r\n [0.0  0.5  0.0]]\r\n``` \r\nPerhaps, it would be easier to explain what is convolution on this example"},"comment":{"url":"https://api.github.com/repos/CodingTrain/Rainbow-Topics/issues/comments/389177337","html_url":"https://github.com/CodingTrain/Rainbow-Topics/issues/963#issuecomment-389177337","issue_url":"https://api.github.com/repos/CodingTrain/Rainbow-Topics/issues/963","id":389177337,"user":{"login":"umchoyka","id":12286345,"avatar_url":"https://avatars3.githubusercontent.com/u/12286345?v=4","gravatar_id":"","url":"https://api.github.com/users/umchoyka","html_url":"https://github.com/umchoyka","followers_url":"https://api.github.com/users/umchoyka/followers","following_url":"https://api.github.com/users/umchoyka/following{/other_user}","gists_url":"https://api.github.com/users/umchoyka/gists{/gist_id}","starred_url":"https://api.github.com/users/umchoyka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/umchoyka/subscriptions","organizations_url":"https://api.github.com/users/umchoyka/orgs","repos_url":"https://api.github.com/users/umchoyka/repos","events_url":"https://api.github.com/users/umchoyka/events{/privacy}","received_events_url":"https://api.github.com/users/umchoyka/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T14:00:14Z","updated_at":"2018-05-15T14:00:14Z","author_association":"NONE","body":"Hi @meiamsome,\r\n\r\nOn the tensorflow implementation: \r\n\r\nSince tf.toPixels is an asynchronous function, and tf.tidy doesn't clean up after any promised function calls, I wonder if that may be why there is an apparent memory leak.\r\n\r\nI haven't been able to find any resolution to the problem though. I tried converting the instance function to an async function and using **await** but tf.tidy throws an exception if you try to use async.\r\n\r\nOddly, it does not appear that tf.toPixels ([source](https://github.com/tensorflow/tfjs-core/blob/v0.8.1/src/ops/array_ops.ts#L610-L687)) creates any tensors, so I'm not sure where the extra tensor is being generated. Perhaps a copy of the tensor is being created when passed as a parameter?"}}
{"actor":{"display_login":"umchoyka"}}