-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cnn_head_pose estimation: module 'tensorflow' has no attribute 'placeholder' #102
Comments
Hey , below tensor flow 2.0 would do. Tensor flow 2.0 support isn't there yet. |
Stay updated for the same. |
hi @kamathhrishi |
Downgrade to Tensor flow 1.14 |
should i uninstall the version that i have first ? |
Yeah you would have to do that or run deepgaze in a seperate conda environment or virtual env. |
ProgramComputer/deepgaze-tfv2 |
hi @mpatacchiola
i try to run the head pose estimation example but it give me un error that t cant solve it i hope that you can help me:
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
import cv2
from deepgaze.head_pose_estimation import CnnHeadPoseEstimator
sess =tf.compat.v1.Session() #Launch the graph in a session.
my_head_pose_estimator = CnnHeadPoseEstimator(sess) #Head pose estimation object
my_head_pose_estimator.load_pitch_variables("../../etc/tensorflow/head_pose/pitch/cnn_cccdd_30k.tf")
for i in range(1,9):
file_name = str(i) + ".jpg"
print("Processing image ..... " + file_name)
image = cv2.imread(file_name) #Read the image with OpenCV
pitch = my_head_pose_estimator.return_pitch(image) #Evaluate the pitch angle using a CNN
print("Estimated pitch ..... " + str(pitch[0,0,0]))
print("")
=>AttributeError Traceback (most recent call last)
in ()
5 sess =tf.compat.v1.Session() #Launch the graph in a session.
6 my_head_pose_estimator = CnnHeadPoseEstimator(sess) #Head pose estimation object
----> 7 my_head_pose_estimator.load_pitch_variables("../../etc/tensorflow/head_pose/pitch/cnn_cccdd_30k.tf")
8 for i in range(1,9):
9 file_name = str(i) + ".jpg"
1 frames
/content/gdrive/My Drive/deepgaze/deepgaze/head_pose_estimation.py in _allocate_pitch_variables(self)
231 self._num_labels = 1
232 # Input data [batch_size, image_size, image_size, channels]
--> 233 self.tf_pitch_input_vector = tf.placeholder(tf.float32, shape=(64, 64, 3))
234
235 # Variables.
AttributeError: module 'tensorflow' has no attribute 'placeholder'
note: the version of tensorflow that i use it is:(2.3.0)
what version of tensorflow shoud i reinstall,??
The text was updated successfully, but these errors were encountered: