Facenet-Real-time-face-recognition-using-deep-learning-Tensorflow icon indicating copy to clipboard operation
Facenet-Real-time-face-recognition-using-deep-learning-Tensorflow copied to clipboard

issue regarding tenserflow

Open bilalimran1412 opened this issue 5 years ago • 2 comments

AttributeError Traceback (most recent call last) in 5 6 obj=preprocesses(input_datadir,output_datadir) ----> 7 nrof_images_total,nrof_successfully_aligned=obj.collect_data() 8 9 print('Total number of images: %d' % nrof_images_total)

~\testing new\preprocess.py in collect_data(self) 22 23 dataset = facenet.get_dataset(self.input_datadir) ---> 24 with tf.compat.v1.Graph().as_default(): 25 gpu_options = tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction=0.5) 26 sess = tf.compat.v1.Session(config=tf.ConfigProto(gpu_options=gpu_options, log_device_placement=False))

AttributeError: module 'tensorflow' has no attribute 'Session'

This is my error i have tried adding v1.compat it worked for some lines but here it sis giving error

bilalimran1412 avatar Dec 07 '19 21:12 bilalimran1412

make sure you are using the correct TensorFlow version as Session has been deprecated in 2.0

gaurav0535 avatar Jan 06 '20 19:01 gaurav0535

Install proper version of libraries. library list is given here.

shankarvishnu avatar May 22 '20 10:05 shankarvishnu