mirror of
https://github.com/lucidrains/DALLE2-pytorch.git
synced 2026-02-14 21:34:19 +01:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b7a62044a | ||
|
|
156fe5ed9f | ||
|
|
5ec34bebe1 | ||
|
|
8eaacf1ac1 | ||
|
|
e66c7b0249 | ||
|
|
f7cd4a0992 |
50
README.md
50
README.md
@@ -895,14 +895,14 @@ dataset = ImageEmbeddingDataset(
|
|||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Scripts
|
### Scripts (wip)
|
||||||
|
|
||||||
### Using the `train_diffusion_prior.py` script
|
#### `train_diffusion_prior.py`
|
||||||
|
|
||||||
This script allows training the DiffusionPrior on pre-computed text and image embeddings. The working example below elucidates this process.
|
This script allows training the DiffusionPrior on pre-computed text and image embeddings. The working example below elucidates this process.
|
||||||
Please note that the script internally passes text_embed and image_embed to the DiffusionPrior, unlike the example below.
|
Please note that the script internally passes text_embed and image_embed to the DiffusionPrior, unlike the example below.
|
||||||
|
|
||||||
### Usage
|
#### Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ python train_diffusion_prior.py
|
$ python train_diffusion_prior.py
|
||||||
@@ -910,58 +910,49 @@ $ python train_diffusion_prior.py
|
|||||||
|
|
||||||
The most significant parameters for the script are as follows:
|
The most significant parameters for the script are as follows:
|
||||||
|
|
||||||
--image-embed-url, default = "https://mystic.the-eye.eu/public/AI/cah/laion5b/embeddings/laion2B-en/img_emb/")
|
- `image-embed-url`, default = `"https://mystic.the-eye.eu/public/AI/cah/laion5b/embeddings/laion2B-en/img_emb/"`
|
||||||
|
|
||||||
--text-embed-url, default = "https://mystic.the-eye.eu/public/AI/cah/laion5b/embeddings/laion2B-en/text_emb/")
|
- `text-embed-url`, default = `"https://mystic.the-eye.eu/public/AI/cah/laion5b/embeddings/laion2B-en/text_emb/"`
|
||||||
|
|
||||||
--image-embed-dim, default=768 - 768 corresponds to the ViT iL/14 embedding size,change it to what your chosen ViT generates
|
- `image-embed-dim`, default = `768` - 768 corresponds to the ViT iL/14 embedding size,change it to what your chosen ViT generates
|
||||||
|
|
||||||
--learning-rate, default=1.1e-4
|
- `learning-rate`, default = `1.1e-4`
|
||||||
|
|
||||||
--weight-decay, default=6.02e-2
|
- `weight-decay`, default = `6.02e-2`
|
||||||
|
|
||||||
--max-grad-norm, default=0.5
|
- `max-grad-norm`, default = `0.5`
|
||||||
|
|
||||||
--batch-size, default=10 ** 4
|
- `batch-size`, default = `10 ** 4`
|
||||||
|
|
||||||
--num-epochs, default=5
|
- `num-epochs`, default = `5`
|
||||||
|
|
||||||
--clip, default=None # Signals the prior to use pre-computed embeddings
|
- `clip`, default = `None` # Signals the prior to use pre-computed embeddings
|
||||||
|
|
||||||
### Sample wandb run log
|
#### Loading and Saving the DiffusionPrior model
|
||||||
|
|
||||||
Please find a sample wandb run log at : https://wandb.ai/laion/diffusion-prior/runs/1blxu24j
|
|
||||||
|
|
||||||
### Loading and saving the Diffusion Prior model
|
|
||||||
|
|
||||||
Two methods are provided, load_diffusion_model and save_diffusion_model, the names being self-explanatory.
|
Two methods are provided, load_diffusion_model and save_diffusion_model, the names being self-explanatory.
|
||||||
|
|
||||||
## from dalle2_pytorch.train import load_diffusion_model, save_diffusion_model
|
```python
|
||||||
|
from dalle2_pytorch.train import load_diffusion_model, save_diffusion_model
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Loading
|
||||||
|
|
||||||
load_diffusion_model(dprior_path, device)
|
load_diffusion_model(dprior_path, device)
|
||||||
|
|
||||||
dprior_path : path to saved model(.pth)
|
dprior_path : path to saved model(.pth)
|
||||||
|
|
||||||
device : the cuda device you're running on
|
device : the cuda device you're running on
|
||||||
|
|
||||||
|
##### Saving
|
||||||
|
|
||||||
save_diffusion_model(save_path, model, optimizer, scaler, config, image_embed_dim)
|
save_diffusion_model(save_path, model, optimizer, scaler, config, image_embed_dim)
|
||||||
|
|
||||||
save_path : path to save at
|
save_path : path to save at
|
||||||
|
|
||||||
model : object of Diffusion_Prior
|
model : object of Diffusion_Prior
|
||||||
|
|
||||||
optimizer : optimizer object - see train_diffusion_prior.py for how to create one.
|
optimizer : optimizer object - see train_diffusion_prior.py for how to create one.
|
||||||
|
|
||||||
e.g: optimizer = get_optimizer(diffusion_prior.net.parameters(), wd=weight_decay, lr=learning_rate)
|
e.g: optimizer = get_optimizer(diffusion_prior.net.parameters(), wd=weight_decay, lr=learning_rate)
|
||||||
|
|
||||||
scaler : a GradScaler object.
|
scaler : a GradScaler object.
|
||||||
|
|
||||||
e.g: scaler = GradScaler(enabled=amp)
|
e.g: scaler = GradScaler(enabled=amp)
|
||||||
|
|
||||||
config : config object created in train_diffusion_prior.py - see file for example.
|
config : config object created in train_diffusion_prior.py - see file for example.
|
||||||
|
|
||||||
image_embed_dim - the dimension of the image_embedding
|
image_embed_dim - the dimension of the image_embedding
|
||||||
|
|
||||||
e.g: 768
|
e.g: 768
|
||||||
|
|
||||||
## CLI (wip)
|
## CLI (wip)
|
||||||
@@ -1021,6 +1012,7 @@ Once built, images will be saved to the same directory the command is invoked
|
|||||||
- [ ] bring in skip-layer excitatons (from lightweight gan paper) to see if it helps for either decoder of unet or vqgan-vae training
|
- [ ] bring in skip-layer excitatons (from lightweight gan paper) to see if it helps for either decoder of unet or vqgan-vae training
|
||||||
- [ ] decoder needs one day worth of refactor for tech debt
|
- [ ] decoder needs one day worth of refactor for tech debt
|
||||||
- [ ] allow for unet to be able to condition non-cross attention style as well
|
- [ ] allow for unet to be able to condition non-cross attention style as well
|
||||||
|
- [ ] for all model classes with hyperparameters that changes the network architecture, make it requirement that they must expose a config property, and write a simple function that asserts that it restores the object correctly
|
||||||
|
|
||||||
## Citations
|
## Citations
|
||||||
|
|
||||||
|
|||||||
@@ -1988,8 +1988,7 @@ class Decoder(BaseGaussianDiffusion):
|
|||||||
image_size = vae.get_encoded_fmap_size(image_size)
|
image_size = vae.get_encoded_fmap_size(image_size)
|
||||||
shape = (batch_size, vae.encoded_dim, image_size, image_size)
|
shape = (batch_size, vae.encoded_dim, image_size, image_size)
|
||||||
|
|
||||||
if exists(lowres_cond_img):
|
lowres_cond_img = maybe(vae.encode)(lowres_cond_img)
|
||||||
lowres_cond_img = vae.encode(lowres_cond_img)
|
|
||||||
|
|
||||||
img = self.p_sample_loop(
|
img = self.p_sample_loop(
|
||||||
unet,
|
unet,
|
||||||
@@ -2063,9 +2062,7 @@ class Decoder(BaseGaussianDiffusion):
|
|||||||
vae.eval()
|
vae.eval()
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
image = vae.encode(image)
|
image = vae.encode(image)
|
||||||
|
lowres_cond_img = maybe(vae.encode)(lowres_cond_img)
|
||||||
if exists(lowres_cond_img):
|
|
||||||
lowres_cond_img = vae.encode(lowres_cond_img)
|
|
||||||
|
|
||||||
return self.p_losses(unet, image, times, image_embed = image_embed, text_encodings = text_encodings, text_mask = text_mask, lowres_cond_img = lowres_cond_img, predict_x_start = predict_x_start, learned_variance = learned_variance)
|
return self.p_losses(unet, image, times, image_embed = image_embed, text_encodings = text_encodings, text_mask = text_mask, lowres_cond_img = lowres_cond_img, predict_x_start = predict_x_start, learned_variance = learned_variance)
|
||||||
|
|
||||||
|
|||||||
@@ -80,13 +80,13 @@ def split_args_and_kwargs(*args, split_size = None, **kwargs):
|
|||||||
|
|
||||||
batch_size = len(first_tensor)
|
batch_size = len(first_tensor)
|
||||||
split_size = default(split_size, batch_size)
|
split_size = default(split_size, batch_size)
|
||||||
chunk_size = ceil(batch_size / split_size)
|
num_chunks = ceil(batch_size / split_size)
|
||||||
|
|
||||||
dict_len = len(kwargs)
|
dict_len = len(kwargs)
|
||||||
dict_keys = kwargs.keys()
|
dict_keys = kwargs.keys()
|
||||||
split_kwargs_index = len_all_args - dict_len
|
split_kwargs_index = len_all_args - dict_len
|
||||||
|
|
||||||
split_all_args = [split(arg, split_size = split_size) if exists(arg) and isinstance(arg, (torch.Tensor, Iterable)) else ((arg,) * chunk_size) for arg in all_args]
|
split_all_args = [split(arg, split_size = split_size) if exists(arg) and isinstance(arg, (torch.Tensor, Iterable)) else ((arg,) * num_chunks) for arg in all_args]
|
||||||
chunk_sizes = tuple(map(len, split_all_args[0]))
|
chunk_sizes = tuple(map(len, split_all_args[0]))
|
||||||
|
|
||||||
for (chunk_size, *chunked_all_args) in tuple(zip(chunk_sizes, *split_all_args)):
|
for (chunk_size, *chunked_all_args) in tuple(zip(chunk_sizes, *split_all_args)):
|
||||||
@@ -279,7 +279,9 @@ class DiffusionPriorTrainer(nn.Module):
|
|||||||
loss = loss * chunk_size_frac
|
loss = loss * chunk_size_frac
|
||||||
|
|
||||||
total_loss += loss.item()
|
total_loss += loss.item()
|
||||||
self.scaler.scale(loss).backward()
|
|
||||||
|
if self.training:
|
||||||
|
self.scaler.scale(loss).backward()
|
||||||
|
|
||||||
return total_loss
|
return total_loss
|
||||||
|
|
||||||
@@ -406,6 +408,8 @@ class DecoderTrainer(nn.Module):
|
|||||||
loss = loss * chunk_size_frac
|
loss = loss * chunk_size_frac
|
||||||
|
|
||||||
total_loss += loss.item()
|
total_loss += loss.item()
|
||||||
self.scale(loss, unet_number = unet_number).backward()
|
|
||||||
|
if self.training:
|
||||||
|
self.scale(loss, unet_number = unet_number).backward()
|
||||||
|
|
||||||
return total_loss
|
return total_loss
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -10,7 +10,7 @@ setup(
|
|||||||
'dream = dalle2_pytorch.cli:dream'
|
'dream = dalle2_pytorch.cli:dream'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
version = '0.2.31',
|
version = '0.2.32',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
description = 'DALL-E 2',
|
description = 'DALL-E 2',
|
||||||
author = 'Phil Wang',
|
author = 'Phil Wang',
|
||||||
|
|||||||
@@ -111,37 +111,110 @@ def report_cosine_sims(diffusion_prior,image_reader,text_reader,train_set_size,N
|
|||||||
"CosineSimilarity(text_embed,predicted_unrelated_embed)": np.mean(unrelated_similarity),
|
"CosineSimilarity(text_embed,predicted_unrelated_embed)": np.mean(unrelated_similarity),
|
||||||
"Cosine similarity difference":np.mean(predicted_similarity - original_similarity)})
|
"Cosine similarity difference":np.mean(predicted_similarity - original_similarity)})
|
||||||
|
|
||||||
def train(image_embed_dim,
|
@click.command()
|
||||||
image_embed_url,
|
@click.option("--wandb-entity", default="laion")
|
||||||
text_embed_url,
|
@click.option("--wandb-project", default="diffusion-prior")
|
||||||
batch_size,
|
@click.option("--wandb-dataset", default="LAION-5B")
|
||||||
train_percent,
|
@click.option("--wandb-arch", default="DiffusionPrior")
|
||||||
val_percent,
|
@click.option("--image-embed-url", default="https://mystic.the-eye.eu/public/AI/cah/laion5b/embeddings/laion2B-en/img_emb/")
|
||||||
test_percent,
|
@click.option("--text-embed-url", default="https://mystic.the-eye.eu/public/AI/cah/laion5b/embeddings/laion2B-en/text_emb/")
|
||||||
num_epochs,
|
@click.option("--learning-rate", default=1.1e-4)
|
||||||
dp_loss_type,
|
@click.option("--weight-decay", default=6.02e-2)
|
||||||
clip,
|
@click.option("--dropout", default=5e-2)
|
||||||
dp_condition_on_text_encodings,
|
@click.option("--max-grad-norm", default=0.5)
|
||||||
dp_timesteps,
|
@click.option("--batch-size", default=10**4)
|
||||||
dp_normformer,
|
@click.option("--num-epochs", default=5)
|
||||||
dp_cond_drop_prob,
|
@click.option("--image-embed-dim", default=768)
|
||||||
dpn_depth,
|
@click.option("--train-percent", default=0.7)
|
||||||
dpn_dim_head,
|
@click.option("--val-percent", default=0.2)
|
||||||
dpn_heads,
|
@click.option("--test-percent", default=0.1)
|
||||||
save_interval,
|
@click.option("--dpn-depth", default=6)
|
||||||
save_path,
|
@click.option("--dpn-dim-head", default=64)
|
||||||
device,
|
@click.option("--dpn-heads", default=8)
|
||||||
RESUME,
|
@click.option("--dp-condition-on-text-encodings", default=False)
|
||||||
DPRIOR_PATH,
|
@click.option("--dp-timesteps", default=100)
|
||||||
config,
|
@click.option("--dp-normformer", default=False)
|
||||||
wandb_entity,
|
@click.option("--dp-cond-drop-prob", default=0.1)
|
||||||
wandb_project,
|
@click.option("--dp-loss-type", default="l2")
|
||||||
learning_rate=0.001,
|
@click.option("--clip", default=None)
|
||||||
max_grad_norm=0.5,
|
@click.option("--amp", default=False)
|
||||||
weight_decay=0.01,
|
@click.option("--save-interval", default=30)
|
||||||
dropout=0.05,
|
@click.option("--save-path", default="./diffusion_prior_checkpoints")
|
||||||
amp=False):
|
@click.option("--pretrained-model-path", default=None)
|
||||||
|
def train(
|
||||||
|
wandb_entity,
|
||||||
|
wandb_project,
|
||||||
|
wandb_dataset,
|
||||||
|
wandb_arch,
|
||||||
|
image_embed_url,
|
||||||
|
text_embed_url,
|
||||||
|
learning_rate,
|
||||||
|
weight_decay,
|
||||||
|
dropout,
|
||||||
|
max_grad_norm,
|
||||||
|
batch_size,
|
||||||
|
num_epochs,
|
||||||
|
image_embed_dim,
|
||||||
|
train_percent,
|
||||||
|
val_percent,
|
||||||
|
test_percent,
|
||||||
|
dpn_depth,
|
||||||
|
dpn_dim_head,
|
||||||
|
dpn_heads,
|
||||||
|
dp_condition_on_text_encodings,
|
||||||
|
dp_timesteps,
|
||||||
|
dp_normformer,
|
||||||
|
dp_cond_drop_prob,
|
||||||
|
dp_loss_type,
|
||||||
|
clip,
|
||||||
|
amp,
|
||||||
|
save_interval,
|
||||||
|
save_path,
|
||||||
|
pretrained_model_path
|
||||||
|
):
|
||||||
|
config = {
|
||||||
|
"learning_rate": learning_rate,
|
||||||
|
"architecture": wandb_arch,
|
||||||
|
"dataset": wandb_dataset,
|
||||||
|
"weight_decay": weight_decay,
|
||||||
|
"max_gradient_clipping_norm": max_grad_norm,
|
||||||
|
"batch_size": batch_size,
|
||||||
|
"epochs": num_epochs,
|
||||||
|
"diffusion_prior_network": {
|
||||||
|
"depth": dpn_depth,
|
||||||
|
"dim_head": dpn_dim_head,
|
||||||
|
"heads": dpn_heads,
|
||||||
|
"normformer": dp_normformer
|
||||||
|
},
|
||||||
|
"diffusion_prior": {
|
||||||
|
"condition_on_text_encodings": dp_condition_on_text_encodings,
|
||||||
|
"timesteps": dp_timesteps,
|
||||||
|
"cond_drop_prob": dp_cond_drop_prob,
|
||||||
|
"loss_type": dp_loss_type,
|
||||||
|
"clip": clip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if DPRIOR_PATH exists(saved model path)
|
||||||
|
|
||||||
|
DPRIOR_PATH = args.pretrained_model_path
|
||||||
|
RESUME = exists(DPRIOR_PATH)
|
||||||
|
|
||||||
|
if not RESUME:
|
||||||
|
tracker.init(
|
||||||
|
entity = wandb_entity,
|
||||||
|
project = wandb_project,
|
||||||
|
config = config
|
||||||
|
)
|
||||||
|
|
||||||
|
# Obtain the utilized device.
|
||||||
|
|
||||||
|
has_cuda = torch.cuda.is_available()
|
||||||
|
if has_cuda:
|
||||||
|
device = torch.device("cuda:0")
|
||||||
|
torch.cuda.set_device(device)
|
||||||
|
|
||||||
|
# Training loop
|
||||||
# diffusion prior network
|
# diffusion prior network
|
||||||
|
|
||||||
prior_network = DiffusionPriorNetwork(
|
prior_network = DiffusionPriorNetwork(
|
||||||
@@ -269,140 +342,5 @@ def train(image_embed_dim,
|
|||||||
end = num_data_points
|
end = num_data_points
|
||||||
eval_model(diffusion_prior,device,image_reader,text_reader,start,end,batch_size,dp_loss_type,phase="Test")
|
eval_model(diffusion_prior,device,image_reader,text_reader,start,end,batch_size,dp_loss_type,phase="Test")
|
||||||
|
|
||||||
@click.command()
|
|
||||||
@click.option("--wandb-entity", default="laion")
|
|
||||||
@click.option("--wandb-project", default="diffusion-prior")
|
|
||||||
@click.option("--wandb-dataset", default="LAION-5B")
|
|
||||||
@click.option("--wandb-arch", default="DiffusionPrior")
|
|
||||||
@click.option("--image-embed-url", default="https://mystic.the-eye.eu/public/AI/cah/laion5b/embeddings/laion2B-en/img_emb/")
|
|
||||||
@click.option("--text-embed-url", default="https://mystic.the-eye.eu/public/AI/cah/laion5b/embeddings/laion2B-en/text_emb/")
|
|
||||||
@click.option("--learning-rate", default=1.1e-4)
|
|
||||||
@click.option("--weight-decay", default=6.02e-2)
|
|
||||||
@click.option("--dropout", default=5e-2)
|
|
||||||
@click.option("--max-grad-norm", default=0.5)
|
|
||||||
@click.option("--batch-size", default=10**4)
|
|
||||||
@click.option("--num-epochs", default=5)
|
|
||||||
@click.option("--image-embed-dim", default=768)
|
|
||||||
@click.option("--train-percent", default=0.7)
|
|
||||||
@click.option("--val-percent", default=0.2)
|
|
||||||
@click.option("--test-percent", default=0.1)
|
|
||||||
@click.option("--dpn-depth", default=6)
|
|
||||||
@click.option("--dpn-dim-head", default=64)
|
|
||||||
@click.option("--dpn-heads", default=8)
|
|
||||||
@click.option("--dp-condition-on-text-encodings", default=False)
|
|
||||||
@click.option("--dp-timesteps", default=100)
|
|
||||||
@click.option("--dp-normformer", default=False)
|
|
||||||
@click.option("--dp-cond-drop-prob", default=0.1)
|
|
||||||
@click.option("--dp-loss-type", default="l2")
|
|
||||||
@click.option("--clip", default=None)
|
|
||||||
@click.option("--amp", default=False)
|
|
||||||
@click.option("--save-interval", default=30)
|
|
||||||
@click.option("--save-path", default="./diffusion_prior_checkpoints")
|
|
||||||
@click.option("--pretrained-model-path", default=None)
|
|
||||||
def main(
|
|
||||||
wandb_entity,
|
|
||||||
wandb_project,
|
|
||||||
wandb_dataset,
|
|
||||||
wandb_arch,
|
|
||||||
image_embed_url,
|
|
||||||
text_embed_url,
|
|
||||||
learning_rate,
|
|
||||||
weight_decay,
|
|
||||||
dropout,
|
|
||||||
max_grad_norm,
|
|
||||||
batch_size,
|
|
||||||
num_epochs,
|
|
||||||
image_embed_dim,
|
|
||||||
train_percent,
|
|
||||||
val_percent,
|
|
||||||
test_percent,
|
|
||||||
dpn_depth,
|
|
||||||
dpn_dim_head,
|
|
||||||
dpn_heads,
|
|
||||||
dp_condition_on_text_encodings,
|
|
||||||
dp_timesteps,
|
|
||||||
dp_normformer,
|
|
||||||
dp_cond_drop_prob,
|
|
||||||
dp_loss_type,
|
|
||||||
clip,
|
|
||||||
amp,
|
|
||||||
save_interval,
|
|
||||||
save_path,
|
|
||||||
pretrained_model_path
|
|
||||||
):
|
|
||||||
config = {
|
|
||||||
"learning_rate": learning_rate,
|
|
||||||
"architecture": wandb_arch,
|
|
||||||
"dataset": wandb_dataset,
|
|
||||||
"weight_decay": weight_decay,
|
|
||||||
"max_gradient_clipping_norm": max_grad_norm,
|
|
||||||
"batch_size": batch_size,
|
|
||||||
"epochs": num_epochs,
|
|
||||||
"diffusion_prior_network": {
|
|
||||||
"depth": dpn_depth,
|
|
||||||
"dim_head": dpn_dim_head,
|
|
||||||
"heads": dpn_heads,
|
|
||||||
"normformer": dp_normformer
|
|
||||||
},
|
|
||||||
"diffusion_prior": {
|
|
||||||
"condition_on_text_encodings": dp_condition_on_text_encodings,
|
|
||||||
"timesteps": dp_timesteps,
|
|
||||||
"cond_drop_prob": dp_cond_drop_prob,
|
|
||||||
"loss_type": dp_loss_type,
|
|
||||||
"clip": clip
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check if DPRIOR_PATH exists(saved model path)
|
|
||||||
|
|
||||||
DPRIOR_PATH = args.pretrained_model_path
|
|
||||||
RESUME = exists(DPRIOR_PATH)
|
|
||||||
|
|
||||||
if not RESUME:
|
|
||||||
tracker.init(
|
|
||||||
entity = wandb_entity,
|
|
||||||
project = wandb_project,
|
|
||||||
config = config
|
|
||||||
)
|
|
||||||
|
|
||||||
# Obtain the utilized device.
|
|
||||||
|
|
||||||
has_cuda = torch.cuda.is_available()
|
|
||||||
if has_cuda:
|
|
||||||
device = torch.device("cuda:0")
|
|
||||||
torch.cuda.set_device(device)
|
|
||||||
|
|
||||||
# Training loop
|
|
||||||
train(image_embed_dim,
|
|
||||||
image_embed_url,
|
|
||||||
text_embed_url,
|
|
||||||
batch_size,
|
|
||||||
train_percent,
|
|
||||||
val_percent,
|
|
||||||
test_percent,
|
|
||||||
num_epochs,
|
|
||||||
dp_loss_type,
|
|
||||||
clip,
|
|
||||||
dp_condition_on_text_encodings,
|
|
||||||
dp_timesteps,
|
|
||||||
dp_normformer,
|
|
||||||
dp_cond_drop_prob,
|
|
||||||
dpn_depth,
|
|
||||||
dpn_dim_head,
|
|
||||||
dpn_heads,
|
|
||||||
save_interval,
|
|
||||||
save_path,
|
|
||||||
device,
|
|
||||||
RESUME,
|
|
||||||
DPRIOR_PATH,
|
|
||||||
config,
|
|
||||||
wandb_entity,
|
|
||||||
wandb_project,
|
|
||||||
learning_rate,
|
|
||||||
max_grad_norm,
|
|
||||||
weight_decay,
|
|
||||||
dropout,
|
|
||||||
amp)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
train()
|
||||||
|
|||||||
Reference in New Issue
Block a user