내용으로 건너뛰기
Out of the Box
사용자 도구
로그인
사이트 도구
검색
도구
문서 보기
이전 판
Fold/unfold all
역링크
최근 바뀜
미디어 관리자
사이트맵
로그인
>
최근 바뀜
미디어 관리자
사이트맵
추적:
•
random
•
pandas
•
pydoro
•
tuplex
•
cssh
•
example
•
devops
•
sgd
•
profile
•
taskset
einsum
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== einsum ====== outerproduct <code python> a1 = np.array([[1, 2, 3], [1, 2, 3]]) a2 = np.array([[1, 2], [1, 2]]) a3 = np.array([[1, 2, 3, 4], [1, 2, 3, 4]]) np.einsum('bi,bj,bk->bijk', a1, a2, a3).reshape(2, -1).shape rs = np.einsum('bi,bj,bk->bijk', a1, a2, a3).reshape(2, -1) actions = rs.reshape(2, -1).argmax(axis=1) a1_ = rs // 4 // 2 % 3 a2_ = rs // 4 % 2 a3_ = rs % 4 actions = list() for n in [4, 2, 3]: actions.append(rs % n) rs = rs // n actions = reversed(actions) </code> * https://optimized-einsum.readthedocs.io/en/stable/index.html {{tag>einsum numpy}}
einsum.txt
· 마지막으로 수정됨: 2024/03/23 02:38 저자
127.0.0.1
문서 도구
문서 보기
이전 판
역링크
Fold/unfold all
맨 위로