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 json | |
from pathlib import Path | |
import pytest | |
from birdisle import redis | |
TEST_ROOT = Path(__file__).resolve().parent | |
rc = None | |
redis_key_format = "key:{i}" |
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 json | |
from pathlib import Path | |
import pgdb | |
import pytest | |
import pytest_check as check | |
import testing.postgresql | |
import pandas as pd | |
from sqlalchemy import create_engine |
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
""" Annotated code for Transformers' CLIP implementation """ | |
from typing import Optional, Tuple | |
import torch | |
from torch import nn | |
class CLIPAttention(nn.Module): | |
"""Multi-headed attention from 'Attention Is All You Need' paper""" |