nwojke / cosine_metric_learning

Deep Cosine Metric Learning for Person Re-identification
GNU General Public License v3.0
586 stars 201 forks source link

Tensorflow version #70

Open SpawN1337 opened 4 years ago

SpawN1337 commented 4 years ago

Contrib packages apparently are not very stable. So they may change between versions so what tf version should i use here ?

pvti commented 4 years ago

tensorflow version 1.15.0 worked for me while tf ver >2.0 yields errors due to contrib packages. The author recommended tf 1.14.0. Have a try!

joseph-cv commented 4 years ago

Hey, try this:

""" OLD """

import tensorflow as tf

import tensorflow.contrib.slim as slim

""" NEW """ import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import tf_slim as slim """*****"""

(I'm using tensorflow 2.3.1)

PHCLenzi commented 2 years ago

Hello @pvtien96 . Can you tell me if there is somewhere a list with the versions of the required packages? Thanks!

sgarcesh commented 2 years ago

Hey, try this:

""" OLD """ #import tensorflow as tf #import tensorflow.contrib.slim as slim """ NEW """ import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import tf_slim as slim """*****"""

(I'm using tensorflow 2.3.1)

Doing that suggestion I had another problem with the code.

Error: AttributeError: module 'tf_slim' has no attribute 'variable_scope'

That is on network_definition.py file. Someone can help? Thank you

yesmineht commented 1 year ago

@sgarcesh i got the same error as yours, did you find a solution ?