After upgrading tensorflow to tensorflow-1.0.0-cp27-cp27mu-manylinux1_x86_64.whl, the original code runs into error
Traceback (most recent call last):
File "training.py", line 65, in <module>
obj.training()
File "/data/home/vimos/Public/git/github/hotel-revenue/revenueml/revenueml/train/split.py", line 264, in training
getattr(self.trainer, "{}_train".format(method))(**ins))
File "/data/home/vimos/Public/git/github/hotel-revenue/revenueml/revenueml/train/trainer.py", line 103, in tffm_train
fm.fit(self.x_train, y_train, self.punishment, n_epochs=n_epochs, show_progress=True)
File "/data/home/vimos/Public/git/github/hotel-revenue/revenueml/revenueml/tffm/base.py", line 247, in fit
self.core.build_graph()
File "/data/home/vimos/Public/git/github/hotel-revenue/revenueml/revenueml/tffm/core.py", line 214, in build_graph
self.init_main_block()
File "/data/home/vimos/Public/git/github/hotel-revenue/revenueml/revenueml/tffm/core.py", line 180, in init_main_block
self.pow_matmul(i, in_pows[pow_idx]),
File "/data/home/vimos/Public/git/github/hotel-revenue/revenueml/revenueml/tffm/core.py", line 122, in pow_matmul
x_pow = pow_wrapper(self.train_x, pow, self.input_type)
File "/data/home/vimos/Public/git/github/hotel-revenue/revenueml/revenueml/tffm/core.py", line 261, in pow_wrapper
return tf.SparseTensor(X.indices, tf.pow(X.values, p), X.shape)
AttributeError: 'SparseTensor' object has no attribute 'shape'
After upgrading tensorflow to
tensorflow-1.0.0-cp27-cp27mu-manylinux1_x86_64.whl
, the original code runs into errorI fixed this using
Hope this fix is right and be helpful to others.