You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the code, I get the following error. I would appreciate if someone helped me.
I have:
python 3.6
mtcnn 0.0.7
tensorflow 1.9.0 running on CPU
All installed with pip
File "<ipython-input-1-59d1cc96181f>", line 1, in <module>
runfile('D:/FaceRecognition/Main.py', wdir='D:/FaceRecognition')
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 678, in runfile
execfile(filename, namespace)
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 106, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "D:/FaceRecognition/Main.py", line 32, in <module>
main()
File "D:/FaceRecognition/Main.py", line 19, in main
addNewFace()
File "D:\FaceRecognition\Engine.py", line 30, in addNewFace
detector = MTCNN()
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\mtcnn\mtcnn.py", line 193, in __init__
self.__pnet = PNet(self.__session, False)
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\mtcnn\network.py", line 44, in __init__
self._config()
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\mtcnn\mtcnn.py", line 55, in _config
padding='VALID', relu=False)
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\mtcnn\layer_factory.py", line 123, in new_conv
kernel = self.__make_var('weights', shape=[kernel_size[1], kernel_size[0], channels_input // group, channels_output])
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\mtcnn\layer_factory.py", line 78, in __make_var
return tf.get_variable(name, shape, trainable=self.__network.is_trainable())
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 1328, in get_variable
constraint=constraint)
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 1090, in get_variable
constraint=constraint)
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 435, in get_variable
constraint=constraint)
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 404, in _true_getter
use_resource=use_resource, constraint=constraint)
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 743, in _get_single_variable
name, "".join(traceback.format_list(tb))))
ValueError: Variable pnet/conv1/weights already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\tensorflow\python\framework\ops.py", line 1740, in __init__
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\tensorflow\python\framework\ops.py", line 3414, in create_op
op_def=op_def)
File "C:\Users\kaany\Anaconda3\envs\facerec\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
The text was updated successfully, but these errors were encountered:
ylmzkaan
changed the title
ValueError
ValueError: Variable pnet/conv1/weights already exists
Jul 22, 2018
ValueError: Variable pnet/conv1/weights already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:
File "/root/anaconda3/lib/python3.6/site-packages/mtcnn/layer_factory.py", line 78, in __make_var
return tf.get_variable(name, shape, trainable=self.__network.is_trainable())
File "/root/anaconda3/lib/python3.6/site-packages/mtcnn/layer_factory.py", line 123, in new_conv
kernel = self.__make_var('weights', shape=[kernel_size[1], kernel_size[0], channels_input // group, channels_output])
File "/root/anaconda3/lib/python3.6/site-packages/mtcnn/mtcnn.py", line 55, in _config
padding='VALID', relu=False)
When I run the code, I get the following error. I would appreciate if someone helped me.
I have:
python 3.6
mtcnn 0.0.7
tensorflow 1.9.0 running on CPU
All installed with pip
The text was updated successfully, but these errors were encountered: