[Pytorch] MixtureSameFamily 을 사용해서 bimodal distribution 만들기
·
분석 Python/Pytorch
torch 1.5.0 버전부터 생김 bimodal gaussian distribution 만들기 n = 1000 import torch import seaborn as sns from torch.distributions import Normal from torch import distributions as D from torch.distributions.mixture_same_family import MixtureSameFamily d = torch.cat((Normal(loc=-3, scale =1.0).sample((n,1)) , Normal(loc=0.5, scale =1.0).sample((n,1))),dim=1) mix = D.Categorical(probs = torch.nn.Softmax()..

AI 도구

AI 도구 사이드 패널

아래 AI 서비스 중 하나를 선택하여 블로그를 보면서 동시에 사용해보세요.

API 키를 입력하세요API 키를 저장하려면 저장 버튼을 클릭하세요API 키가 저장되었습니다
API 키를 입력하세요API 키를 저장하려면 저장 버튼을 클릭하세요API 키가 저장되었습니다
API 키를 입력하세요API 키를 저장하려면 저장 버튼을 클릭하세요API 키가 저장되었습니다
URL과 모델을 입력하세요설정을 저장하려면 저장 버튼을 클릭하세요설정이 저장되었습니다