Keras에서 사용하는 Backend가 "Theano"를 사용했기 때문에 발생한 문제이다.
내가 실행하려고 하는 딥러닝 아키텍처가 Tensorflow Backend 기반으로 작성되었기에 발생하는 오류
get_shape()를 int_shape()로 변경해보고, 뭐시기를 다 해봤는데 안되더라.
코드가 get_shape().as_list()로 들어가는데, get_shape()를 변경하면, as_list()가 없다더라.. 벡앤드를 우선 체크해보자.
backend
Keras is a model-level library, providing high-level building blocks for developing deep learning models. It does not handle low-level operations such as tensor products, convolutions and so on itself.
Window 사용자였기 때문에, C:\Users\(사용자이름)\.keras\keras.json 에서 json 파일을 열어서, "backend" 부분을 tensorflow로 변경해주었더니, 해결이 되었다.
{
"epsilon": 1e-07,
"backend": "Theano",
"image_data_format": "channels_last",
"floatx": "float32"
}
(변경)
{
"epsilon": 1e-07,
"backend": "tensorflow",
"image_data_format": "channels_last",
"floatx": "float32"
}
'블로그 > Python' 카테고리의 다른 글
[python] 리스트 내포(List comprehension)란? (0) | 2022.09.18 |
---|---|
Google Colab 코랩 런타임 유지 (0) | 2022.09.15 |