Programming/Python
Python/tensorflow/Erorr and Solve
현벨
2018. 3. 29. 02:26
반응형
# 오류 1
- AttributeError: module 'tensorflow' has no attribute 'mul'
# 해결
- 더 이상 mul, sub, neg를 쓰지 않는다.
- 대체됨
- multiply, subtract, negative로 바뀜.
# 오류 2
- Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
# 해결
- 경고 무시
- # Just disables the warning, doesn't enable AVX/FMA
- import os
- os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# 오류3
- Expected int32, got list containing Tensors of type '_Message' instead.
# 해결
- 버전 업이되면서 1.0부터 concat을 쓰는 방법이 다르다.
- 위 코드에서 --는 빼주고 ++ 처럼 0과 차원의 위치를 바꿔준다.
1 2 | -- means = tf.concat(0, [tf.reduce_mean(tf.gather(vectors,
++ means = tf.concat([tf.reduce_mean(tf.gather(vectors,
|
반응형