rstudio / tensorflow

TensorFlow for R

Home Page:https://tensorflow.rstudio.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

set_shape([None]) in R Tensorflow

langzeng opened this issue · 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.