fuyuan-li / tensorflow-RIMs

A tensorflow implementation of Recurrent Independent Mechanisms Goyal et al. 2019
Other
7 stars 3 forks source link

List cast to Tensor #1

Closed dvVenuto closed 3 years ago

dvVenuto commented 3 years ago

I am receiving the error:

Failed to convert object of type <class 'list'> to Tensor. Contents: [1, TensorShape([Dimension(6), Dimension(100)])]. Consider casting elements to a supported type.

When running the ipython notebook copying_task scripts and also in using your code in other implementations.

fuyuan-li commented 3 years ago

Thanks David. What is your tensorflow version?

dvVenuto commented 3 years ago

I am using 1.9.0 right now

fuyuan-li commented 3 years ago

My implementation and samples are for 2.0+. Is it possible to upgrade TF version? I'm also happy to make this compatible to both 1.x and 2.x. Any ideas?

dvVenuto commented 3 years ago

Upgraded to 2.2 and its working

fuyuan-li commented 3 years ago

Thanks, David! Yes I remembered some differences in syntax between TF1.x and TF2.x might cause this.