This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""From: https://github.com/ermongroup/ddim/blob/main/models/diffusion.py""" | |
import math | |
import torch | |
import torch.nn as nn | |
def get_timestep_embedding(timesteps, embedding_dim): | |
""" | |
This matches the implementation in Denoising Diffusion Probabilistic Models: | |
From Fairseq. | |
Build sinusoidal embeddings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import subprocess | |
import argparse | |
import pathlib | |
parser = argparse.ArgumentParser() | |
parser.add_argument('ipynb_path', type=str) | |
args = parser.parse_args() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import subprocess | |
import argparse | |
from bs4 import BeautifulSoup | |
parser = argparse.ArgumentParser() | |
parser.add_argument('ipynb_file_name', type=str) | |
args = parser.parse_args() |