Welcome to JWN's note

Hello, World!

그래, 너 하고 싶은 거 다 해... 자세히보기

Dev 19

아이디어 요약

조만간 만들기 시작할 예정이거나 이미 만들고 있는 모드 아이디어 요약. 만들기 시작하면 github 링크 추가 바람. 1. Auto Runhttps://github.com/skwodnjs/fabric-auto-run GitHub - skwodnjs/fabric-auto-runContribute to skwodnjs/fabric-auto-run development by creating an account on GitHub.github.com자동 달리기. 기능을 on/off 하여, 기능이 켜진 상태에서는 키보드를 따로 누르지 않아도 앞으로 달려감."자동 달리기 도중 자동 점프" 도 on/off 할 수 있도록 할 예정.client side에서 동작. 2. 자막 크기 조절주변 소리 자막 표시 크기 조절 기능 ..

[torch] unsqueeze, cat, broadcasting, norm

unsqueezeimport torchx = torch.rand(2, 3)print(x.unsqueeze(1).size())출력 예시torch.Size([2, 1, 3])1개 차원 추가. 예를 들어, shape가 (5,3)인 텐서에 unsqueeze(0)을 하면 0번째에 1개 차원 추가, shape는 (1, 5, 3)으로 바뀜. shape가 (5,3)인 텐서에 unsqueeze(1)을 하면 1번째에 1개 차원 추가, shape는 (5, 1, 3)으로 바뀜. 다음은 unsqueeze와 동일하게 작동함.import torchinputs = torch.tensor([[1, 2], [2, 3], [2,4]])print(inputs[:, None, :].size(..

Dev/PYTHON 2024.12.28
dcor

energy_distance# 데이터셋 1: 정규분포gt = np.random.normal(0, 1, 1000)# 데이터셋 2: 동일한 정규분포x1 = np.random.normal(0, 1, 1000)# 데이터셋 3: 다른 분포x2 = np.random.uniform(-2, 2, 1000)# 에너지 거리 계산ed1 = compute_ed(x1, gt)ed2 = compute_ed(x2, gt)print("Energy Distance (x1 vs gt):", ed1) # 작아야 함print("Energy Distance (x2 vs gt):", ed2) # 커야 함출력 예시Energy Distance (x1 vs gt): 0.045321Energy Distance (x2 vs gt): 0.823145..

Dev/PYTHON 2024.12.28