강의

멘토링

커뮤니티

Inflearn Community Q&A

kimym4469's profile image
kimym4469

asked

Introduction to Machine Learning and Deep Learning Using Python

Practice - Building and Visualizing a Simple Autoencoder

섹션9 First Autoencoder 인코더, 디코더 모델 생성 오류 해결 방법

Written on

·

185

0

강의 14분쯤에서 모델을 변경하는 부분입니다.

케라스가 업데이트 된 건지는 잘 모르겠지만 아래 부분에서 시퀀셜 모델이 레이어를 단일 값으로 받을 수 없어 에러가 납니다.

encoder = Sequential(Dense(2, input_shape=(3, )))
decoder = Sequential(Dense(3, input_shape=(2, )))

autoencoder = Sequential([encoder, decoder])
autoencoder.summary()

아래 처럼 괄호로 감싸 리스트로 넘기면 해결됩니다.

encoder = Sequential([Dense(2, input_shape=(3, ))])
decoder = Sequential([Dense(3, input_shape=(2, ))])

autoencoder = Sequential([encoder, decoder])
autoencoder.summary()
python머신러닝딥러닝pandasnumpykerastensorflowanacondamatplotlibcnn

Answer 1

0

YoungJea Oh님의 프로필 이미지
YoungJea Oh
Instructor

좋은 지적 감사드립니다. keras version 이 바뀌었나보네요. 소스 수정해 놓았습니다. 감사합니다.

kimym4469's profile image
kimym4469

asked

Ask a question