Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:18
    truongsinh synchronize #959
  • 15:04
    truongsinh synchronize #959
  • 15:02
    truongsinh edited #959
  • 15:02
    googlebot labeled #959
  • 15:02
    tfdocsbot labeled #959
  • 15:02
    tfdocsbot labeled #959
  • 15:01
    truongsinh review_requested #959
  • 15:01
    truongsinh review_requested #959
  • 15:01
    truongsinh opened #959
  • 05:49
    kokoro-team unlabeled #958
  • 05:48
    tfdocsbot labeled #958
  • 05:48
    tfdocsbot labeled #958
  • 01:13
    tfdocsbot labeled #958
  • 01:13
    tfdocsbot labeled #958
  • 01:13
    googlebot labeled #958
  • 01:13
    yukinagae review_requested #958
  • 01:13
    yukinagae opened #958
  • 01:13
    yukinagae review_requested #958
  • Aug 23 18:15
    TensorFlow-Docs-Copybara closed #952
  • Aug 23 18:07
    kokoro-team unlabeled #952
Anubhav
@anubh-v
I see. Thanks for the answer @lamberta
HarikrishnanBalagopal
@HarikrishnanBalagopal
@lamberta given a video dataset, how do you sample fixed length random patches from videos?
the shape of the dataset is (num_videos, video_length, height, width, channels) where video_length is different for each video in the dataset
tf.data.Dataset.from_tensor_slices doesn't work with this
Billy Lamberta
@lamberta
@HarikrishnanBalagopal probably a better question for stackoverflow. though i'd like to get a video dataset tutorial if we can get it to work in colab ok
HarikrishnanBalagopal
@HarikrishnanBalagopal
?
That is lacking information about the return value
What is the shape of the returned tensor?
@lamberta ^
is the returned tensor of shape (batch, in_planes, in_rows, in_cols, *ksizes) ?
HarikrishnanBalagopal
@HarikrishnanBalagopal
hey
anyone here?
tensorflow could really use its own support channel
Billy Lamberta
@lamberta
perhaps, but this ain't it :)
HarikrishnanBalagopal
@HarikrishnanBalagopal
I am getting weird behaviour with tf.function
if I define a training step as a function with the @tf.function annotation and then call the function in a loop the model trains
but if I move the loop into the function then it does not train the model
for instance this doesn't work https://bpaste.net/show/23C2
it fails to train the model
the documentation for @tf.function is not detailed enough to explain this
Billy Lamberta
@lamberta
work in progress. check out this detailed section on autograph/tf.function: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/autograph/g3doc/reference/index.md
HarikrishnanBalagopal
@HarikrishnanBalagopal
it seems to be the while loop causing the issue
or not
very hard to debug
Billy Lamberta
@lamberta
Check out https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/autograph/g3doc/reference/debugging.md
I'm sure they would love feedback/PRs on it. Still early for their docs, though
HarikrishnanBalagopal
@HarikrishnanBalagopal
I am wondering if this is a google colab issue, if I include the loop inside the @tf.function then sometimes it goes into an infinite loop
might have crashed the runtime and colab just not updating
@lamberta uh the example they give there is slightly incorrect
original function
@tf.function
def f(a):
  pdb.set_trace()
  if a > 0:
    tf.print(a, 'is positive')
during debugging
>l
      8 def f(a):
      9   pdb.set_trace()
---> 10   tf.print(a)
     11   if a > 0:
     12     tf.print('is positive')
where did the extra tf.print(a) line come from?
HarikrishnanBalagopal
@HarikrishnanBalagopal
HarikrishnanBalagopal
@HarikrishnanBalagopal
@lamberta ok I figured it out, you can't use for i in range(64): or something like that since its python objects
you have to use for i in tf.range(64): for it to get converted to tf ops by @tf.function
Billy Lamberta
@lamberta
nice. might be worth a PR to those tf.function docs
HarikrishnanBalagopal
@HarikrishnanBalagopal
with that fix it no longer goes into an infinite loop
while loop also seems to work
@lamberta where tho
it also already kind of mentioned in the docs
Key Point: Only statements that are conditioned on, or iterate over, a TensorFlow object such as tf.Tensor, are converted into TensorFlow ops.
HarikrishnanBalagopal
@HarikrishnanBalagopal
@lamberta are there any plans to add a simple way to release GPU memory?
I have a lot of tests for functions that build networks. These tests create temporary networks, run them once and finish
However looking in tensorboard and also at GPU memory usage in google colab, the memory is not getting released
TruongSinh Tran-Nguyen
@truongsinh
Noobs question, how can I generate HTML for https://github.com/tensorflow/docs locally? python3 setup.py build only generate egg file
Reuben Morais
@reuben
@truongsinh you can't, you can only build markdown but then you have to render it yourself. I built some simple tooling around it for creating docsets, maybe it'll be useful for you:
it doesn't look nearly as refined as the official docs though, for that you'll have to scrape the website