cellassign icon indicating copy to clipboard operation
cellassign copied to clipboard

Remove invalid chunk from introduction vignette

Open rargelaguet opened this issue 5 years ago • 1 comments

The following chunk is not valid for tensorflow 2:

sess = tf$Session()
hello <- tf$constant('Hello, TensorFlow!')
sess$run(hello)

returns:

Error in py_get_attr_impl(x, name, silent) : 
  AttributeError: module 'tensorflow' has no attribute 'Session'

rargelaguet avatar Apr 27 '20 16:04 rargelaguet

You can execute

tf <- tf$compat$v1;
tf$disable_v2_behavior()

before executing the chunk of code you mentioned to resolve the problem,

chanwkimlab avatar Apr 28 '20 05:04 chanwkimlab