File size: 514 Bytes
48ac659
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from collections import defaultdict
import json
import numpy as np
import os
import pandas as pd
import dill as pickle
pickle._dill._reverse_typemap['ClassType'] = type
import random
import string
import sys
import torch
from torch import nn
import torch.nn.functional as nnf
from torch.utils.data import Dataset, DataLoader
from tqdm import tqdm
from transformers import GPT2Tokenizer, GPT2LMHeadModel, AdamW, get_linear_schedule_with_warmup
from typing import Tuple, List, Union, Optional

from clipcap import *