티스토리 뷰
Tech/Troubleshooting
AttributeError: module 'tensorflow' has no attribute 'set_random_seed'
Ellie Kim 2020. 4. 16. 14:00seed = 0
numpy.random.seed(seed)
tf.set_random_seed(seed)
seed값을 생성해 주는데 AttributeError: module 'tensorflow' has no attribute 'set_random_seed' 에러가 발생했다.
문서를 확인해보니 변경되었다.
tf.set_random_seed(seed)
대신 아래와 동일하게 사용해주면 된다.
tf.random.set_seed(seed)
https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/random/set_seed
tf.random.set_seed | TensorFlow Core r2.0
Sets the graph-level random seed. Aliases: tf.compat.v2.random.set_seed tf.random.set_seed(seed) Used in the tutorials: Operations that rely on a random seed actually derive it from two seeds: the graph-level and operation-level seeds. This sets the graph-
www.tensorflow.org
'Tech > Troubleshooting' 카테고리의 다른 글
나만 몰랐던 스위프트 willSet, didSet의 이야기 (0) | 2020.06.18 |
---|---|
Command PhaseScriptExecution failed with a nonzero exit code (1) | 2020.04.26 |
Verify developer APP certificate문제 (0) | 2020.04.10 |
이미지뷰에 Tap Gesture Recognizer가 인식되지 않는 현상 (0) | 2020.04.06 |
깃 한글 파일명 포함 해결 (0) | 2020.03.24 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- swift5
- ios
- 스위프트UI
- 책 추천
- ReactiveX
- SWIFT
- objc
- Xcode
- 딥러닝
- 스위프트
- 알고리즘
- iOS SwiftUI
- objective-c
- 책 후기
- ARC
- 책
- stanford SwiftUI
- Algorithm
- leetcode
- 문자열
- 머신러닝
- rxswift
- 독서
- Deep learning
- 애니메이션
- wwdc
- string
- RX
- Animation
- swiftUI
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
글 보관함