MarvinTeichmann / tensorflow-fcn

An Implementation of Fully Convolutional Networks in Tensorflow.
MIT License
1.1k stars 433 forks source link

running error from "python test_fcn32_vgg.py" #20

Closed amiltonwong closed 7 years ago

amiltonwong commented 7 years ago

Hi, all,

I got the following error when running "python test_fcn32_vgg.py"

InternalError (see above for traceback): Dst tensor is not initialized.
     [[Node: fc6/weights/Initializer/Const = Const[_class=["loc:@fc6/weights"], dtype=DT_FLOAT, value=Tensor<type: float shape: [7,7,512,4096] values: [[[1.9745843e-05 0.00035308721 -0.0018327669]]]...>, _device="/job:localhost/replica:0/task:0/gpu:0"]()]]

My version of tf is r0.12.1 and I checkout the package (bf9400c6303826e1c25bf09a3b032e51cef57e3b) already. Could someone suggest me how to fix it?

THX!

MarvinTeichmann commented 7 years ago

I do not get this error using the pip build version '0.12.1' and commit (bf9400c6303826e1c25bf09a3b032e51cef57e3b). I suspect this is a tensorflow error. I would suggest trying to install tf version 1 in a virtualenv and test whether it still occurs.

amiltonwong commented 7 years ago

Thanks @MarvinTeichmann. Finally , I upgrade to version 1. And it works now :)

One info to supplement: I test both versions: tf1.0.0a0 and tf1.0.0rc0. And found that only version 1.0.0a0 works. For version 1.0.0rc0, it will prompt "tf.concat_v2" error:

Traceback (most recent call last):
  File "test_fcn32_vgg.py", line 24, in <module>
    vgg_fcn.build(batch_images, debug=True)
  File "/data/code/tensorflow-fcn/fcn32_vgg.py", line 62, in build
    bgr = tf.concat_v2([
AttributeError: 'module' object has no attribute 'concat_v2'
MarvinTeichmann commented 7 years ago

One info to supplement: I test both versions: tf1.0.0a0 and tf1.0.0rc0. And found that only version 1.0.0a0 works. For version 1.0.0rc0, it will prompt "tf.concat_v2" error:

Thanks, I have addressed this in the ReadME.

MarvinTeichmann commented 7 years ago

Ok, I have updated the code to be compatible with the newest rc version. So since commit ba49956, the tensorflow version to use is tf1.0rc0. I properly should not have gone done the path to upgrade to 1.0 that early. Did not expect so many breaking changes...