rstudio/tensorflow

set_shape([None]) in R Tensorflow

langzeng opened this issue · 2 comments

Hi, I'm trying to implement a tf function (which works in Python Tensorflow) in R.Tensorflow. Could you please show me how to translate the python code "loc.set_shape([None])" in R?

"loc" is a location mask that will be passed to tf.boolean_mask(tensor, mask=loc). I'm using loc.set_shape([None]) because the shape of loc is dynamic and I follow the advice from
https://stackoverflow.com/questions/48978984/tensorflow-boolean-mask-with-dynamic-mask/48986289#48986289

Thank you in advance!

what happens if you call loc$set_shape(list(NULL))?

It works! Thank you very much.