FSRCNN_Tensorflow icon indicating copy to clipboard operation
FSRCNN_Tensorflow copied to clipboard

version of tensorflow and python

Open Jialeen opened this issue 4 years ago • 2 comments

Hi, I wonder the version of tensorflow and python. I run the code and it gives me message that the version is not matched.

Thanks.

Jialeen avatar Jun 08 '20 08:06 Jialeen

Hi, I wonder the version of tensorflow and python. I run the code and it gives me message that the version is not matched.

Thanks.

Hi Jialeen,

I am pretty sure it was python 2.7, although I am not sure about tensorflow, my guess would be 1.12.0. I can double check for you somewhere later this week. It should work with most combinations though. Could you perhaps show me the exact error you are getting?

Saafke avatar Jun 08 '20 13:06 Saafke

Hi, I wonder the version of tensorflow and python. I run the code and it gives me message that the version is not matched. Thanks.

Hi Jialeen,

I am pretty sure it was python 2.7, although I am not sure about tensorflow, my guess would be 1.12.0. I can double check for you somewhere later this week. It should work with most combinations though. Could you perhaps show me the exact error you are getting?

The error is as follows: tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'dilations' not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_HALF, DT_FLOAT]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=["SAME", "VALID"]; attr=data_format:string,default="NHWC",allowed=["NHWC", "NCHW"]>; NodeDef: conv1 = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](_arg_IteratorGetNext_0_0/_1, f1). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). [[Node: conv1 = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](_arg_IteratorGetNext_0_0/_1, f1)]]

Caused by op u'conv1', defined at: File "main.py", line 102, in run.testFromPb(args.image) File "/home/yujialin/code/sr_cnn/FSRCNN_Tensorflow/run.py", line 243, in testFromPb graph = self.load_pb(pbPath) File "/home/yujialin/code/sr_cnn/FSRCNN_Tensorflow/run.py", line 233, in load_pb tf.import_graph_def(graph_def, name='') File "/home/yujialin/anaconda3/envs/tf1.10/lib/python2.7/site-packages/tensorflow/python/framework/importer.py", line 313, in import_graph_def op_def=op_def) File "/home/yujialin/anaconda3/envs/tf1.10/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2956, in create_op op_def=op_def) File "/home/yujialin/anaconda3/envs/tf1.10/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1470, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): NodeDef mentions attr 'dilations' not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_HALF, DT_FLOAT]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=["SAME", "VALID"]; attr=data_format:string,default="NHWC",allowed=["NHWC", "NCHW"]>; NodeDef: conv1 = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](_arg_IteratorGetNext_0_0/_1, f1). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). [[Node: conv1 = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](_arg_IteratorGetNext_0_0/_1, f1)]]

Python=2.7, tensorflow=1.12 can work.

Jialeen avatar Jun 12 '20 02:06 Jialeen