C.W.K.
Stream
Lesson 06 of 08 · published

keras.ops — universal layer

~8 min · backend

Level 0Keras 도제
0 XP0/97 lessons0/20 achievements
0/120 XP to next level120 XP to go0% complete

keras.ops 는 backend 가 뭐든 NumPy 형태 API 를 노출하는 namespace. keras.ops.matmul·keras.ops.softmax·keras.ops.einsum 다 native NumPy 와 같은 시그니처. 활성 backend 가 뭐든 그쪽 native op 으로 dispatch.

이게 cross-backend 코드의 *진짜 무기*. tf.einsum 또는 torch.einsum 따로 부르지 말고 keras.ops.einsum 한 줄로 — 코드가 portable. custom layer 짤 때 keras.ops 만 쓰면 자동으로 세 backend 다 지원.

External links

Exercise

call() 이 keras.ops.softmax + keras.ops.matmul 만 쓰는 custom Layer subclass 짜. 세 backend 다 코드 변경 없이 돌리고, 출력이 numerical tolerance 안에서 일치하는지 확인.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.