CIHP_PGN
CIHP_PGN copied to clipboard
TypeError: unsupported operand type(s) for /: 'Dimension' and 'int'
I run the code test_pgn.py ,but I come across this problem TypeError: unsupported operand type(s) for /: 'Dimension' and 'int'
I get the same issue. I change shape=[k_h, k_w, c_i / group, c_o] to shape=[k_h, k_w, int(c_i) / group, c_o] and it work fine for me.
True.
Or, you can use .as_list() for example c_i = input.get_shape().as_list()[-1] for the c_i
@leo19980219 @finde I make changes as you said and it resolved this issue but now it throw another error.
File "test_pgn.py", line 112, in main for xx in xrange(14): NameError: name 'xrange' is not defined
I have resolved this issue. It's because python version difference. xrange() is function in python 2.x which can be replaced with range() if you are using python 3.x. so just replace xrange() with range().
I run the code test_pgn.py ,but I come across this problem TypeError: unsupported operand type(s) for /: 'Dimension' and 'int'
replace / to //