Skip to content

Instantly share code, notes, and snippets.

__author__ = 'NoSyu'
"""
You are not permitted to modify the constants or functions marked as "GIVEN".
Indeed you are free to implement extra functions as you need.
You must handle data to run EM algorithm
iter means the # of iterations
Pi & Mu are parameters you must find
nData is the # of data
server {
listen 80;
listen [::]:80;
server_name jupyter.jonghwan.me;
location / {
proxy_pass http://127.0.0.1:8888;
proxy_set_header X-Real-IP $remote_addr;
from typing import Optional
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
def scaled_dot_product_attention(
query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, mask: Optional[torch.Tensor] = None