diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b36650e682d1e26e8484f03f8fcad8cc1841682e --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +.git/objects/pack/pack-c489e96424f1ee71e0c94eaadab46ec057581843.pack +exp/valle_dev/best-train-loss.pt +exp/valle_dev/checkpoint-10000.pt +exp/valle_dev/epoch-1.pt +exp/valle_dev/best-valid-loss.pt +checkpoints/vallex-checkpoint_modified.pt +venv +.idea +__pycache__ +checkpoints_backup/vallex-checkpoint.pt +checkpoints/vallex-checkpoint.pt +whisper/medium.pt \ No newline at end of file diff --git a/.ipynb_checkpoints/infer-checkpoint.ipynb b/.ipynb_checkpoints/infer-checkpoint.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..363fcab7ed6e9634e198cf5555ceb88932c9a245 --- /dev/null +++ b/.ipynb_checkpoints/infer-checkpoint.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/.ipynb_checkpoints/test-checkpoint.py b/.ipynb_checkpoints/test-checkpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..2171fb32ad1ce1370c5be8bd1fde03759b27cc5c --- /dev/null +++ b/.ipynb_checkpoints/test-checkpoint.py @@ -0,0 +1,71 @@ +import os +import torch +import logging +from data.dataset import create_dataloader +from macros import * +from data.tokenizer import ( + AudioTokenizer, + tokenize_audio, +) +from data.collation import get_text_token_collater +from models.vallex import VALLE +if torch.cuda.is_available(): + device = torch.device("cuda", 0) +from vocos import Vocos +from pathlib import Path +import platform +import pathlib + +plt = platform.system() +print("Operating System:", plt) + +if plt == 'Linux': + pathlib.WindowsPath = pathlib.PosixPath + +def get_model(device): + url = 'https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt' + + checkpoints_dir = "./checkpoints" + + model_checkpoint_name = "vallex-checkpoint_modified.pt" + if not os.path.exists(checkpoints_dir): os.mkdir(checkpoints_dir) + if not os.path.exists(os.path.join(checkpoints_dir, model_checkpoint_name)): + import wget + print("3") + try: + logging.info( + "Downloading model from https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt ...") + # download from https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt to ./checkpoints/vallex-checkpoint.pt + wget.download("https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt", + out="./checkpoints/vallex-checkpoint.pt", bar=wget.bar_adaptive) + except Exception as e: + logging.info(e) + raise Exception( + "\n Model weights download failed, please go to 'https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt'" + "\n manually download model weights and put it to {} .".format(os.getcwd() + "\checkpoints")) + # VALL-E + model = VALLE( + N_DIM, + NUM_HEAD, + NUM_LAYERS, + norm_first=True, + add_prenet=False, + prefix_mode=PREFIX_MODE, + share_embedding=True, + nar_scale_factor=1.0, + prepend_bos=True, + num_quantizers=NUM_QUANTIZERS, + ).to(device) + checkpoint_path = Path(checkpoints_dir) / model_checkpoint_name + checkpoint = torch.load(checkpoint_path, map_location='cpu') + missing_keys, unexpected_keys = model.load_state_dict( + checkpoint["model"], strict=True + ) + assert not missing_keys + + # Encodec + codec = AudioTokenizer(device) + + vocos = Vocos.from_pretrained('charactr/vocos-encodec-24khz').to(device) + + return model, codec, vocos \ No newline at end of file diff --git a/.ipynb_checkpoints/train-checkpoint.py b/.ipynb_checkpoints/train-checkpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..9b563d5049f2c69eb8b0a669dc8fcbff3e7317f5 --- /dev/null +++ b/.ipynb_checkpoints/train-checkpoint.py @@ -0,0 +1,1068 @@ +#!/usr/bin/env python3 +# Copyright 2021-2022 Xiaomi Corp. (authors: Fangjun Kuang, +# Wei Kang, +# Mingshuang Luo) +# Copyright 2023 (authors: Feiteng Li) +# +# See ../../../../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +Usage: +python3 bin/trainer.py \ + --decoder-dim 1024 --nhead 16 --num-decoder-layers 12 \ + --max-duration 40 --model-name valle \ + --exp-dir exp/valle + --dtype "bfloat16" \ +""" +import warnings +warnings.filterwarnings("ignore") +import argparse +import copy +import logging +import os + +os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" + +import random +import warnings +from pathlib import Path +from shutil import copyfile +from typing import Any, Dict, Optional, Tuple, Union + +import torch +import torch.multiprocessing as mp +import torch.nn as nn +from torch import Tensor +from torch.cuda.amp import GradScaler +from torch.nn.parallel import DistributedDataParallel as DDP +from torch.utils.tensorboard import SummaryWriter +from train_utils.utils import * +from train_utils.icefall.utils import * +from train_utils.lhotse.utils import * +from test import get_model +from customs.make_custom_dataset import create_dataset + +LRSchedulerType = torch.optim.lr_scheduler._LRScheduler + + +def set_batch_count(model: Union[nn.Module, DDP], batch_count: float) -> None: + if isinstance(model, DDP): + # get underlying nn.Module + model = model.module + + for module in model.modules(): + if hasattr(module, "batch_count"): + module.batch_count = batch_count + + +def get_parser(): + parser = argparse.ArgumentParser( + formatter_class=argparse.ArgumentDefaultsHelpFormatter + ) + + parser.add_argument( + "--world-size", + type=int, + default=1, + help="Number of GPUs for DDP training.", + ) + + parser.add_argument( + "--master-port", + type=int, + default=12354, + help="Master port to use for DDP training.", + ) + + parser.add_argument( + "--tensorboard", + type=str2bool, + default=True, + help="Should various information be logged in tensorboard.", + ) + + parser.add_argument( + "--num-epochs", + type=int, + default=20, + help="Number of epochs to train.", + ) + + parser.add_argument( + "--start-epoch", + type=int, + default=1, + help="""Resume training from this epoch. It should be positive. + If larger than 1, it will load checkpoint from + exp-dir/epoch-{start_epoch-1}.pt + """, + ) + + parser.add_argument( + "--start-batch", + type=int, + default=0, + help="""If positive, --start-epoch is ignored and + it loads the checkpoint from exp-dir/checkpoint-{start_batch}.pt + """, + ) + + parser.add_argument( + "--exp-dir", + type=str, + default="exp/valle_dev", + help="""The experiment dir. + It specifies the directory where all training related + files, e.g., checkpoints, log, etc, are saved + """, + ) + + parser.add_argument( + "--optimizer-name", + type=str, + default="ScaledAdam", + help="The optimizer.", + ) + parser.add_argument( + "--scheduler-name", + type=str, + default="Eden", + help="The scheduler.", + ) + parser.add_argument( + "--base-lr", type=float, default=0.005, help="The base learning rate." + ) + parser.add_argument( + "--warmup-steps", + type=int, + default=200, + help="""Number of steps that affects how rapidly the learning rate + decreases. We suggest not to change this.""", + ) + + parser.add_argument( + "--seed", + type=int, + default=42, + help="The seed for random generators intended for reproducibility", + ) + + parser.add_argument( + "--inf-check", + type=str2bool, + default=False, + help="Add hooks to check for infinite module outputs and gradients.", + ) + + parser.add_argument( + "--save-every-n", + type=int, + default=10000, + # default=100, + help="""Save checkpoint after processing this number of batches" + periodically. We save checkpoint to exp-dir/ whenever + params.batch_idx_train %% save_every_n == 0. The checkpoint filename + has the form: f'exp-dir/checkpoint-{params.batch_idx_train}.pt' + Note: It also saves checkpoint to `exp-dir/epoch-xxx.pt` at the + end of each epoch where `xxx` is the epoch number counting from 0. + """, + ) + parser.add_argument( + "--valid-interval", + type=int, + default=10000, + help="""Run validation if batch_idx %% valid_interval is 0.""", + ) + + parser.add_argument( + "--keep-last-k", + type=int, + default=20, + help="""Only keep this number of checkpoints on disk. + For instance, if it is 3, there are only 3 checkpoints + in the exp-dir with filenames `checkpoint-xxx.pt`. + It does not affect checkpoints with name `epoch-xxx.pt`. + """, + ) + + parser.add_argument( + "--average-period", + type=int, + default=0, + help="""Update the averaged model, namely `model_avg`, after processing + this number of batches. `model_avg` is a separate version of model, + in which each floating-point parameter is the average of all the + parameters from the start of training. Each time we take the average, + we do: `model_avg = model * (average_period / batch_idx_train) + + model_avg * ((batch_idx_train - average_period) / batch_idx_train)`. + """, + ) + + parser.add_argument( + "--accumulate-grad-steps", + type=int, + default=1, + help="""update gradient when batch_idx_train %% accumulate_grad_steps == 0. + """, + ) + + parser.add_argument( + "--dtype", + type=str, + default="float16", + help="Training dtype: float32 bfloat16 float16.", + ) + + parser.add_argument( + "--filter-min-duration", + type=float, + default=0.0, + help="Keep only utterances with duration > this.", + ) + parser.add_argument( + "--filter-max-duration", + type=float, + default=20.0, + help="Keep only utterances with duration < this.", + ) + + parser.add_argument( + "--train-stage", + type=int, + default=0, + help="""0: train all modules, For VALL-E, support 1: AR Decoder 2: NAR Decoder(s) + """, + ) + + parser.add_argument( + "--visualize", + type=str2bool, + default=False, + help="visualize model results in eval step.", + ) + + parser.add_argument( + "--oom-check", + type=str2bool, + default=True, + help="perform OOM check on dataloader batches before starting training.", + ) + + parser.add_argument( + "--train_dir", + default='/home/ubuntu/VALL-E-X/JS_Dataset/JS_Dataset/train_tune' + ) + + parser.add_argument( + "--valid_dir", + default='/home/ubuntu/VALL-E-X/JS_Dataset/JS_Dataset/valid_tune' + ) + + add_model_arguments(parser) + + return parser + + +def get_params() -> AttributeDict: + """Return a dict containing training parameters. + + All training related parameters that are not passed from the commandline + are saved in the variable `params`. + + Commandline options are merged into `params` after they are parsed, so + you can also access them via `params`. + + Explanation of options saved in `params`: + + - best_train_loss: Best training loss so far. It is used to select + the model that has the lowest training loss. It is + updated during the training. + + - best_valid_loss: Best validation loss so far. It is used to select + the model that has the lowest validation loss. It is + updated during the training. + + - best_train_epoch: It is the epoch that has the best training loss. + + - best_valid_epoch: It is the epoch that has the best validation loss. + + - batch_idx_train: Used to writing statistics to tensorboard. It + contains number of batches trained so far across + epochs. + + - log_interval: Print training loss if batch_idx % log_interval` is 0 + + - reset_interval: Reset statistics if batch_idx % reset_interval is 0 + + - valid_interval: Run validation if batch_idx % valid_interval is 0 + """ + params = AttributeDict( + { + "best_train_loss": float("inf"), + "best_valid_loss": float("inf"), + "best_train_epoch": -1, + "best_valid_epoch": -1, + "batch_idx_train": 0, + "log_interval": 100, # 10: debug 100: train + "reset_interval": 200, + "valid_interval": 10000, + } + ) + + return params + + +def load_checkpoint_if_available( + params: AttributeDict, + model: nn.Module, + model_avg: nn.Module = None, + optimizer: Optional[torch.optim.Optimizer] = None, + scheduler: Optional[LRSchedulerType] = None, +) -> Optional[Dict[str, Any]]: + """Load checkpoint from file. + + If params.start_batch is positive, it will load the checkpoint from + `params.exp_dir/checkpoint-{params.start_batch}.pt`. Otherwise, if + params.start_epoch is larger than 1, it will load the checkpoint from + `params.start_epoch - 1`. + + Apart from loading state dict for `model` and `optimizer` it also updates + `best_train_epoch`, `best_train_loss`, `best_valid_epoch`, + and `best_valid_loss` in `params`. + + Args: + params: + The return value of :func:`get_params`. + model: + The training model. + model_avg: + The stored model averaged from the start of training. + optimizer: + The optimizer that we are using. + scheduler: + The scheduler that we are using. + Returns: + Return a dict containing previously saved training info. + """ + if params.start_batch > 0: + filename = params.exp_dir / f"checkpoint-{params.start_batch}.pt" + elif params.start_epoch > 1: + filename = params.exp_dir / f"epoch-{params.start_epoch-1}.pt" + else: + return None + + assert filename.is_file(), f"{filename} does not exist!" + + if isinstance(model, DDP): + raise ValueError("load_checkpoint before DDP") + + saved_params = load_checkpoint( + filename, + model=model, + model_avg=model_avg, + optimizer=optimizer, + scheduler=scheduler, + ) + + saved_stage = saved_params.get("train_stage", 0) + if params.train_stage != saved_stage: + # switch training stage + if params.train_stage and saved_stage: # switch between 1 and 2 + params.start_epoch = 1 + params.start_batch = 0 + else: + # switch between 0 and 1/2 + assert params.num_epochs >= params.start_epoch + params.batch_idx_train = saved_params["batch_idx_train"] + + for key in ["optimizer", "grad_scaler", "sampler"]: + if key in saved_params: + saved_params.pop(key) + + # when base on stage 0, we keep scheduler + if saved_stage != 0: + for key in ["scheduler"]: + if key in saved_params: + saved_params.pop(key) + + best_train_filename = params.exp_dir / "best-train-loss.pt" + if best_train_filename.is_file(): + copyfile( + src=best_train_filename, + dst=params.exp_dir / f"best-train-loss-stage{saved_stage}.pt", + ) + + best_valid_filename = params.exp_dir / "best-valid-loss.pt" + if best_valid_filename.is_file(): + copyfile( + src=best_valid_filename, + dst=params.exp_dir / f"best-valid-loss-stage{saved_stage}.pt", + ) + else: + + keys = [ + "best_train_epoch", + "best_valid_epoch", + "batch_idx_train", + "best_train_loss", + "best_valid_loss", + ] + for k in keys: + params[k] = saved_params[k] + + if params.start_batch > 0: + if "cur_epoch" in saved_params: + params["start_epoch"] = saved_params["cur_epoch"] + + return saved_params + + +def save_checkpoint( + params: AttributeDict, + model: Union[nn.Module, DDP], + model_avg: Optional[nn.Module] = None, + optimizer: Optional[torch.optim.Optimizer] = None, + scheduler: Optional[LRSchedulerType] = None, + sampler = None, + scaler: Optional[GradScaler] = None, + rank: int = 0, +) -> None: + """Save model, optimizer, scheduler and training stats to file. + + Args: + params: + It is returned by :func:`get_params`. + model: + The training model. + model_avg: + The stored model averaged from the start of training. + optimizer: + The optimizer used in the training. + sampler: + The sampler for the training dataset. + scaler: + The scaler used for mix precision training. + """ + if rank != 0: + return + filename = params.exp_dir / f"epoch-{params.cur_epoch}.pt" + save_checkpoint_impl( + filename=filename, + model=model, + model_avg=model_avg, + params=params, + optimizer=optimizer, + scheduler=scheduler, + sampler=sampler, + scaler=scaler, + rank=rank, + ) + + if params.best_train_epoch == params.cur_epoch: + best_train_filename = params.exp_dir / "best-train-loss.pt" + copyfile(src=filename, dst=best_train_filename) + + if params.best_valid_epoch == params.cur_epoch: + best_valid_filename = params.exp_dir / "best-valid-loss.pt" + copyfile(src=filename, dst=best_valid_filename) + + +def compute_loss( + params: AttributeDict, + model: Union[nn.Module, DDP], + batch: dict, + is_training: bool, +) -> Tuple[Tensor, MetricsTracker]: + """ + Compute transducer loss given the model and its inputs. + + Args: + params: + Parameters for training. See :func:`get_params`. + model: + The model for training. It is an instance of Zipformer in our case. + batch: + A batch of data. See `lhotse.dataset.K2SpeechRecognitionDataset()` + for the content in it. + is_training: + True for training. False for validation. When it is True, this + function enables autograd during computation; when it is False, it + disables autograd. + warmup: a floating point value which increases throughout training; + values >= 1.0 are fully warmed up and have all modules present. + """ + device = ( + model.device + if isinstance(model, DDP) + else next(model.parameters()).device + ) + # at entry, TextTokens is (N, P) + text_tokens = batch["text_tokens"].to(device) + text_tokens_lens = batch["text_tokens_lens"].to(device) + assert text_tokens.ndim == 2 + + audio_features = batch["audio_features"].to(device) + audio_features_lens = batch["audio_features_lens"].to(device) + assert audio_features.ndim == 3 + + with torch.set_grad_enabled(is_training): + predicts, loss, metrics = model( + x=text_tokens, + x_lens=text_tokens_lens, + y=audio_features, + y_lens=audio_features_lens, + train_stage=params.train_stage, + ) + + assert loss.requires_grad == is_training + + info = MetricsTracker() + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + info["frames"] = (audio_features_lens).sum().item() + info["utterances"] = text_tokens.size(0) + + # Note: We use reduction=sum while computing the loss. + info["loss"] = loss.detach().cpu().item() + for metric in metrics: + info[metric] = metrics[metric].detach().cpu().item() + del metrics + + return predicts, loss, info + + +def compute_validation_loss( + params: AttributeDict, + model: Union[nn.Module, DDP], + valid_dl: torch.utils.data.DataLoader, + world_size: int = 1, +) -> MetricsTracker: + """Run the validation process.""" + tot_loss = MetricsTracker() + + for batch_idx, batch in enumerate(valid_dl): + predicts, loss, loss_info = compute_loss( + params=params, + model=model, + batch=batch, + is_training=False, + ) + assert loss.requires_grad is False + tot_loss = tot_loss + loss_info + if world_size > 1: + tot_loss.reduce(loss.device) + loss_value = tot_loss["loss"] / tot_loss["frames"] + if loss_value < params.best_valid_loss: + params.best_valid_epoch = params.cur_epoch + params.best_valid_loss = loss_value + + if params.visualize: + output_dir = Path( + f"{params.exp_dir}/eval/step-{params.batch_idx_train:06d}" + ) + output_dir.mkdir(parents=True, exist_ok=True) + if isinstance(model, DDP): + model.module.visualize(predicts, batch, output_dir=output_dir) + else: + model.visualize(predicts, batch, output_dir=output_dir) + + return tot_loss + + +def train_one_epoch( + params: AttributeDict, + model: Union[nn.Module, DDP], + optimizer: torch.optim.Optimizer, + scheduler: LRSchedulerType, + train_dl: torch.utils.data.DataLoader, + valid_dl: torch.utils.data.DataLoader, + rng: random.Random, + scaler: GradScaler, + model_avg: Optional[nn.Module] = None, + tb_writer: Optional[SummaryWriter] = None, + world_size: int = 1, + rank: int = 0, +) -> None: + """Train the model for one epoch. + + The training loss from the mean of all frames is saved in + `params.train_loss`. It runs the validation process every + `params.valid_interval` batches. + + Args: + params: + It is returned by :func:`get_params`. + model: + The model for training. + optimizer: + The optimizer we are using. + scheduler: + The learning rate scheduler, we call step() every step. + train_dl: + Dataloader for the training dataset. + valid_dl: + Dataloader for the validation dataset. + rng: + Random for selecting. + scaler: + The scaler used for mix precision training. + model_avg: + The stored model averaged from the start of training. + tb_writer: + Writer to write log messages to tensorboard. + world_size: + Number of nodes in DDP training. If it is 1, DDP is disabled. + rank: + The rank of the node in DDP training. If no DDP is used, it should + be set to 0. + """ + model.train() + tot_loss = MetricsTracker() + iter_dl = iter(train_dl) + + dtype, enabled = torch.float32, False + if params.dtype in ["bfloat16", "bf16"]: + dtype, enabled = torch.bfloat16, True + elif params.dtype in ["float16", "fp16"]: + dtype, enabled = torch.float16, True + + batch_idx = 0 + accumulation_steps = 5 # 设置梯度累积步数 + grad_accumulation_count = 0 # 用于跟踪梯度累积的计数器 + + while True: + try: + batch = next(iter_dl) + except StopIteration: + logging.info("Reaches end of dataloader.") + break + + batch_idx += 1 + params.batch_idx_train += 1 + batch_size = len(batch["text"]) + + try: + with torch.cuda.amp.autocast(dtype=dtype, enabled=enabled): + _, loss, loss_info = compute_loss( + params=params, + model=model, + batch=batch, + is_training=True, + ) + + # summary stats + tot_loss = ( + tot_loss * (1 - 1 / params.reset_interval) + ) + loss_info * (1 / params.reset_interval) + + # 梯度累积 + scaler.scale(loss / accumulation_steps).backward() + grad_accumulation_count += 1 + + if grad_accumulation_count % accumulation_steps == 0 or params.batch_idx_train >= params.accumulate_grad_steps: + if ( + params.batch_idx_train % params.accumulate_grad_steps + == 0 + ): + if params.optimizer_name not in ["ScaledAdam", "Eve"]: + # Unscales the gradients of optimizer's assigned params in-place + scaler.unscale_(optimizer) + # Since the gradients of optimizer's assigned params are unscaled, clips as usual: + torch.nn.utils.clip_grad_norm_( + model.parameters(), 1.0 + ) + + scaler.step(optimizer) + scaler.update() + optimizer.zero_grad() + grad_accumulation_count = 0 # 重置梯度累积计数器 + + for k in range(params.accumulate_grad_steps): + if isinstance(scheduler, Eden): + scheduler.step_batch(params.batch_idx_train) + else: + scheduler.step() + + set_batch_count(model, params.batch_idx_train) + except: # noqa + display_and_save_batch(batch, params=params) + raise + + if params.average_period > 0: + if ( + params.batch_idx_train > 0 + and params.batch_idx_train % params.average_period == 0 + ): + # Perform Operation in rank 0 + if rank == 0: + update_averaged_model( + params=params, + model_cur=model, + model_avg=model_avg, + ) + + if ( + params.batch_idx_train > 0 + and params.batch_idx_train % params.save_every_n == 0 + ): + # Perform Operation in rank 0 + if rank == 0: + save_checkpoint_with_global_batch_idx( + out_dir=params.exp_dir, + global_batch_idx=params.batch_idx_train, + model=model, + model_avg=model_avg, + params=params, + optimizer=optimizer, + scheduler=scheduler, + sampler=None, + scaler=scaler, + rank=rank, + ) + remove_checkpoints( + out_dir=params.exp_dir, + topk=params.keep_last_k, + # rank=rank, + ) + + if batch_idx % 100 == 0 and params.dtype in ["float16", "fp16"]: + # If the grad scale was less than 1, try increasing it. The _growth_interval + # of the grad scaler is configurable, but we can't configure it to have different + # behavior depending on the current grad scale. + cur_grad_scale = scaler._scale.item() + if cur_grad_scale < 1.0 or ( + cur_grad_scale < 8.0 and batch_idx % 400 == 0 + ): + scaler.update(cur_grad_scale * 2.0) + + if cur_grad_scale < 0.01: + logging.warning(f"Grad scale is small: {cur_grad_scale}") + if cur_grad_scale < 1.0e-05: + raise RuntimeError( + f"grad_scale is too small, exiting: {cur_grad_scale}" + ) + + if batch_idx % params.log_interval == 0: + cur_lr = scheduler.get_last_lr()[0] + cur_grad_scale = ( + scaler._scale.item() + if params.dtype in ["float16", "fp16"] + else 1.0 + ) + + logging.info( + f"Epoch {params.cur_epoch}, " + f"batch {batch_idx}, train_loss[{loss_info}], " + f"tot_loss[{tot_loss}], " + f"batch size: {batch_size}, " + f"lr: {cur_lr:.2e}" + + ( + f", grad_scale: {cur_grad_scale}" + if params.dtype in ["float16", "fp16"] + else "" + ) + ) + + if tb_writer is not None: + tb_writer.add_scalar( + "train/learning_rate", cur_lr, params.batch_idx_train + ) + loss_info.write_summary( + tb_writer, + "train/current_", + params.batch_idx_train, + ) + tot_loss.write_summary( + tb_writer, "train/tot_", params.batch_idx_train + ) + tot_loss.write_summary( + tb_writer, "train/tot_", params.batch_idx_train + ) + if params.dtype in ["float16", "fp16"]: + tb_writer.add_scalar( + "train/grad_scale", + cur_grad_scale, + params.batch_idx_train, + ) + + if params.batch_idx_train % params.valid_interval == 0: + # Calculate validation loss in Rank 0 + model.eval() + logging.info("Computing validation loss") + with torch.cuda.amp.autocast(dtype=dtype): + valid_info = compute_validation_loss( + params=params, + model=model, + valid_dl=valid_dl, + world_size=world_size, + ) + logging.info( + f"Epoch {params.cur_epoch}, validation: {valid_info}" + ) + logging.info( + f"Maximum memory allocated so far is {torch.cuda.max_memory_allocated()//1000000}MB" + ) + + if tb_writer is not None: + valid_info.write_summary( + tb_writer, "train/valid_", params.batch_idx_train + ) + + model.train() + + loss_value = tot_loss["loss"] / tot_loss["frames"] + params.train_loss = loss_value + if params.train_loss < params.best_train_loss: + params.best_train_epoch = params.cur_epoch + params.best_train_loss = params.train_loss + +def run(rank, world_size, args): + """ + Args: + rank: + It is a value between 0 and `world_size-1`, which is + passed automatically by `mp.spawn()` in :func:`main`. + The node with rank 0 is responsible for saving checkpoint. + world_size: + Number of GPUs for DDP training. + args: + The return value of get_parser().parse_args() + """ + params = get_params() + params.update(vars(args)) + + fix_random_seed(params.seed) + rng = random.Random(params.seed) + if world_size > 1: + setup_dist(rank, world_size, params.master_port) + + setup_logger(f"{params.exp_dir}/log/log-train") + logging.info("Training started") + + if args.tensorboard and rank == 0: + if params.train_stage: + tb_writer = SummaryWriter( + log_dir=f"{params.exp_dir}/tensorboard_stage{params.train_stage}" + ) + else: + tb_writer = SummaryWriter(log_dir=f"{params.exp_dir}/tensorboard") + else: + tb_writer = None + + device = torch.device("cpu") + if torch.cuda.is_available(): + device = torch.device("cuda", rank) + # https://pytorch.org/docs/stable/notes/cuda.html#tensorfloat-32-tf32-on-ampere-devices + torch.backends.cudnn.allow_tf32 = True + torch.backends.cuda.matmul.allow_tf32 = True + + logging.info(f"Device: {device}") + logging.info(params) + + logging.info("About to create model") + model, codec, vocos = get_model(device) + + num_param = sum([p.numel() for p in model.parameters()]) + logging.info(f"Number of model parameters: {num_param}") + + assert params.save_every_n >= params.average_period + model_avg: Optional[nn.Module] = None + if rank == 0 and params.average_period > 0: + # model_avg is only used with rank 0 + model_avg = copy.deepcopy(model).to(torch.float64) + + assert params.start_epoch > 0, params.start_epoch + checkpoints = load_checkpoint_if_available( + params=params, model=model, model_avg=model_avg + ) + + model.to(device) + if world_size > 1: + logging.info("Using DDP") + model = DDP(model, device_ids=[rank], find_unused_parameters=True) + + if params.train_stage: + _model = model.module if isinstance(model, DDP) else model + model_parameters = _model.stage_parameters(params.train_stage) + else: + model_parameters = model.parameters() + + if params.optimizer_name == "ScaledAdam": + parameters_names = [] + if params.train_stage: # != 0 + _model = model.module if isinstance(model, DDP) else model + parameters_names.append( + [ + name_param_pair[0] + for name_param_pair in _model.stage_named_parameters( + params.train_stage + ) + ] + ) + else: + parameters_names.append( + [ + name_param_pair[0] + for name_param_pair in model.named_parameters() + ] + ) + + optimizer = ScaledAdam( + model_parameters, + lr=params.base_lr, + betas=(0.9, 0.95), + clipping_scale=2.0, + parameters_names=parameters_names, + show_dominant_parameters=False, + clipping_update_period=1000, + ) + elif params.optimizer_name == "Eve": + optimizer = Eve( + model_parameters, + lr=params.base_lr, + betas=(0.9, 0.98), + target_rms=0.1, + ) + elif params.optimizer_name == "AdamW": + optimizer = torch.optim.AdamW( + model_parameters, + lr=params.base_lr, + betas=(0.9, 0.95), + weight_decay=1e-2, + eps=1e-8, + ) + elif params.optimizer_name == "Adam": + optimizer = torch.optim.Adam( + model_parameters, + lr=params.base_lr, + betas=(0.9, 0.95), + eps=1e-8, + ) + else: + raise NotImplementedError() + + scheduler = get_scheduler(params, optimizer) + optimizer.zero_grad() + + if checkpoints and "optimizer" in checkpoints: + logging.info("Loading optimizer state dict") + optimizer.load_state_dict(checkpoints["optimizer"]) + + if ( + checkpoints + and "scheduler" in checkpoints + and checkpoints["scheduler"] is not None + ): + logging.info("Loading scheduler state dict") + scheduler.load_state_dict(checkpoints["scheduler"]) + + if params.inf_check: + register_inf_check_hooks(model) + + if params.start_batch > 0 and checkpoints and "sampler" in checkpoints: + sampler_state_dict = checkpoints["sampler"] + else: + sampler_state_dict = None + + train_dl = create_dataset(params.train_dir, dataloader_process_only=False) + valid_dl = create_dataset(params.valid_dir, dataloader_process_only=False) + + scaler = GradScaler( + enabled=(params.dtype in ["fp16", "float16"]), init_scale=1.0 + ) + if checkpoints and "grad_scaler" in checkpoints: + logging.info("Loading grad scaler state dict") + scaler.load_state_dict(checkpoints["grad_scaler"]) + + for epoch in range(params.start_epoch, params.num_epochs + 1): + if isinstance(scheduler, Eden): + scheduler.step_epoch(epoch - 1) + + fix_random_seed(params.seed + epoch - 1) + train_dl.batch_sampler.set_epoch(epoch - 1) + + if tb_writer is not None: + tb_writer.add_scalar("train/epoch", epoch, params.batch_idx_train) + + params.cur_epoch = epoch + + train_one_epoch( + params=params, + model=model, + model_avg=model_avg, + optimizer=optimizer, + scheduler=scheduler, + train_dl=train_dl, + valid_dl=valid_dl, + rng=rng, + scaler=scaler, + tb_writer=tb_writer, + world_size=world_size, + rank=rank, + ) + + save_checkpoint( + params=params, + model=model, + model_avg=model_avg, + optimizer=optimizer, + scheduler=scheduler, + sampler=None, + scaler=scaler, + rank=rank, + ) + + logging.info("Done!") + + if world_size > 1: + torch.distributed.barrier() + cleanup_dist() + + +def display_and_save_batch( + batch: dict, + params: AttributeDict, +) -> None: + """Display the batch statistics and save the batch into disk. + + Args: + batch: + A batch of data. See `lhotse.dataset.K2SpeechRecognitionDataset()` + for the content in it. + params: + Parameters for training. See :func:`get_params`. + """ + + filename = f"{params.exp_dir}/batch-{uuid4()}.pt" + logging.info(f"Saving batch to {filename}") + torch.save(batch, filename) + +def main(): + parser = get_parser() + args = parser.parse_args() + args.exp_dir = Path(args.exp_dir) + + world_size = args.world_size + assert world_size >= 1 + if world_size > 1: + mp.spawn(run, args=(world_size, args), nprocs=world_size, join=True) + else: + run(rank=0, world_size=1, args=args) + + +torch.set_num_threads(1) +torch.set_num_interop_threads(1) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..43c68b1c9cef577395ec8bc5dc17ba27c4b99d31 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Songting + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/customs/.ipynb_checkpoints/make_custom_dataset-checkpoint.py b/customs/.ipynb_checkpoints/make_custom_dataset-checkpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..fd0f837bf0b6b18b6f0a033318cd5da953778f9a --- /dev/null +++ b/customs/.ipynb_checkpoints/make_custom_dataset-checkpoint.py @@ -0,0 +1,83 @@ +import h5py +import glob +import torch +import numpy as np +import os +import torchaudio +import soundfile as sf +from utils.g2p.symbols import symbols +from utils.g2p import PhonemeBpeTokenizer +from utils.prompt_making import make_prompt, make_transcript +from data.collation import get_text_token_collater +from data.dataset import create_dataloader + +# Mappings from symbol to numeric ID and vice versa: +_symbol_to_id = {s: i for i, s in enumerate(symbols)} +_id_to_symbol = {i: s for i, s in enumerate(symbols)} +from data.tokenizer import ( + AudioTokenizer, + tokenize_audio, +) + +tokenizer_path = "./utils/g2p/bpe_175.json" +tokenizer = PhonemeBpeTokenizer(tokenizer_path) +device = 'cuda' if torch.cuda.is_available() else 'cpu' + +def make_prompts(name, audio_prompt_path, transcript=None): + text_tokenizer = PhonemeBpeTokenizer(tokenizer_path="./utils/g2p/bpe_175.json") + text_collater = get_text_token_collater() + codec = AudioTokenizer(device) + wav_pr, sr = torchaudio.load(audio_prompt_path) + # check length + if wav_pr.size(-1) / sr > 15: + raise ValueError(f"Prompt too long, expect length below 15 seconds, got {wav_pr / sr} seconds.") + if wav_pr.size(0) == 2: + wav_pr = wav_pr.mean(0, keepdim=True) + text_pr, lang_pr = make_transcript(name, wav_pr, sr, transcript) + + # tokenize audio + encoded_frames = tokenize_audio(codec, (wav_pr, sr)) + audio_tokens = encoded_frames[0][0].transpose(2, 1).cpu().numpy() + + # tokenize text + phonemes, langs = text_tokenizer.tokenize(text=f"{text_pr}".strip()) + text_tokens, enroll_x_lens = text_collater( + [ + phonemes + ] + ) + + return audio_tokens, text_tokens, langs, text_pr + +def create_dataset(data_dir, dataloader_process_only): + if dataloader_process_only: + h5_output_path=f"{data_dir}/audio_sum.hdf5" + ann_output_path=f"{data_dir}/audio_ann_sum.txt" + #audio_folder = os.path.join(data_dir, 'audio') + audio_paths = glob.glob(f"{data_dir}/*.wav") # Change this to match your audio file extension + + # Create or open an HDF5 file + with h5py.File(h5_output_path, 'w') as h5_file: + # Loop through each audio and text file, assuming they have the same stem + for audio_path in audio_paths: + stem = os.path.splitext(os.path.basename(audio_path))[0] + audio_tokens, text_tokens, langs, text = make_prompts(name=stem, audio_prompt_path=audio_path) + + text_tokens = text_tokens.squeeze(0) + # Create a group for each stem + grp = h5_file.create_group(stem) + # Add audio and text tokens as datasets to the group + grp.create_dataset('audio', data=audio_tokens) + #grp.create_dataset('text', data=text_tokens) + + with open(ann_output_path, 'a', encoding='utf-8') as ann_file: + try: + audio, sample_rate = sf.read(audio_path) + duration = len(audio) / sample_rate + ann_file.write(f'{stem}|{duration}|{langs[0]}|{text}\n') # 改行を追加 + print(f"Successfully wrote to {ann_output_path}") + except Exception as e: + print(f"An error occurred: {e}") + else: + dataloader = create_dataloader(data_dir=data_dir, max_duration=20) + return dataloader \ No newline at end of file diff --git a/customs/make_custom_dataset.py b/customs/make_custom_dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..fd0f837bf0b6b18b6f0a033318cd5da953778f9a --- /dev/null +++ b/customs/make_custom_dataset.py @@ -0,0 +1,83 @@ +import h5py +import glob +import torch +import numpy as np +import os +import torchaudio +import soundfile as sf +from utils.g2p.symbols import symbols +from utils.g2p import PhonemeBpeTokenizer +from utils.prompt_making import make_prompt, make_transcript +from data.collation import get_text_token_collater +from data.dataset import create_dataloader + +# Mappings from symbol to numeric ID and vice versa: +_symbol_to_id = {s: i for i, s in enumerate(symbols)} +_id_to_symbol = {i: s for i, s in enumerate(symbols)} +from data.tokenizer import ( + AudioTokenizer, + tokenize_audio, +) + +tokenizer_path = "./utils/g2p/bpe_175.json" +tokenizer = PhonemeBpeTokenizer(tokenizer_path) +device = 'cuda' if torch.cuda.is_available() else 'cpu' + +def make_prompts(name, audio_prompt_path, transcript=None): + text_tokenizer = PhonemeBpeTokenizer(tokenizer_path="./utils/g2p/bpe_175.json") + text_collater = get_text_token_collater() + codec = AudioTokenizer(device) + wav_pr, sr = torchaudio.load(audio_prompt_path) + # check length + if wav_pr.size(-1) / sr > 15: + raise ValueError(f"Prompt too long, expect length below 15 seconds, got {wav_pr / sr} seconds.") + if wav_pr.size(0) == 2: + wav_pr = wav_pr.mean(0, keepdim=True) + text_pr, lang_pr = make_transcript(name, wav_pr, sr, transcript) + + # tokenize audio + encoded_frames = tokenize_audio(codec, (wav_pr, sr)) + audio_tokens = encoded_frames[0][0].transpose(2, 1).cpu().numpy() + + # tokenize text + phonemes, langs = text_tokenizer.tokenize(text=f"{text_pr}".strip()) + text_tokens, enroll_x_lens = text_collater( + [ + phonemes + ] + ) + + return audio_tokens, text_tokens, langs, text_pr + +def create_dataset(data_dir, dataloader_process_only): + if dataloader_process_only: + h5_output_path=f"{data_dir}/audio_sum.hdf5" + ann_output_path=f"{data_dir}/audio_ann_sum.txt" + #audio_folder = os.path.join(data_dir, 'audio') + audio_paths = glob.glob(f"{data_dir}/*.wav") # Change this to match your audio file extension + + # Create or open an HDF5 file + with h5py.File(h5_output_path, 'w') as h5_file: + # Loop through each audio and text file, assuming they have the same stem + for audio_path in audio_paths: + stem = os.path.splitext(os.path.basename(audio_path))[0] + audio_tokens, text_tokens, langs, text = make_prompts(name=stem, audio_prompt_path=audio_path) + + text_tokens = text_tokens.squeeze(0) + # Create a group for each stem + grp = h5_file.create_group(stem) + # Add audio and text tokens as datasets to the group + grp.create_dataset('audio', data=audio_tokens) + #grp.create_dataset('text', data=text_tokens) + + with open(ann_output_path, 'a', encoding='utf-8') as ann_file: + try: + audio, sample_rate = sf.read(audio_path) + duration = len(audio) / sample_rate + ann_file.write(f'{stem}|{duration}|{langs[0]}|{text}\n') # 改行を追加 + print(f"Successfully wrote to {ann_output_path}") + except Exception as e: + print(f"An error occurred: {e}") + else: + dataloader = create_dataloader(data_dir=data_dir, max_duration=20) + return dataloader \ No newline at end of file diff --git a/customs/ph.txt b/customs/ph.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/data/.ipynb_checkpoints/dataset-checkpoint.py b/data/.ipynb_checkpoints/dataset-checkpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..08d88e51773509d509441bd670ba5ac55d23ca69 --- /dev/null +++ b/data/.ipynb_checkpoints/dataset-checkpoint.py @@ -0,0 +1,251 @@ +# Copyright 2023 (authors: Feiteng Li) +# +# See ../../../../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +modified from lhoste.dataset.speech_synthesis.py +""" + +import torch +import math +import h5py +from tokenizers import Tokenizer +from typing import Union, List +import numpy as np +from tqdm import tqdm +from utils.g2p import PhonemeBpeTokenizer +from data.collation import get_text_token_collater +text_collater = get_text_token_collater() + +_pad = '_' +_punctuation = ',.!?-~…' +_letters = 'NQabdefghijklmnopstuvwxyzɑæʃʑçɯɪɔɛɹðəɫɥɸʊɾʒθβŋɦ⁼ʰ`^#*=ˈˌ→↓↑ ' +symbols = [_pad] + list(_punctuation) + list(_letters) + +language_dict = { + 'en': 0, + 'zh': 1, + 'ja': 2, + 'vi': 3, +} +def seq2phone(tokens: Union[List, np.ndarray]): + """ + Convert tokenized phoneme ID sequence back to phoneme string + :param tokens: phoneme tokens + :return: recovered phoneme sequence + """ + phones = "".join([symbols[i] for i in tokens]) + return phones + +class DynamicBatchSampler(torch.utils.data.Sampler): + def __init__(self, sampler, num_tokens_fn, num_buckets=100, min_size=0, max_size=1000, + max_tokens=None, max_sentences=None, drop_last=False): + """ + + :param sampler: + :param num_tokens_fn: 根据idx返回样本的长度的函数 + :param num_buckets: 利用桶原理将相似长度的样本放在一个batchsize中,桶的数量 + :param min_size: 最小长度的样本, 小于这个值的样本会被过滤掉。 依据这个值来创建样桶 + :param max_size: 最大长度的样本 + :param max_sentences: batch_size, 但是这里可以通过max_sentences 和 max_tokens 共同控制最终的大小 + """ + super(DynamicBatchSampler, self).__init__(sampler) + self.sampler = sampler + self.num_tokens_fn = num_tokens_fn + self.num_buckets = num_buckets + + self.min_size = min_size + self.max_size = max_size + + assert max_size <= max_tokens, "max_size should be smaller than max tokens" + assert max_tokens is not None or max_sentences is not None, \ + "max_tokens and max_sentences should not be null at the same time, please specify one parameter at least" + self.max_tokens = max_tokens if max_tokens is not None else float('Inf') + self.max_sentences = max_sentences if max_sentences is not None else float('Inf') + self.drop_last = drop_last + + def set_epoch(self, epoch): + self.sampler.set_epoch(epoch) + def is_batch_full(self, num_tokens, batch): + if len(batch) == 0: + return False + if len(batch) == self.max_sentences: + return True + if num_tokens > self.max_tokens: + return True + return False + + def __iter__(self): + buckets = [[] for _ in range(self.num_buckets)] + sample_len = [0] * self.num_buckets + + for idx in self.sampler: + idx_length = self.num_tokens_fn(idx) + if not (self.min_size <= idx_length <= self.max_size): + print("sentence at index {} of size {} exceeds max_tokens, the sentence is ignored".format(idx, idx_length)) + continue + + index_buckets = math.floor((idx_length - self.min_size) / (self.max_size - self.min_size + 1) + * self.num_buckets) + sample_len[index_buckets] = max(sample_len[index_buckets], idx_length) + + num_tokens = (len(buckets[index_buckets]) + 1) * sample_len[index_buckets] + if self.is_batch_full(num_tokens, buckets[index_buckets]): + # yield this batch + yield buckets[index_buckets] + buckets[index_buckets] = [] + sample_len[index_buckets] = 0 + + buckets[index_buckets].append(idx) + + # process left-over + leftover_batch = [] + leftover_sample_len = 0 + leftover = [idx for bucket in buckets for idx in bucket] + for idx in leftover: + idx_length = self.num_tokens_fn(idx) + leftover_sample_len = max(leftover_sample_len, idx_length) + num_tokens = (len(leftover_batch) + 1) * leftover_sample_len + if self.is_batch_full(num_tokens, leftover_batch): + yield leftover_batch + leftover_batch = [] + leftover_sample_len = 0 + leftover_batch.append(idx) + + if len(leftover_batch) > 0 and not self.drop_last: + yield leftover_batch + + def __len__(self): + # we do not know the exactly batch size, so do not call len(dataloader) + pass + + +class AudioDataset(torch.utils.data.Dataset): + def __init__(self, h5_path, ann_path, tokenizer_path): + self.h5_path = h5_path + with open(ann_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + ls = [l.split("|") for l in lines] + ls_T = list(zip(*ls)) + #del ls_T[-1] + self.h5_paths, self.durations, self.langs, self.texts = \ + list(ls_T[0]), list(ls_T[1]), list(ls_T[2]), list(ls_T[3]) + self.durations = [float(dur) for dur in self.durations] + self.tokenizer = PhonemeBpeTokenizer(tokenizer_path) + self._archive = None + + def __len__(self): + return len(self.h5_paths) + + def get_dur(self, idx): + return self.durations[idx] + + @property + def archive(self): + if self._archive is None: # lazy loading here! + self._archive = h5py.File(self.h5_path, "r") + return self._archive + def __getitem__(self, idx): + archive = self.archive + h5_path = self.h5_paths[idx] + sub = archive[h5_path] + audio_tokens = sub['audio'][()] + #phone_tokens = sub['text'][()] + dur = self.durations[idx] + lang = self.langs[idx] + text = self.texts[idx] + # tokenization should be done within dataloader + #phones = seq2phone(phone_tokens) + #phones = phones.replace(" ", "_") + phonemes, langs = self.tokenizer.tokenize(text=f"{text}".strip()) + cptpho_tokens, enroll_x_lens = text_collater([phonemes]) + cptpho_tokens = cptpho_tokens.squeeze(0) + text_token_lens = enroll_x_lens[0] + ''' + if not len(phones): + cptpho_tokens = self.tokenizer.encode(text).ids + else: + cptpho_tokens = self.tokenizer.encode(phones).ids + ''' + assert len(cptpho_tokens) + return { + 'utt_id': h5_path, + 'text': text, + 'audio': None, + 'audio_lens': None, + 'audio_features': audio_tokens, + 'audio_features_lens': audio_tokens.shape[1], + 'text_tokens': np.array(cptpho_tokens), + 'text_tokens_lens': text_token_lens, + 'language': language_dict[lang], + } + +def collate(batch): + utt_id_s = [b['utt_id'] for b in batch] + text_s = [b['text'] for b in batch] + + audio_s = [b['audio'] for b in batch] + audio_lens_s = [b['audio_lens'] for b in batch] + + audio_features_lens_s = [b['audio_features_lens'] for b in batch] + # create an empty tensor with maximum audio feature length + audio_features_s = torch.zeros([len(batch), max(audio_features_lens_s), 8], dtype=torch.int64) - 1 # audio pad with -1 + + text_tokens_lens_s = [b['text_tokens_lens'] for b in batch] + # create an empty tensor with maximum text tokens length + text_tokens_s = torch.zeros([len(batch), max(text_tokens_lens_s)], dtype=torch.int64) + 3 # [PAD] token id 3 + + language_s = [b['language'] for b in batch] + + for i, b in enumerate(batch): + audio_features = b['audio_features'] + audio_features_lens = b['audio_features_lens'] + audio_features_s[i, :audio_features_lens, :] = torch.LongTensor(audio_features) + + text_tokens = b['text_tokens'] + text_tokens_lens = b['text_tokens_lens'] + text_tokens_s[i, :text_tokens_lens] = torch.LongTensor(text_tokens) + + batch = { + 'utt_id': utt_id_s, + 'text': text_s, + 'audio': audio_s, + 'audio_lens': audio_lens_s, + 'audio_features': audio_features_s, + 'audio_features_lens': torch.LongTensor(np.array(audio_features_lens_s)), + 'text_tokens': text_tokens_s, + 'text_tokens_lens': torch.LongTensor(np.array(text_tokens_lens_s)), + 'languages': torch.LongTensor(np.array(language_s)), + } + return batch + +def create_dataloader(data_dir="/root/valle/egs/mix", n_gpus=1, rank=0, num_workers=0, num_buckets=10, max_duration=120): + train_dataset = AudioDataset(h5_path=f"{data_dir}/audio_sum.hdf5", + ann_path=f"{data_dir}/audio_ann_sum.txt", + tokenizer_path=f"{data_dir}/bpe_175.json") + ran_sampler = torch.utils.data.distributed.DistributedSampler( + train_dataset, + num_replicas=n_gpus, + rank=rank, + shuffle=True, + ) + dynamic_sampler = DynamicBatchSampler(ran_sampler, train_dataset.get_dur, num_buckets=num_buckets, max_size=20, + max_tokens=max_duration) + + + train_loader = torch.utils.data.DataLoader(train_dataset, num_workers=num_workers, collate_fn=collate, + batch_sampler=dynamic_sampler) + + return train_loader diff --git a/data/__init__.py b/data/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..10b382e660f62e45dd9fc62de9e1503765da875d --- /dev/null +++ b/data/__init__.py @@ -0,0 +1,3 @@ +# from .datamodule import * +# from .tokenizer import * +from .collation import * diff --git a/data/collation.py b/data/collation.py new file mode 100644 index 0000000000000000000000000000000000000000..921850c93a33902c58ad54a068d3f5391b82e684 --- /dev/null +++ b/data/collation.py @@ -0,0 +1,120 @@ +from pathlib import Path +from typing import List, Tuple + +import numpy as np +import torch + +from utils import SymbolTable + + +class TextTokenCollater: + """Collate list of text tokens + + Map sentences to integers. Sentences are padded to equal length. + Beginning and end-of-sequence symbols can be added. + + Example: + >>> token_collater = TextTokenCollater(text_tokens) + >>> tokens_batch, tokens_lens = token_collater(text) + + Returns: + tokens_batch: IntTensor of shape (B, L) + B: batch dimension, number of input sentences + L: length of the longest sentence + tokens_lens: IntTensor of shape (B,) + Length of each sentence after adding and + but before padding. + """ + + def __init__( + self, + text_tokens: List[str], + add_eos: bool = True, + add_bos: bool = True, + pad_symbol: str = "", + bos_symbol: str = "", + eos_symbol: str = "", + ): + self.pad_symbol = pad_symbol + + self.add_eos = add_eos + self.add_bos = add_bos + + self.bos_symbol = bos_symbol + self.eos_symbol = eos_symbol + + unique_tokens = ( + [pad_symbol] + + ([bos_symbol] if add_bos else []) + + ([eos_symbol] if add_eos else []) + + sorted(text_tokens) + ) + + self.token2idx = {token: idx for idx, token in enumerate(unique_tokens)} + self.idx2token = [token for token in unique_tokens] + + def index( + self, tokens_list: List[str] + ) -> Tuple[torch.Tensor, torch.Tensor]: + seqs, seq_lens = [], [] + for tokens in tokens_list: + assert ( + all([True if s in self.token2idx else False for s in tokens]) + is True + ) + seq = ( + ([self.bos_symbol] if self.add_bos else []) + + list(tokens) + + ([self.eos_symbol] if self.add_eos else []) + ) + seqs.append(seq) + seq_lens.append(len(seq)) + + max_len = max(seq_lens) + for k, (seq, seq_len) in enumerate(zip(seqs, seq_lens)): + seq.extend([self.pad_symbol] * (max_len - seq_len)) + + tokens = torch.from_numpy( + np.array( + [[self.token2idx[token] for token in seq] for seq in seqs], + dtype=np.int64, + ) + ) + tokens_lens = torch.IntTensor(seq_lens) + + return tokens, tokens_lens + + def __call__(self, texts: List[str]) -> Tuple[torch.Tensor, torch.Tensor]: + tokens_seqs = [[p for p in text] for text in texts] + max_len = len(max(tokens_seqs, key=len)) + + seqs = [ + ([self.bos_symbol] if self.add_bos else []) + + list(seq) + + ([self.eos_symbol] if self.add_eos else []) + + [self.pad_symbol] * (max_len - len(seq)) + for seq in tokens_seqs + ] + + tokens_batch = torch.from_numpy( + np.array( + [seq for seq in seqs], + dtype=np.int64, + ) + ) + + tokens_lens = torch.IntTensor( + [ + len(seq) + int(self.add_eos) + int(self.add_bos) + for seq in tokens_seqs + ] + ) + + return tokens_batch, tokens_lens + + +def get_text_token_collater() -> TextTokenCollater: + collater = TextTokenCollater( + ['0'], add_bos=False, add_eos=False + ) + return collater diff --git a/data/datamodule.py b/data/datamodule.py new file mode 100644 index 0000000000000000000000000000000000000000..9df73ad2ce44d166461909ca5096f3101cbd8b37 --- /dev/null +++ b/data/datamodule.py @@ -0,0 +1,419 @@ +# Copyright 2023 (authors: Feiteng Li) +# +# See ../../../../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import argparse +import inspect +import logging +from functools import lru_cache +from pathlib import Path +from typing import Any, Dict, Optional + +import torch +# from icefall.utils import str2bool +# from lhotse import CutSet, load_manifest_lazy +# from lhotse.dataset import ( +# CutConcatenate, +# DynamicBucketingSampler, +# PrecomputedFeatures, +# SingleCutSampler, +# SpecAugment, +# ) +# from lhotse.dataset.input_strategies import OnTheFlyFeatures +# from lhotse.utils import fix_random_seed +from torch.utils.data import DataLoader + +from data.collation import get_text_token_collater +# from data.dataset import SpeechSynthesisDataset +from data.fbank import get_fbank_extractor +from data.input_strategies import PromptedPrecomputedFeatures + +# PrecomputedFeatures = PrecomputedFeatures + + +class _SeedWorkers: + def __init__(self, seed: int): + self.seed = seed + + def __call__(self, worker_id: int): + fix_random_seed(self.seed + worker_id) + + +def _get_input_strategy(input_strategy, dataset, cuts): + if input_strategy == "PromptedPrecomputedFeatures": + return PromptedPrecomputedFeatures(dataset, cuts) + + return eval(input_strategy)() + + +class TtsDataModule: + """ + DataModule for VALL-E TTS experiments. + It assumes there is always one train and valid dataloader. + + It contains all the common data pipeline modules used in TTS + experiments, e.g.: + - dynamic batch size, + - bucketing samplers, + - cut concatenation[not used & tested yet], + - augmentation[not used & tested yet], + - on-the-fly feature extraction[not used & tested yet] + + This class should be derived for specific corpora used in TTS tasks. + """ + + def __init__(self, args: argparse.Namespace): + self.args = args + + @classmethod + def add_arguments(cls, parser: argparse.ArgumentParser): + group = parser.add_argument_group( + title="TTS data related options", + description="These options are used for the preparation of " + "PyTorch DataLoaders from Lhotse CutSet's -- they control the " + "effective batch sizes, sampling strategies, applied data " + "augmentations, etc.", + ) + group.add_argument( + "--manifest-dir", + type=Path, + default=Path("data/tokenized"), + help="Path to directory with train/valid/test cuts.", + ) + group.add_argument( + "--max-duration", + type=int, + default=40.0, + help="Maximum pooled recordings duration (seconds) in a " + "single batch. You can reduce it if it causes CUDA OOM.", + ) + group.add_argument( + "--bucketing-sampler", + type=str2bool, + default=True, + help="When enabled, the batches will come from buckets of " + "similar duration (saves padding frames).", + ) + group.add_argument( + "--num-buckets", + type=int, + default=10, + help="The number of buckets for the DynamicBucketingSampler" + "(you might want to increase it for larger datasets).", + ) + group.add_argument( + "--concatenate-cuts", + type=str2bool, + default=False, + help="When enabled, utterances (cuts) will be concatenated " + "to minimize the amount of padding.", + ) + group.add_argument( + "--duration-factor", + type=float, + default=1.0, + help="Determines the maximum duration of a concatenated cut " + "relative to the duration of the longest cut in a batch.", + ) + group.add_argument( + "--gap", + type=float, + default=0.1, + help="The amount of padding (in seconds) inserted between " + "concatenated cuts. This padding is filled with noise when " + "noise augmentation is used.", + ) + group.add_argument( + "--on-the-fly-feats", + type=str2bool, + default=False, + help="When enabled, use on-the-fly cut mixing and feature " + "extraction. Will drop existing precomputed feature manifests " + "if available.", + ) + group.add_argument( + "--shuffle", + type=str2bool, + default=True, + help="When enabled (=default), the examples will be " + "shuffled for each epoch.", + ) + group.add_argument( + "--drop-last", + type=str2bool, + default=False, + help="Whether to drop last batch. Used by sampler.", + ) + group.add_argument( + "--return-cuts", + type=str2bool, + default=True, + help="When enabled, each batch will have the " + "field: batch['supervisions']['cut'] with the cuts that " + "were used to construct it.", + ) + + group.add_argument( + "--num-workers", + type=int, + default=8, + help="The number of training dataloader workers that " + "collect the batches.", + ) + + group.add_argument( + "--enable-spec-aug", + type=str2bool, + default=False, + help="When enabled, use SpecAugment for training dataset.", + ) + + group.add_argument( + "--spec-aug-time-warp-factor", + type=int, + default=80, + help="Used only when --enable-spec-aug is True. " + "It specifies the factor for time warping in SpecAugment. " + "Larger values mean more warping. " + "A value less than 1 means to disable time warp.", + ) + + group.add_argument( + "--input-strategy", + type=str, + default="PrecomputedFeatures", + help="AudioSamples or PrecomputedFeatures or PromptedPrecomputedFeatures", + ) + + group.add_argument( + "--dataset", + type=str, + default="ljspeech", + help="--input-strategy PromptedPrecomputedFeatures needs dataset name to prepare prompts.", + ) + + parser.add_argument( + "--text-tokens", + type=str, + default="data/tokenized/unique_text_tokens.k2symbols", + help="Path to the unique text tokens file", + ) + + parser.add_argument( + "--sampling-rate", + type=int, + default=24000, + help="""Audio sampling rate.""", + ) + + def train_dataloaders( + self, + cuts_train: CutSet, + sampler_state_dict: Optional[Dict[str, Any]] = None, + ) -> DataLoader: + """ + Args: + cuts_train: + CutSet for training. + sampler_state_dict: + The state dict for the training sampler. + """ + transforms = [] + + if self.args.concatenate_cuts: + logging.info( + f"Using cut concatenation with duration factor " + f"{self.args.duration_factor} and gap {self.args.gap}." + ) + # Cut concatenation should be the first transform in the list, + # so that if we e.g. mix noise in, it will fill the gaps between + # different utterances. + transforms = [ + CutConcatenate( + duration_factor=self.args.duration_factor, gap=self.args.gap + ) + ] + transforms + + input_transforms = [] + if self.args.enable_spec_aug: + logging.info("Enable SpecAugment") + logging.info( + f"Time warp factor: {self.args.spec_aug_time_warp_factor}" + ) + # Set the value of num_frame_masks according to Lhotse's version. + # In different Lhotse's versions, the default of num_frame_masks is + # different. + num_frame_masks = 10 + num_frame_masks_parameter = inspect.signature( + SpecAugment.__init__ + ).parameters["num_frame_masks"] + if num_frame_masks_parameter.default == 1: + num_frame_masks = 2 + logging.info(f"Num frame mask: {num_frame_masks}") + input_transforms.append( + SpecAugment( + time_warp_factor=self.args.spec_aug_time_warp_factor, + num_frame_masks=num_frame_masks, + features_mask_size=27, + num_feature_masks=2, + frames_mask_size=100, + ) + ) + else: + logging.info("Disable SpecAugment") + + logging.info("About to create train dataset") + if self.args.on_the_fly_feats: + # NOTE: the PerturbSpeed transform should be added only if we + # remove it from data prep stage. + # Add on-the-fly speed perturbation; since originally it would + # have increased epoch size by 3, we will apply prob 2/3 and use + # 3x more epochs. + # Speed perturbation probably should come first before + # concatenation, but in principle the transforms order doesn't have + # to be strict (e.g. could be randomized) + # transforms = [PerturbSpeed(factors=[0.9, 1.1], p=2/3)] + transforms # noqa + # Drop feats to be on the safe side. + train = SpeechSynthesisDataset( + get_text_token_collater(self.args.text_tokens), + cut_transforms=transforms, + feature_input_strategy=OnTheFlyFeatures(get_fbank_extractor()), + feature_transforms=input_transforms, + ) + else: + train = SpeechSynthesisDataset( + get_text_token_collater(self.args.text_tokens), + feature_input_strategy=_get_input_strategy( + self.args.input_strategy, self.args.dataset, cuts_train + ), + cut_transforms=transforms, + feature_transforms=input_transforms, + ) + + if self.args.bucketing_sampler: + logging.info("Using DynamicBucketingSampler") + train_sampler = DynamicBucketingSampler( + cuts_train, + max_duration=self.args.max_duration, + shuffle=self.args.shuffle, + num_buckets=self.args.num_buckets, + drop_last=self.args.drop_last, + ) + else: + logging.info( + "Using SingleCutSampler and sort by duraton(ascending=True)." + ) + cuts_train = cuts_train.to_eager().sort_by_duration(ascending=True) + train_sampler = SingleCutSampler( + cuts_train, + max_duration=self.args.max_duration, + shuffle=self.args.shuffle, + ) + logging.info("About to create train dataloader") + + if sampler_state_dict is not None: + logging.info("Loading sampler state dict") + train_sampler.load_state_dict(sampler_state_dict) + + # 'seed' is derived from the current random state, which will have + # previously been set in the main process. + seed = torch.randint(0, 100000, ()).item() + worker_init_fn = _SeedWorkers(seed) + + train_dl = DataLoader( + train, + sampler=train_sampler, + batch_size=None, + num_workers=self.args.num_workers, + persistent_workers=False, + worker_init_fn=worker_init_fn, + ) + + return train_dl + + def valid_dataloaders(self, cuts_valid: CutSet) -> DataLoader: + logging.info("About to create dev dataset") + if self.args.on_the_fly_feats: + validate = SpeechSynthesisDataset( + get_text_token_collater(self.args.text_tokens), + feature_input_strategy=OnTheFlyFeatures(get_fbank_extractor()), + cut_transforms=[], + ) + else: + validate = SpeechSynthesisDataset( + get_text_token_collater(self.args.text_tokens), + feature_input_strategy=_get_input_strategy( + self.args.input_strategy, self.args.dataset, cuts_valid + ), + cut_transforms=[], + ) + valid_sampler = DynamicBucketingSampler( + cuts_valid, + max_duration=self.args.max_duration, + shuffle=False, + ) + logging.info("About to create dev dataloader") + valid_dl = DataLoader( + validate, + sampler=valid_sampler, + batch_size=None, + num_workers=4, + persistent_workers=False, + ) + + return valid_dl + + def test_dataloaders(self, cuts: CutSet) -> DataLoader: + logging.debug("About to create test dataset") + test = SpeechSynthesisDataset( + get_text_token_collater(self.args.text_tokens), + feature_input_strategy=OnTheFlyFeatures(get_fbank_extractor()) + if self.args.on_the_fly_feats + else _get_input_strategy( + self.args.input_strategy, self.args.dataset, cuts + ), + cut_transforms=[], + ) + sampler = DynamicBucketingSampler( + cuts, + max_duration=self.args.max_duration, + shuffle=False, + ) + logging.debug("About to create test dataloader") + test_dl = DataLoader( + test, + batch_size=None, + sampler=sampler, + num_workers=self.args.num_workers, + ) + return test_dl + + @lru_cache() + def train_cuts(self) -> CutSet: + logging.info("About to get train cuts") + return load_manifest_lazy( + self.args.manifest_dir / "cuts_train.jsonl.gz" + ) + + @lru_cache() + def dev_cuts(self) -> CutSet: + logging.info("About to get dev cuts") + return load_manifest_lazy(self.args.manifest_dir / "cuts_dev.jsonl.gz") + + @lru_cache() + def test_cuts(self) -> CutSet: + logging.info("About to get test cuts") + return load_manifest_lazy(self.args.manifest_dir / "cuts_test.jsonl.gz") diff --git a/data/dataset.py b/data/dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..08d88e51773509d509441bd670ba5ac55d23ca69 --- /dev/null +++ b/data/dataset.py @@ -0,0 +1,251 @@ +# Copyright 2023 (authors: Feiteng Li) +# +# See ../../../../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +modified from lhoste.dataset.speech_synthesis.py +""" + +import torch +import math +import h5py +from tokenizers import Tokenizer +from typing import Union, List +import numpy as np +from tqdm import tqdm +from utils.g2p import PhonemeBpeTokenizer +from data.collation import get_text_token_collater +text_collater = get_text_token_collater() + +_pad = '_' +_punctuation = ',.!?-~…' +_letters = 'NQabdefghijklmnopstuvwxyzɑæʃʑçɯɪɔɛɹðəɫɥɸʊɾʒθβŋɦ⁼ʰ`^#*=ˈˌ→↓↑ ' +symbols = [_pad] + list(_punctuation) + list(_letters) + +language_dict = { + 'en': 0, + 'zh': 1, + 'ja': 2, + 'vi': 3, +} +def seq2phone(tokens: Union[List, np.ndarray]): + """ + Convert tokenized phoneme ID sequence back to phoneme string + :param tokens: phoneme tokens + :return: recovered phoneme sequence + """ + phones = "".join([symbols[i] for i in tokens]) + return phones + +class DynamicBatchSampler(torch.utils.data.Sampler): + def __init__(self, sampler, num_tokens_fn, num_buckets=100, min_size=0, max_size=1000, + max_tokens=None, max_sentences=None, drop_last=False): + """ + + :param sampler: + :param num_tokens_fn: 根据idx返回样本的长度的函数 + :param num_buckets: 利用桶原理将相似长度的样本放在一个batchsize中,桶的数量 + :param min_size: 最小长度的样本, 小于这个值的样本会被过滤掉。 依据这个值来创建样桶 + :param max_size: 最大长度的样本 + :param max_sentences: batch_size, 但是这里可以通过max_sentences 和 max_tokens 共同控制最终的大小 + """ + super(DynamicBatchSampler, self).__init__(sampler) + self.sampler = sampler + self.num_tokens_fn = num_tokens_fn + self.num_buckets = num_buckets + + self.min_size = min_size + self.max_size = max_size + + assert max_size <= max_tokens, "max_size should be smaller than max tokens" + assert max_tokens is not None or max_sentences is not None, \ + "max_tokens and max_sentences should not be null at the same time, please specify one parameter at least" + self.max_tokens = max_tokens if max_tokens is not None else float('Inf') + self.max_sentences = max_sentences if max_sentences is not None else float('Inf') + self.drop_last = drop_last + + def set_epoch(self, epoch): + self.sampler.set_epoch(epoch) + def is_batch_full(self, num_tokens, batch): + if len(batch) == 0: + return False + if len(batch) == self.max_sentences: + return True + if num_tokens > self.max_tokens: + return True + return False + + def __iter__(self): + buckets = [[] for _ in range(self.num_buckets)] + sample_len = [0] * self.num_buckets + + for idx in self.sampler: + idx_length = self.num_tokens_fn(idx) + if not (self.min_size <= idx_length <= self.max_size): + print("sentence at index {} of size {} exceeds max_tokens, the sentence is ignored".format(idx, idx_length)) + continue + + index_buckets = math.floor((idx_length - self.min_size) / (self.max_size - self.min_size + 1) + * self.num_buckets) + sample_len[index_buckets] = max(sample_len[index_buckets], idx_length) + + num_tokens = (len(buckets[index_buckets]) + 1) * sample_len[index_buckets] + if self.is_batch_full(num_tokens, buckets[index_buckets]): + # yield this batch + yield buckets[index_buckets] + buckets[index_buckets] = [] + sample_len[index_buckets] = 0 + + buckets[index_buckets].append(idx) + + # process left-over + leftover_batch = [] + leftover_sample_len = 0 + leftover = [idx for bucket in buckets for idx in bucket] + for idx in leftover: + idx_length = self.num_tokens_fn(idx) + leftover_sample_len = max(leftover_sample_len, idx_length) + num_tokens = (len(leftover_batch) + 1) * leftover_sample_len + if self.is_batch_full(num_tokens, leftover_batch): + yield leftover_batch + leftover_batch = [] + leftover_sample_len = 0 + leftover_batch.append(idx) + + if len(leftover_batch) > 0 and not self.drop_last: + yield leftover_batch + + def __len__(self): + # we do not know the exactly batch size, so do not call len(dataloader) + pass + + +class AudioDataset(torch.utils.data.Dataset): + def __init__(self, h5_path, ann_path, tokenizer_path): + self.h5_path = h5_path + with open(ann_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + ls = [l.split("|") for l in lines] + ls_T = list(zip(*ls)) + #del ls_T[-1] + self.h5_paths, self.durations, self.langs, self.texts = \ + list(ls_T[0]), list(ls_T[1]), list(ls_T[2]), list(ls_T[3]) + self.durations = [float(dur) for dur in self.durations] + self.tokenizer = PhonemeBpeTokenizer(tokenizer_path) + self._archive = None + + def __len__(self): + return len(self.h5_paths) + + def get_dur(self, idx): + return self.durations[idx] + + @property + def archive(self): + if self._archive is None: # lazy loading here! + self._archive = h5py.File(self.h5_path, "r") + return self._archive + def __getitem__(self, idx): + archive = self.archive + h5_path = self.h5_paths[idx] + sub = archive[h5_path] + audio_tokens = sub['audio'][()] + #phone_tokens = sub['text'][()] + dur = self.durations[idx] + lang = self.langs[idx] + text = self.texts[idx] + # tokenization should be done within dataloader + #phones = seq2phone(phone_tokens) + #phones = phones.replace(" ", "_") + phonemes, langs = self.tokenizer.tokenize(text=f"{text}".strip()) + cptpho_tokens, enroll_x_lens = text_collater([phonemes]) + cptpho_tokens = cptpho_tokens.squeeze(0) + text_token_lens = enroll_x_lens[0] + ''' + if not len(phones): + cptpho_tokens = self.tokenizer.encode(text).ids + else: + cptpho_tokens = self.tokenizer.encode(phones).ids + ''' + assert len(cptpho_tokens) + return { + 'utt_id': h5_path, + 'text': text, + 'audio': None, + 'audio_lens': None, + 'audio_features': audio_tokens, + 'audio_features_lens': audio_tokens.shape[1], + 'text_tokens': np.array(cptpho_tokens), + 'text_tokens_lens': text_token_lens, + 'language': language_dict[lang], + } + +def collate(batch): + utt_id_s = [b['utt_id'] for b in batch] + text_s = [b['text'] for b in batch] + + audio_s = [b['audio'] for b in batch] + audio_lens_s = [b['audio_lens'] for b in batch] + + audio_features_lens_s = [b['audio_features_lens'] for b in batch] + # create an empty tensor with maximum audio feature length + audio_features_s = torch.zeros([len(batch), max(audio_features_lens_s), 8], dtype=torch.int64) - 1 # audio pad with -1 + + text_tokens_lens_s = [b['text_tokens_lens'] for b in batch] + # create an empty tensor with maximum text tokens length + text_tokens_s = torch.zeros([len(batch), max(text_tokens_lens_s)], dtype=torch.int64) + 3 # [PAD] token id 3 + + language_s = [b['language'] for b in batch] + + for i, b in enumerate(batch): + audio_features = b['audio_features'] + audio_features_lens = b['audio_features_lens'] + audio_features_s[i, :audio_features_lens, :] = torch.LongTensor(audio_features) + + text_tokens = b['text_tokens'] + text_tokens_lens = b['text_tokens_lens'] + text_tokens_s[i, :text_tokens_lens] = torch.LongTensor(text_tokens) + + batch = { + 'utt_id': utt_id_s, + 'text': text_s, + 'audio': audio_s, + 'audio_lens': audio_lens_s, + 'audio_features': audio_features_s, + 'audio_features_lens': torch.LongTensor(np.array(audio_features_lens_s)), + 'text_tokens': text_tokens_s, + 'text_tokens_lens': torch.LongTensor(np.array(text_tokens_lens_s)), + 'languages': torch.LongTensor(np.array(language_s)), + } + return batch + +def create_dataloader(data_dir="/root/valle/egs/mix", n_gpus=1, rank=0, num_workers=0, num_buckets=10, max_duration=120): + train_dataset = AudioDataset(h5_path=f"{data_dir}/audio_sum.hdf5", + ann_path=f"{data_dir}/audio_ann_sum.txt", + tokenizer_path=f"{data_dir}/bpe_175.json") + ran_sampler = torch.utils.data.distributed.DistributedSampler( + train_dataset, + num_replicas=n_gpus, + rank=rank, + shuffle=True, + ) + dynamic_sampler = DynamicBatchSampler(ran_sampler, train_dataset.get_dur, num_buckets=num_buckets, max_size=20, + max_tokens=max_duration) + + + train_loader = torch.utils.data.DataLoader(train_dataset, num_workers=num_workers, collate_fn=collate, + batch_sampler=dynamic_sampler) + + return train_loader diff --git a/data/fbank.py b/data/fbank.py new file mode 100644 index 0000000000000000000000000000000000000000..4c302baa321cdcb9c345eb3a9aaa0868a4ff13c7 --- /dev/null +++ b/data/fbank.py @@ -0,0 +1,212 @@ +# Copyright 2023 (authors: Feiteng Li) +# +# See ../../../../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from dataclasses import asdict, dataclass +from typing import Any, Dict, Optional, Union + +import numpy as np +import torch +# from lhotse.features.base import FeatureExtractor +# from lhotse.utils import EPSILON, Seconds, compute_num_frames +from librosa.filters import mel as librosa_mel_fn + + +@dataclass +class BigVGANFbankConfig: + # Spectogram-related part + # Note that frame_length and frame_shift will be converted to milliseconds before torchaudio/Kaldi sees them + frame_length: Seconds = 1024 / 24000.0 + frame_shift: Seconds = 256 / 24000.0 + remove_dc_offset: bool = True + round_to_power_of_two: bool = True + + # Fbank-related part + low_freq: float = 0.0 + high_freq: float = 12000.0 + num_mel_bins: int = 100 + use_energy: bool = False + + def to_dict(self) -> Dict[str, Any]: + return asdict(self) + + @staticmethod + def from_dict(data: Dict[str, Any]) -> "BigVGANFbankConfig": + return BigVGANFbankConfig(**data) + + +def dynamic_range_compression_torch(x, C=1, clip_val=1e-5): + return torch.log(torch.clamp(x, min=clip_val) * C) + + +def spectral_normalize_torch(magnitudes): + output = dynamic_range_compression_torch(magnitudes) + return output + + +# https://github.com/NVIDIA/BigVGAN +# bigvgan_24khz_100band https://drive.google.com/drive/folders/1EpxX6AsxjCbbk0mmAhE0td6eYiABr8Oz +class BigVGANFbank(FeatureExtractor): + name = "fbank" + config_type = BigVGANFbankConfig + + def __init__(self, config: Optional[Any] = None): + super(BigVGANFbank, self).__init__(config) + sampling_rate = 24000 + self.mel_basis = torch.from_numpy( + librosa_mel_fn( + sampling_rate, + 1024, + self.config.num_mel_bins, + self.config.low_freq, + self.config.high_freq, + ).astype(np.float32) + ) + self.hann_window = torch.hann_window(1024) + + def _feature_fn(self, samples, **kwargs): + win_length, n_fft = 1024, 1024 + hop_size = 256 + if True: + sampling_rate = 24000 + duration = round(samples.shape[-1] / sampling_rate, ndigits=12) + expected_num_frames = compute_num_frames( + duration=duration, + frame_shift=self.frame_shift, + sampling_rate=sampling_rate, + ) + pad_size = ( + (expected_num_frames - 1) * hop_size + + win_length + - samples.shape[-1] + ) + assert pad_size >= 0 + + y = torch.nn.functional.pad( + samples, + (0, pad_size), + mode="constant", + ) + else: + y = torch.nn.functional.pad( + samples, + (int((n_fft - hop_size) / 2), int((n_fft - hop_size) / 2)), + mode="reflect", + ) + + y = y.squeeze(1) + + # complex tensor as default, then use view_as_real for future pytorch compatibility + spec = torch.stft( + y, + n_fft, + hop_length=hop_size, + win_length=win_length, + window=self.hann_window, + center=False, + pad_mode="reflect", + normalized=False, + onesided=True, + return_complex=True, + ) + spec = torch.view_as_real(spec) + spec = torch.sqrt(spec.pow(2).sum(-1) + (1e-9)) + + spec = torch.matmul(self.mel_basis, spec) + spec = spectral_normalize_torch(spec) + + return spec.transpose(2, 1).squeeze(0) + + def extract( + self, samples: Union[np.ndarray, torch.Tensor], sampling_rate: int + ) -> np.ndarray: + assert sampling_rate == 24000 + params = asdict(self.config) + params.update({"sample_frequency": sampling_rate, "snip_edges": False}) + params["frame_shift"] *= 1000.0 + params["frame_length"] *= 1000.0 + if not isinstance(samples, torch.Tensor): + samples = torch.from_numpy(samples) + # Torchaudio Kaldi feature extractors expect the channel dimension to be first. + if len(samples.shape) == 1: + samples = samples.unsqueeze(0) + features = self._feature_fn(samples, **params).to(torch.float32) + return features.numpy() + + @property + def frame_shift(self) -> Seconds: + return self.config.frame_shift + + def feature_dim(self, sampling_rate: int) -> int: + return self.config.num_mel_bins + + @staticmethod + def mix( + features_a: np.ndarray, + features_b: np.ndarray, + energy_scaling_factor_b: float, + ) -> np.ndarray: + return np.log( + np.maximum( + # protection against log(0); max with EPSILON is adequate since these are energies (always >= 0) + EPSILON, + np.exp(features_a) + + energy_scaling_factor_b * np.exp(features_b), + ) + ) + + @staticmethod + def compute_energy(features: np.ndarray) -> float: + return float(np.sum(np.exp(features))) + + +def get_fbank_extractor() -> BigVGANFbank: + return BigVGANFbank(BigVGANFbankConfig()) + + +if __name__ == "__main__": + extractor = BigVGANFbank(BigVGANFbankConfig()) + + samples = torch.from_numpy(np.random.random([1000]).astype(np.float32)) + samples = torch.clip(samples, -1.0, 1.0) + fbank = extractor.extract(samples, 24000.0) + print(f"fbank {fbank.shape}") + + from scipy.io.wavfile import read + + MAX_WAV_VALUE = 32768.0 + + sampling_rate, samples = read( + "egs/libritts/prompts/5639_40744_000000_000002.wav" + ) + print(f"samples: [{samples.min()}, {samples.max()}]") + fbank = extractor.extract(samples.astype(np.float32) / MAX_WAV_VALUE, 24000) + print(f"fbank {fbank.shape}") + + import matplotlib.pyplot as plt + + _ = plt.figure(figsize=(18, 10)) + plt.imshow( + X=fbank.transpose(1, 0), + cmap=plt.get_cmap("jet"), + aspect="auto", + interpolation="nearest", + ) + plt.gca().invert_yaxis() + plt.savefig("egs/libritts/prompts/5639_40744_000000_000002.png") + plt.close() + + print("fbank test PASS!") diff --git a/data/input_strategies.py b/data/input_strategies.py new file mode 100644 index 0000000000000000000000000000000000000000..0b576e1999f631676776fd15bbf902a47266b85f --- /dev/null +++ b/data/input_strategies.py @@ -0,0 +1,159 @@ +import random +from collections import defaultdict +from concurrent.futures import ThreadPoolExecutor +from typing import Tuple, Type + +# from lhotse import CutSet +# from lhotse.dataset.collation import collate_features +# from lhotse.dataset.input_strategies import ( +# ExecutorType, +# PrecomputedFeatures, +# _get_executor, +# ) +# from lhotse.utils import fastcopy + + +class PromptedFeatures: + def __init__(self, prompts, features): + self.prompts = prompts + self.features = features + + def to(self, device): + return PromptedFeatures( + self.prompts.to(device), self.features.to(device) + ) + + def sum(self): + return self.features.sum() + + @property + def ndim(self): + return self.features.ndim + + @property + def data(self): + return (self.prompts, self.features) + + +# class PromptedPrecomputedFeatures(PrecomputedFeatures): +# """ +# :class:`InputStrategy` that reads pre-computed features, whose manifests +# are attached to cuts, from disk. +# +# It automatically pads the feature matrices with pre or post feature. +# +# .. automethod:: __call__ +# """ +# +# def __init__( +# self, +# dataset: str, +# cuts: CutSet, +# num_workers: int = 0, +# executor_type: Type[ExecutorType] = ThreadPoolExecutor, +# ) -> None: +# super(PromptedPrecomputedFeatures, self).__init__( +# num_workers, executor_type +# ) +# +# self.utt2neighbors = defaultdict(lambda: []) +# +# if dataset.lower() == "libritts": +# # 909_131041_000013_000002 +# # 909_131041_000013_000003 +# speaker2utts = defaultdict(lambda: []) +# +# utt2cut = {} +# for cut in cuts: +# speaker = cut.supervisions[0].speaker +# speaker2utts[speaker].append(cut.id) +# utt2cut[cut.id] = cut +# +# for spk in speaker2utts: +# uttids = sorted(speaker2utts[spk]) +# # Using the property of sorted keys to find previous utterance +# # The keys has structure speaker_book_x_y e.g. 1089_134691_000004_000001 +# if len(uttids) == 1: +# self.utt2neighbors[uttids[0]].append(utt2cut[uttids[0]]) +# continue +# +# utt2prevutt = dict(zip(uttids, [uttids[1]] + uttids[:-1])) +# utt2postutt = dict(zip(uttids[:-1], uttids[1:])) +# +# for utt in utt2prevutt: +# self.utt2neighbors[utt].append(utt2cut[utt2prevutt[utt]]) +# +# for utt in utt2postutt: +# self.utt2neighbors[utt].append(utt2cut[utt2postutt[utt]]) +# elif dataset.lower() == "ljspeech": +# utt2cut = {} +# uttids = [] +# for cut in cuts: +# uttids.append(cut.id) +# utt2cut[cut.id] = cut +# +# if len(uttids) == 1: +# self.utt2neighbors[uttids[0]].append(utt2cut[uttids[0]]) +# else: +# # Using the property of sorted keys to find previous utterance +# # The keys has structure: LJ001-0010 +# utt2prevutt = dict(zip(uttids, [uttids[1]] + uttids[:-1])) +# utt2postutt = dict(zip(uttids[:-1], uttids[1:])) +# +# for utt in utt2postutt: +# postutt = utt2postutt[utt] +# if utt[:5] == postutt[:5]: +# self.utt2neighbors[utt].append(utt2cut[postutt]) +# +# for utt in utt2prevutt: +# prevutt = utt2prevutt[utt] +# if utt[:5] == prevutt[:5] or not self.utt2neighbors[utt]: +# self.utt2neighbors[utt].append(utt2cut[prevutt]) +# else: +# raise ValueError +# +# def __call__( +# self, cuts: CutSet +# ) -> Tuple[PromptedFeatures, PromptedFeatures]: +# """ +# Reads the pre-computed features from disk/other storage. +# The returned shape is``(B, T, F) => (batch_size, num_frames, num_features)``. +# +# :return: a tensor with collated features, and a tensor of ``num_frames`` of each cut before padding. +# """ +# features, features_lens = collate_features( +# cuts, +# executor=_get_executor( +# self.num_workers, executor_type=self._executor_type +# ), +# ) +# +# prompts_cuts = [] +# for k, cut in enumerate(cuts): +# prompts_cut = random.choice(self.utt2neighbors[cut.id]) +# prompts_cuts.append(fastcopy(prompts_cut, id=f"{cut.id}-{str(k)}")) +# +# mini_duration = min([cut.duration for cut in prompts_cuts] + [3.0]) +# # prompts_cuts = CutSet.from_cuts(prompts_cuts).truncate( +# # max_duration=mini_duration, +# # offset_type="random", +# # preserve_id=True, +# # ) +# prompts_cuts = CutSet( +# cuts={k: cut for k, cut in enumerate(prompts_cuts)} +# ).truncate( +# max_duration=mini_duration, +# offset_type="random", +# preserve_id=False, +# ) +# +# prompts, prompts_lens = collate_features( +# prompts_cuts, +# executor=_get_executor( +# self.num_workers, executor_type=self._executor_type +# ), +# ) +# +# return PromptedFeatures(prompts, features), PromptedFeatures( +# prompts_lens, features_lens +# ) diff --git a/data/tokenizer.py b/data/tokenizer.py new file mode 100644 index 0000000000000000000000000000000000000000..55ff809ee6a2040cb4f41647a433a3ab2b82cfc7 --- /dev/null +++ b/data/tokenizer.py @@ -0,0 +1,376 @@ +#!/usr/bin/env python3 +# Copyright 2023 (authors: Feiteng Li) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import re +from dataclasses import asdict, dataclass +from typing import Any, Dict, List, Optional, Pattern, Union + +import numpy as np +import torch +import torchaudio +from encodec import EncodecModel +from encodec.utils import convert_audio +from phonemizer.backend import EspeakBackend +from phonemizer.backend.espeak.language_switch import LanguageSwitch +from phonemizer.backend.espeak.words_mismatch import WordMismatch +from phonemizer.punctuation import Punctuation +from phonemizer.separator import Separator + +try: + from pypinyin import Style, pinyin + from pypinyin.style._utils import get_finals, get_initials +except Exception: + pass + + +class PypinyinBackend: + """PypinyinBackend for Chinese. Most codes is referenced from espnet. + There are two types pinyin or initials_finals, one is + just like "ni1 hao3", the other is like "n i1 h ao3". + """ + + def __init__( + self, + backend="initials_finals", + punctuation_marks: Union[str, Pattern] = Punctuation.default_marks(), + ) -> None: + self.backend = backend + self.punctuation_marks = punctuation_marks + + def phonemize( + self, text: List[str], separator: Separator, strip=True, njobs=1 + ) -> List[str]: + assert isinstance(text, List) + phonemized = [] + for _text in text: + _text = re.sub(" +", " ", _text.strip()) + _text = _text.replace(" ", separator.word) + phones = [] + if self.backend == "pypinyin": + for n, py in enumerate( + pinyin( + _text, style=Style.TONE3, neutral_tone_with_five=True + ) + ): + if all([c in self.punctuation_marks for c in py[0]]): + if len(phones): + assert phones[-1] == separator.syllable + phones.pop(-1) + + phones.extend(list(py[0])) + else: + phones.extend([py[0], separator.syllable]) + elif self.backend == "pypinyin_initials_finals": + for n, py in enumerate( + pinyin( + _text, style=Style.TONE3, neutral_tone_with_five=True + ) + ): + if all([c in self.punctuation_marks for c in py[0]]): + if len(phones): + assert phones[-1] == separator.syllable + phones.pop(-1) + phones.extend(list(py[0])) + else: + if py[0][-1].isalnum(): + initial = get_initials(py[0], strict=False) + if py[0][-1].isdigit(): + final = ( + get_finals(py[0][:-1], strict=False) + + py[0][-1] + ) + else: + final = get_finals(py[0], strict=False) + phones.extend( + [ + initial, + separator.phone, + final, + separator.syllable, + ] + ) + else: + assert ValueError + else: + raise NotImplementedError + phonemized.append( + "".join(phones).rstrip(f"{separator.word}{separator.syllable}") + ) + return phonemized + + +class TextTokenizer: + """Phonemize Text.""" + + def __init__( + self, + language="en-us", + backend="espeak", + separator=Separator(word="_", syllable="-", phone="|"), + preserve_punctuation=True, + punctuation_marks: Union[str, Pattern] = Punctuation.default_marks(), + with_stress: bool = False, + tie: Union[bool, str] = False, + language_switch: LanguageSwitch = "keep-flags", + words_mismatch: WordMismatch = "ignore", + ) -> None: + if backend == "espeak": + phonemizer = EspeakBackend( + language, + punctuation_marks=punctuation_marks, + preserve_punctuation=preserve_punctuation, + with_stress=with_stress, + tie=tie, + language_switch=language_switch, + words_mismatch=words_mismatch, + ) + elif backend in ["pypinyin", "pypinyin_initials_finals"]: + phonemizer = PypinyinBackend( + backend=backend, + punctuation_marks=punctuation_marks + separator.word, + ) + else: + raise NotImplementedError(f"{backend}") + + self.backend = phonemizer + self.separator = separator + + def to_list(self, phonemized: str) -> List[str]: + fields = [] + for word in phonemized.split(self.separator.word): + # "ɐ m|iː|n?" ɹ|ɪ|z|ɜː|v; h|ɪ|z. + pp = re.findall(r"\w+|[^\w\s]", word, re.UNICODE) + fields.extend( + [p for p in pp if p != self.separator.phone] + + [self.separator.word] + ) + assert len("".join(fields[:-1])) == len(phonemized) - phonemized.count( + self.separator.phone + ) + return fields[:-1] + + def __call__(self, text, strip=True) -> List[List[str]]: + if isinstance(text, str): + text = [text] + + phonemized = self.backend.phonemize( + text, separator=self.separator, strip=strip, njobs=1 + ) + return [self.to_list(p) for p in phonemized] + + +def tokenize_text(tokenizer: TextTokenizer, text: str) -> List[str]: + phonemes = tokenizer([text.strip()]) + return phonemes[0] # k2symbols + + +def remove_encodec_weight_norm(model): + from encodec.modules import SConv1d + from encodec.modules.seanet import SConvTranspose1d, SEANetResnetBlock + from torch.nn.utils import remove_weight_norm + + encoder = model.encoder.model + for key in encoder._modules: + if isinstance(encoder._modules[key], SEANetResnetBlock): + remove_weight_norm(encoder._modules[key].shortcut.conv.conv) + block_modules = encoder._modules[key].block._modules + for skey in block_modules: + if isinstance(block_modules[skey], SConv1d): + remove_weight_norm(block_modules[skey].conv.conv) + elif isinstance(encoder._modules[key], SConv1d): + remove_weight_norm(encoder._modules[key].conv.conv) + + decoder = model.decoder.model + for key in decoder._modules: + if isinstance(decoder._modules[key], SEANetResnetBlock): + remove_weight_norm(decoder._modules[key].shortcut.conv.conv) + block_modules = decoder._modules[key].block._modules + for skey in block_modules: + if isinstance(block_modules[skey], SConv1d): + remove_weight_norm(block_modules[skey].conv.conv) + elif isinstance(decoder._modules[key], SConvTranspose1d): + remove_weight_norm(decoder._modules[key].convtr.convtr) + elif isinstance(decoder._modules[key], SConv1d): + remove_weight_norm(decoder._modules[key].conv.conv) + + +class AudioTokenizer: + """EnCodec audio.""" + + def __init__( + self, + device: Any = None, + ) -> None: + # Instantiate a pretrained EnCodec model + model = EncodecModel.encodec_model_24khz() + model.set_target_bandwidth(6.0) + remove_encodec_weight_norm(model) + + if not device: + device = torch.device("cpu") + if torch.cuda.is_available(): + device = torch.device("cuda:0") + + self._device = device + + self.codec = model.to(device) + self.sample_rate = model.sample_rate + self.channels = model.channels + + @property + def device(self): + return self._device + + def encode(self, wav: torch.Tensor) -> torch.Tensor: + return self.codec.encode(wav.to(self.device)) + + def decode(self, frames: torch.Tensor) -> torch.Tensor: + return self.codec.decode(frames) + + +def tokenize_audio(tokenizer: AudioTokenizer, audio): + # Load and pre-process the audio waveform + if isinstance(audio, str): + wav, sr = torchaudio.load(audio) + else: + wav, sr = audio + wav = convert_audio(wav, sr, tokenizer.sample_rate, tokenizer.channels) + wav = wav.unsqueeze(0) + + # Extract discrete codes from EnCodec + with torch.no_grad(): + encoded_frames = tokenizer.encode(wav) + return encoded_frames + + +# @dataclass +# class AudioTokenConfig: +# frame_shift: Seconds = 320.0 / 24000 +# num_quantizers: int = 8 +# +# def to_dict(self) -> Dict[str, Any]: +# return asdict(self) +# +# @staticmethod +# def from_dict(data: Dict[str, Any]) -> "AudioTokenConfig": +# return AudioTokenConfig(**data) +# +# +# class AudioTokenExtractor(FeatureExtractor): +# name = "encodec" +# config_type = AudioTokenConfig +# +# def __init__(self, config: Optional[Any] = None): +# super(AudioTokenExtractor, self).__init__(config) +# self.tokenizer = AudioTokenizer() +# +# def extract( +# self, samples: Union[np.ndarray, torch.Tensor], sampling_rate: int +# ) -> np.ndarray: +# if not isinstance(samples, torch.Tensor): +# samples = torch.from_numpy(samples) +# if sampling_rate != self.tokenizer.sample_rate: +# samples = convert_audio( +# samples, +# sampling_rate, +# self.tokenizer.sample_rate, +# self.tokenizer.channels, +# ) +# if len(samples.shape) == 2: +# samples = samples.unsqueeze(0) +# else: +# raise ValueError() +# +# device = self.tokenizer.device +# encoded_frames = self.tokenizer.encode(samples.detach().to(device)) +# codes = encoded_frames[0][0] # [B, n_q, T] +# if True: +# duration = round(samples.shape[-1] / sampling_rate, ndigits=12) +# expected_num_frames = compute_num_frames( +# duration=duration, +# frame_shift=self.frame_shift, +# sampling_rate=sampling_rate, +# ) +# assert abs(codes.shape[-1] - expected_num_frames) <= 1 +# codes = codes[..., :expected_num_frames] +# return codes.cpu().squeeze(0).permute(1, 0).numpy() +# +# @property +# def frame_shift(self) -> Seconds: +# return self.config.frame_shift +# +# def feature_dim(self, sampling_rate: int) -> int: +# return self.config.num_quantizers +# +# def pad_tensor_list(self, tensor_list, device, padding_value=0): +# # 计算每个张量的长度 +# lengths = [tensor.shape[0] for tensor in tensor_list] +# # 使用pad_sequence函数进行填充 +# tensor_list = [torch.Tensor(t).to(device) for t in tensor_list] +# padded_tensor = torch.nn.utils.rnn.pad_sequence( +# tensor_list, batch_first=True, padding_value=padding_value +# ) +# return padded_tensor, lengths +# +# def extract_batch(self, samples, sampling_rate, lengths) -> np.ndarray: +# samples = [wav.squeeze() for wav in samples] +# device = self.tokenizer.device +# samples, lengths = self.pad_tensor_list(samples, device) +# samples = samples.unsqueeze(1) +# +# if not isinstance(samples, torch.Tensor): +# samples = torch.from_numpy(samples) +# if len(samples.shape) != 3: +# raise ValueError() +# if sampling_rate != self.tokenizer.sample_rate: +# samples = [ +# convert_audio( +# wav, +# sampling_rate, +# self.tokenizer.sample_rate, +# self.tokenizer.channels, +# ) +# for wav in samples +# ] +# # Extract discrete codes from EnCodec +# with torch.no_grad(): +# encoded_frames = self.tokenizer.encode(samples.detach().to(device)) +# encoded_frames = encoded_frames[0][0] # [B, n_q, T] +# batch_codes = [] +# for b, length in enumerate(lengths): +# codes = encoded_frames[b] +# duration = round(length / sampling_rate, ndigits=12) +# expected_num_frames = compute_num_frames( +# duration=duration, +# frame_shift=self.frame_shift, +# sampling_rate=sampling_rate, +# ) +# batch_codes.append(codes[..., :expected_num_frames]) +# return [codes.cpu().permute(1, 0).numpy() for codes in batch_codes] + + +if __name__ == "__main__": + model = EncodecModel.encodec_model_24khz() + model.set_target_bandwidth(6.0) + + samples = torch.from_numpy(np.random.random([4, 1, 1600])).type( + torch.float32 + ) + codes_raw = model.encode(samples) + + remove_encodec_weight_norm(model) + codes_norm = model.encode(samples) + + assert torch.allclose(codes_raw[0][0], codes_norm[0][0]) diff --git a/descriptions.py b/descriptions.py new file mode 100644 index 0000000000000000000000000000000000000000..982e5fe1bc4a4ef1cce9deed98b95271453ba578 --- /dev/null +++ b/descriptions.py @@ -0,0 +1,31 @@ +top_md = """ +# VALL-E X +VALL-E X can synthesize high-quality personalized speech with only a 3-second enrolled recording of +an unseen speaker as an acoustic prompt, even in another language for a monolingual speaker.
+This implementation supports zero-shot, mono-lingual/cross-lingual text-to-speech functionality of three languages (English, Chinese, Japanese)
+See this [demo](https://plachtaa.github.io/) page for more details. +""" + +infer_from_audio_md = """ +Upload a speech of 3~10 seconds as the audio prompt and type in the text you'd like to synthesize.
+The model will synthesize speech of given text with the same voice of your audio prompt.
+The model also tends to preserve the emotion & acoustic environment of your given speech.
+For faster inference, please use **"Make prompt"** to get a `.npz` file as the encoded audio prompt, and use it by **"Infer from prompt"** +""" + +make_prompt_md = """ +Upload a speech of 3~10 seconds as the audio prompt.
+Get a `.npz` file as the encoded audio prompt. Use it by **"Infer with prompt"** +""" + +infer_from_prompt_md = """ +Faster than **"Infer from audio"**.
+You need to **"Make prompt"** first, and upload the encoded prompt (a `.npz` file) +""" + +long_text_md = """ +Very long text is chunked into several sentences, and each sentence is synthesized separately.
+Please make a prompt or use a preset prompt to infer long text. +""" + +long_text_example = "Speech processing is a field in computer science and artificial intelligence that involves the analysis, processing, and understanding of human spoken language. The main goal of speech processing is to enable computers to recognize, analyze, and respond to human speech in a natural and efficient manner." \ No newline at end of file diff --git a/examples.py b/examples.py new file mode 100644 index 0000000000000000000000000000000000000000..205210e0d03f1203648c8fc327da713f9db5eb4e --- /dev/null +++ b/examples.py @@ -0,0 +1,24 @@ +infer_from_audio_examples = [ + ["This is how this machine has taken my voice.", 'English', 'no-accent', "prompts/en-2.wav", None, "Wow, look at that! That's no ordinary Teddy bear!"], + ["我喜欢抽电子烟,尤其是锐刻五代。", '中文', 'no-accent', "prompts/zh-1.wav", None, "今天我很荣幸,"], + ["私の声を真似するのはそんなに面白いですか?", '日本語', 'no-accent', "prompts/ja-2.ogg", None, "初めまして、朝武よしのです。"], + ["你可以听得出来我有多困。", '中文', 'no-accent', "prompts/en-1.wav", None, ""], + ["この文は、クロスリンガル合成の例です。", '日本語', 'no-accent', "prompts/zh-2.wav", None, ""], + ["Actually, I can't speak English, but this machine helped me do it.", 'English', 'no-accent', "prompts/ja-1.wav", None, ""], +] + +make_npz_prompt_examples = [ + ["Gem-trader", "prompts/en-2.wav", None, "Wow, look at that! That's no ordinary Teddy bear!"], + ["Ding Zhen", "prompts/zh-1.wav", None, "今天我很荣幸,"], + ["Yoshino", "prompts/ja-2.ogg", None, "初めまして、朝武よしのです。"], + ["Sleepy-woman", "prompts/en-1.wav", None, ""], + ["Yae", "prompts/zh-2.wav", None, ""], + ["Cafe", "prompts/ja-1.wav", None, ""], +] + +infer_from_prompt_examples = [ + ["A prompt contains voice, prosody and emotion information of a certain speaker.", "English", "no-accent", "vctk_1", None], + ["This prompt is made with an audio of three seconds.", "English", "no-accent", "librispeech_1", None], + ["This prompt is made with Chinese speech", "English", "no-accent", "seel", None], +] + diff --git a/exp/valle_dev/log/log-train-2023-11-01-00-19-48 b/exp/valle_dev/log/log-train-2023-11-01-00-19-48 new file mode 100644 index 0000000000000000000000000000000000000000..7899f223b0fd28e23aceb77035d4bb6c698b4016 --- /dev/null +++ b/exp/valle_dev/log/log-train-2023-11-01-00-19-48 @@ -0,0 +1,117 @@ +2023-11-01 00:19:48,610 INFO [train.py:851] Training started +2023-11-01 00:19:48,611 INFO [train.py:870] Device: cuda:0 +2023-11-01 00:19:48,611 INFO [train.py:871] {'best_train_loss': inf, 'best_valid_loss': inf, 'best_train_epoch': -1, 'best_valid_epoch': -1, 'batch_idx_train': 0, 'log_interval': 100, 'reset_interval': 200, 'valid_interval': 10000, 'world_size': 1, 'master_port': 12354, 'tensorboard': True, 'num_epochs': 20, 'start_epoch': 1, 'start_batch': 0, 'exp_dir': PosixPath('exp/valle_dev'), 'optimizer_name': 'ScaledAdam', 'scheduler_name': 'Eden', 'base_lr': 0.005, 'warmup_steps': 200, 'seed': 42, 'inf_check': False, 'save_every_n': 10000, 'keep_last_k': 20, 'average_period': 0, 'accumulate_grad_steps': 1, 'dtype': 'float16', 'filter_min_duration': 0.0, 'filter_max_duration': 20.0, 'train_stage': 0, 'visualize': False, 'oom_check': True, 'train_dir': '/home/ubuntu/VALL-E-X/JS_Dataset/JS_Dataset/train_tune', 'valid_dir': '/home/ubuntu/VALL-E-X/JS_Dataset/JS_Dataset/valid_tune', 'model_name': 'VALL-E', 'decoder_dim': 1024, 'nhead': 16, 'num_decoder_layers': 12, 'scale_factor': 1.0, 'norm_first': True, 'add_prenet': False, 'prefix_mode': 0, 'share_embedding': True, 'prepend_bos': False, 'num_quantizers': 8, 'scaling_xformers': False} +2023-11-01 00:19:48,611 INFO [train.py:873] About to create model +2023-11-01 00:19:52,689 INFO [train.py:877] Number of model parameters: 370539524 +2023-11-01 00:19:52,909 DEBUG [__init__.py:113] Building prefix dict from the default dictionary ... +2023-11-01 00:19:52,910 DEBUG [__init__.py:132] Loading model from cache /tmp/jieba.cache +2023-11-01 00:19:53,423 DEBUG [__init__.py:164] Loading model cost 0.513 seconds. +2023-11-01 00:19:53,423 DEBUG [__init__.py:166] Prefix dict has been built successfully. +2023-11-01 00:20:15,635 INFO [train.py:764] Epoch 1, batch 100, train_loss[loss=3.202, ArTop10Accuracy=0.7412, NarTop10Accuracy=0.6004, over 1306.00 frames. ], tot_loss[loss=3.398, ArTop10Accuracy=0.7055, NarTop10Accuracy=0.553, over 476.97 frames. ], batch size: 3, lr: 3.75e-03, grad_scale: 1.0 +2023-11-01 00:20:37,125 INFO [train.py:764] Epoch 1, batch 200, train_loss[loss=3.531, ArTop10Accuracy=0.6921, NarTop10Accuracy=0.5406, over 1234.00 frames. ], tot_loss[loss=3.408, ArTop10Accuracy=0.7094, NarTop10Accuracy=0.5521, over 749.45 frames. ], batch size: 3, lr: 5.00e-03, grad_scale: 1.0 +2023-11-01 00:20:59,073 INFO [train.py:764] Epoch 1, batch 300, train_loss[loss=3.609, ArTop10Accuracy=0.7015, NarTop10Accuracy=0.4503, over 995.00 frames. ], tot_loss[loss=3.443, ArTop10Accuracy=0.7109, NarTop10Accuracy=0.5387, over 935.67 frames. ], batch size: 2, lr: 5.00e-03, grad_scale: 1.0 +2023-11-01 00:21:20,852 INFO [train.py:764] Epoch 1, batch 400, train_loss[loss=3.419, ArTop10Accuracy=0.6896, NarTop10Accuracy=0.5319, over 1234.00 frames. ], tot_loss[loss=3.463, ArTop10Accuracy=0.7133, NarTop10Accuracy=0.5285, over 1040.70 frames. ], batch size: 3, lr: 4.99e-03, grad_scale: 2.0 +2023-11-01 00:21:42,406 INFO [train.py:764] Epoch 1, batch 500, train_loss[loss=3.293, ArTop10Accuracy=0.7238, NarTop10Accuracy=0.5892, over 1271.00 frames. ], tot_loss[loss=3.483, ArTop10Accuracy=0.7149, NarTop10Accuracy=0.5217, over 1094.80 frames. ], batch size: 3, lr: 4.99e-03, grad_scale: 2.0 +2023-11-01 00:22:04,280 INFO [train.py:764] Epoch 1, batch 600, train_loss[loss=3.675, ArTop10Accuracy=0.7139, NarTop10Accuracy=0.4414, over 1496.00 frames. ], tot_loss[loss=3.461, ArTop10Accuracy=0.7191, NarTop10Accuracy=0.5267, over 1141.86 frames. ], batch size: 3, lr: 4.98e-03, grad_scale: 2.0 +2023-11-01 00:22:25,961 INFO [train.py:764] Epoch 1, batch 700, train_loss[loss=3.25, ArTop10Accuracy=0.6822, NarTop10Accuracy=0.6536, over 1010.00 frames. ], tot_loss[loss=3.468, ArTop10Accuracy=0.7182, NarTop10Accuracy=0.5271, over 1167.56 frames. ], batch size: 2, lr: 4.98e-03, grad_scale: 2.0 +2023-11-01 00:22:47,713 INFO [train.py:764] Epoch 1, batch 800, train_loss[loss=3.896, ArTop10Accuracy=0.6663, NarTop10Accuracy=0.4321, over 947.00 frames. ], tot_loss[loss=3.468, ArTop10Accuracy=0.7199, NarTop10Accuracy=0.5278, over 1184.08 frames. ], batch size: 2, lr: 4.97e-03, grad_scale: 4.0 +2023-11-01 00:23:09,399 INFO [train.py:764] Epoch 1, batch 900, train_loss[loss=3.434, ArTop10Accuracy=0.7556, NarTop10Accuracy=0.5224, over 1195.00 frames. ], tot_loss[loss=3.461, ArTop10Accuracy=0.7214, NarTop10Accuracy=0.5295, over 1188.23 frames. ], batch size: 3, lr: 4.96e-03, grad_scale: 4.0 +2023-11-01 00:23:31,117 INFO [train.py:764] Epoch 1, batch 1000, train_loss[loss=3.611, ArTop10Accuracy=0.7125, NarTop10Accuracy=0.5023, over 1339.00 frames. ], tot_loss[loss=3.458, ArTop10Accuracy=0.7229, NarTop10Accuracy=0.5286, over 1190.57 frames. ], batch size: 3, lr: 4.95e-03, grad_scale: 4.0 +2023-11-01 00:23:31,281 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 3.204e+01 4.529e+01 5.014e+01 5.593e+01 9.312e+01, threshold=1.003e+02, percent-clipped=0.0 +2023-11-01 00:23:53,034 INFO [train.py:764] Epoch 1, batch 1100, train_loss[loss=3.754, ArTop10Accuracy=0.7051, NarTop10Accuracy=0.4622, over 1007.00 frames. ], tot_loss[loss=3.465, ArTop10Accuracy=0.7233, NarTop10Accuracy=0.5252, over 1194.69 frames. ], batch size: 2, lr: 4.94e-03, grad_scale: 4.0 +2023-11-01 00:24:15,002 INFO [train.py:764] Epoch 1, batch 1200, train_loss[loss=3.233, ArTop10Accuracy=0.7508, NarTop10Accuracy=0.5991, over 1228.00 frames. ], tot_loss[loss=3.456, ArTop10Accuracy=0.7254, NarTop10Accuracy=0.5279, over 1198.98 frames. ], batch size: 3, lr: 4.93e-03, grad_scale: 8.0 +2023-11-01 00:24:36,955 INFO [train.py:764] Epoch 1, batch 1300, train_loss[loss=3.365, ArTop10Accuracy=0.7287, NarTop10Accuracy=0.5916, over 1054.00 frames. ], tot_loss[loss=3.464, ArTop10Accuracy=0.7257, NarTop10Accuracy=0.5265, over 1202.37 frames. ], batch size: 2, lr: 4.92e-03, grad_scale: 8.0 +2023-11-01 00:24:58,700 INFO [train.py:764] Epoch 1, batch 1400, train_loss[loss=3.458, ArTop10Accuracy=0.731, NarTop10Accuracy=0.5298, over 1301.00 frames. ], tot_loss[loss=3.474, ArTop10Accuracy=0.7271, NarTop10Accuracy=0.5209, over 1198.94 frames. ], batch size: 3, lr: 4.91e-03, grad_scale: 8.0 +2023-11-01 00:25:20,642 INFO [train.py:764] Epoch 1, batch 1500, train_loss[loss=3.331, ArTop10Accuracy=0.7508, NarTop10Accuracy=0.5712, over 1236.00 frames. ], tot_loss[loss=3.46, ArTop10Accuracy=0.7278, NarTop10Accuracy=0.5248, over 1198.26 frames. ], batch size: 3, lr: 4.89e-03, grad_scale: 8.0 +2023-11-01 00:25:42,599 INFO [train.py:764] Epoch 1, batch 1600, train_loss[loss=3.627, ArTop10Accuracy=0.7136, NarTop10Accuracy=0.4668, over 1201.00 frames. ], tot_loss[loss=3.463, ArTop10Accuracy=0.7265, NarTop10Accuracy=0.5249, over 1204.65 frames. ], batch size: 3, lr: 4.88e-03, grad_scale: 8.0 +2023-11-01 00:26:04,490 INFO [train.py:764] Epoch 1, batch 1700, train_loss[loss=3.399, ArTop10Accuracy=0.7477, NarTop10Accuracy=0.5198, over 650.00 frames. ], tot_loss[loss=3.46, ArTop10Accuracy=0.7275, NarTop10Accuracy=0.5243, over 1202.22 frames. ], batch size: 1, lr: 4.87e-03, grad_scale: 8.0 +2023-11-01 00:26:26,353 INFO [train.py:764] Epoch 1, batch 1800, train_loss[loss=3.566, ArTop10Accuracy=0.7215, NarTop10Accuracy=0.4575, over 1253.00 frames. ], tot_loss[loss=3.46, ArTop10Accuracy=0.7281, NarTop10Accuracy=0.5244, over 1198.05 frames. ], batch size: 3, lr: 4.85e-03, grad_scale: 8.0 +2023-11-01 00:26:48,377 INFO [train.py:764] Epoch 1, batch 1900, train_loss[loss=3.387, ArTop10Accuracy=0.8449, NarTop10Accuracy=0.4865, over 819.00 frames. ], tot_loss[loss=3.453, ArTop10Accuracy=0.7281, NarTop10Accuracy=0.527, over 1198.59 frames. ], batch size: 1, lr: 4.83e-03, grad_scale: 8.0 +2023-11-01 00:27:10,331 INFO [train.py:764] Epoch 1, batch 2000, train_loss[loss=3.325, ArTop10Accuracy=0.7224, NarTop10Accuracy=0.5816, over 1286.00 frames. ], tot_loss[loss=3.442, ArTop10Accuracy=0.7305, NarTop10Accuracy=0.5298, over 1193.18 frames. ], batch size: 3, lr: 4.82e-03, grad_scale: 16.0 +2023-11-01 00:27:10,506 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.916e+01 4.003e+01 4.277e+01 4.588e+01 1.290e+02, threshold=8.555e+01, percent-clipped=0.1 +2023-11-01 00:27:32,462 INFO [train.py:764] Epoch 1, batch 2100, train_loss[loss=3.532, ArTop10Accuracy=0.7298, NarTop10Accuracy=0.5061, over 1114.00 frames. ], tot_loss[loss=3.458, ArTop10Accuracy=0.7291, NarTop10Accuracy=0.5252, over 1201.39 frames. ], batch size: 2, lr: 4.80e-03, grad_scale: 16.0 +2023-11-01 00:27:54,843 INFO [train.py:764] Epoch 1, batch 2200, train_loss[loss=3.206, ArTop10Accuracy=0.8044, NarTop10Accuracy=0.5327, over 1084.00 frames. ], tot_loss[loss=3.452, ArTop10Accuracy=0.7295, NarTop10Accuracy=0.5281, over 1212.86 frames. ], batch size: 2, lr: 4.78e-03, grad_scale: 16.0 +2023-11-01 00:28:17,007 INFO [train.py:764] Epoch 1, batch 2300, train_loss[loss=3.656, ArTop10Accuracy=0.7355, NarTop10Accuracy=0.4183, over 1478.00 frames. ], tot_loss[loss=3.457, ArTop10Accuracy=0.729, NarTop10Accuracy=0.525, over 1212.39 frames. ], batch size: 3, lr: 4.77e-03, grad_scale: 16.0 +2023-11-01 00:28:39,010 INFO [train.py:764] Epoch 1, batch 2400, train_loss[loss=3.578, ArTop10Accuracy=0.7343, NarTop10Accuracy=0.4818, over 1325.00 frames. ], tot_loss[loss=3.43, ArTop10Accuracy=0.7311, NarTop10Accuracy=0.5341, over 1209.83 frames. ], batch size: 3, lr: 4.75e-03, grad_scale: 16.0 +2023-11-01 00:29:00,770 INFO [train.py:764] Epoch 1, batch 2500, train_loss[loss=3.153, ArTop10Accuracy=0.7836, NarTop10Accuracy=0.6147, over 1280.00 frames. ], tot_loss[loss=3.419, ArTop10Accuracy=0.7334, NarTop10Accuracy=0.5348, over 1200.35 frames. ], batch size: 3, lr: 4.73e-03, grad_scale: 16.0 +2023-11-01 00:29:22,695 INFO [train.py:764] Epoch 1, batch 2600, train_loss[loss=3.217, ArTop10Accuracy=0.7502, NarTop10Accuracy=0.5967, over 1321.00 frames. ], tot_loss[loss=3.417, ArTop10Accuracy=0.7336, NarTop10Accuracy=0.5363, over 1203.85 frames. ], batch size: 3, lr: 4.71e-03, grad_scale: 16.0 +2023-11-01 00:29:44,570 INFO [train.py:764] Epoch 1, batch 2700, train_loss[loss=3.181, ArTop10Accuracy=0.7385, NarTop10Accuracy=0.624, over 1480.00 frames. ], tot_loss[loss=3.406, ArTop10Accuracy=0.7344, NarTop10Accuracy=0.5392, over 1201.18 frames. ], batch size: 3, lr: 4.69e-03, grad_scale: 16.0 +2023-11-01 00:30:06,497 INFO [train.py:764] Epoch 1, batch 2800, train_loss[loss=3.198, ArTop10Accuracy=0.734, NarTop10Accuracy=0.6348, over 1297.00 frames. ], tot_loss[loss=3.411, ArTop10Accuracy=0.7353, NarTop10Accuracy=0.5371, over 1201.74 frames. ], batch size: 3, lr: 4.67e-03, grad_scale: 16.0 +2023-11-01 00:30:28,351 INFO [train.py:764] Epoch 1, batch 2900, train_loss[loss=3.037, ArTop10Accuracy=0.7592, NarTop10Accuracy=0.6745, over 1387.00 frames. ], tot_loss[loss=3.422, ArTop10Accuracy=0.7355, NarTop10Accuracy=0.5335, over 1199.06 frames. ], batch size: 3, lr: 4.65e-03, grad_scale: 16.0 +2023-11-01 00:30:50,226 INFO [train.py:764] Epoch 1, batch 3000, train_loss[loss=3.231, ArTop10Accuracy=0.7304, NarTop10Accuracy=0.6256, over 1261.00 frames. ], tot_loss[loss=3.429, ArTop10Accuracy=0.7346, NarTop10Accuracy=0.5312, over 1193.63 frames. ], batch size: 3, lr: 4.63e-03, grad_scale: 16.0 +2023-11-01 00:30:50,404 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.518e+01 3.788e+01 4.043e+01 4.342e+01 9.222e+01, threshold=8.086e+01, percent-clipped=0.2 +2023-11-01 00:31:12,558 INFO [train.py:764] Epoch 1, batch 3100, train_loss[loss=3.228, ArTop10Accuracy=0.7206, NarTop10Accuracy=0.6731, over 1070.00 frames. ], tot_loss[loss=3.421, ArTop10Accuracy=0.7344, NarTop10Accuracy=0.5346, over 1195.52 frames. ], batch size: 2, lr: 4.61e-03, grad_scale: 16.0 +2023-11-01 00:31:34,821 INFO [train.py:764] Epoch 1, batch 3200, train_loss[loss=3.373, ArTop10Accuracy=0.7137, NarTop10Accuracy=0.5737, over 1289.00 frames. ], tot_loss[loss=3.418, ArTop10Accuracy=0.7353, NarTop10Accuracy=0.5343, over 1210.89 frames. ], batch size: 3, lr: 4.59e-03, grad_scale: 16.0 +2023-11-01 00:31:56,704 INFO [train.py:764] Epoch 1, batch 3300, train_loss[loss=3.731, ArTop10Accuracy=0.7498, NarTop10Accuracy=0.4016, over 1331.00 frames. ], tot_loss[loss=3.428, ArTop10Accuracy=0.736, NarTop10Accuracy=0.5316, over 1199.90 frames. ], batch size: 3, lr: 4.57e-03, grad_scale: 16.0 +2023-11-01 00:32:18,676 INFO [train.py:764] Epoch 1, batch 3400, train_loss[loss=3.212, ArTop10Accuracy=0.7604, NarTop10Accuracy=0.6446, over 1223.00 frames. ], tot_loss[loss=3.424, ArTop10Accuracy=0.737, NarTop10Accuracy=0.531, over 1204.36 frames. ], batch size: 3, lr: 4.55e-03, grad_scale: 16.0 +2023-11-01 00:32:40,608 INFO [train.py:764] Epoch 1, batch 3500, train_loss[loss=3.223, ArTop10Accuracy=0.7422, NarTop10Accuracy=0.6264, over 1315.00 frames. ], tot_loss[loss=3.418, ArTop10Accuracy=0.7374, NarTop10Accuracy=0.5322, over 1203.43 frames. ], batch size: 3, lr: 4.53e-03, grad_scale: 16.0 +2023-11-01 00:33:02,672 INFO [train.py:764] Epoch 1, batch 3600, train_loss[loss=3.237, ArTop10Accuracy=0.7415, NarTop10Accuracy=0.5996, over 1002.00 frames. ], tot_loss[loss=3.411, ArTop10Accuracy=0.7378, NarTop10Accuracy=0.5369, over 1200.89 frames. ], batch size: 2, lr: 4.50e-03, grad_scale: 16.0 +2023-11-01 00:33:24,593 INFO [train.py:764] Epoch 1, batch 3700, train_loss[loss=3.049, ArTop10Accuracy=0.7433, NarTop10Accuracy=0.6294, over 1270.00 frames. ], tot_loss[loss=3.404, ArTop10Accuracy=0.7378, NarTop10Accuracy=0.5378, over 1199.71 frames. ], batch size: 3, lr: 4.48e-03, grad_scale: 16.0 +2023-11-01 00:33:46,541 INFO [train.py:764] Epoch 1, batch 3800, train_loss[loss=3.443, ArTop10Accuracy=0.7345, NarTop10Accuracy=0.5163, over 953.00 frames. ], tot_loss[loss=3.423, ArTop10Accuracy=0.737, NarTop10Accuracy=0.5303, over 1206.54 frames. ], batch size: 2, lr: 4.46e-03, grad_scale: 16.0 +2023-11-01 00:34:08,561 INFO [train.py:764] Epoch 1, batch 3900, train_loss[loss=3.271, ArTop10Accuracy=0.7608, NarTop10Accuracy=0.5504, over 1346.00 frames. ], tot_loss[loss=3.408, ArTop10Accuracy=0.7383, NarTop10Accuracy=0.5361, over 1214.09 frames. ], batch size: 3, lr: 4.44e-03, grad_scale: 16.0 +2023-11-01 00:34:30,421 INFO [train.py:764] Epoch 1, batch 4000, train_loss[loss=3.177, ArTop10Accuracy=0.7882, NarTop10Accuracy=0.6005, over 1336.00 frames. ], tot_loss[loss=3.396, ArTop10Accuracy=0.739, NarTop10Accuracy=0.5396, over 1202.95 frames. ], batch size: 3, lr: 4.42e-03, grad_scale: 32.0 +2023-11-01 00:34:30,586 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.781e+01 3.743e+01 4.001e+01 4.276e+01 1.199e+02, threshold=8.003e+01, percent-clipped=0.2 +2023-11-01 00:34:52,163 INFO [train.py:764] Epoch 1, batch 4100, train_loss[loss=3.238, ArTop10Accuracy=0.74, NarTop10Accuracy=0.5985, over 1277.00 frames. ], tot_loss[loss=3.4, ArTop10Accuracy=0.7395, NarTop10Accuracy=0.5383, over 1197.35 frames. ], batch size: 3, lr: 4.40e-03, grad_scale: 32.0 +2023-11-01 00:35:14,150 INFO [train.py:764] Epoch 1, batch 4200, train_loss[loss=3.329, ArTop10Accuracy=0.737, NarTop10Accuracy=0.5832, over 1228.00 frames. ], tot_loss[loss=3.395, ArTop10Accuracy=0.7388, NarTop10Accuracy=0.5409, over 1204.03 frames. ], batch size: 3, lr: 4.38e-03, grad_scale: 32.0 +2023-11-01 00:35:36,263 INFO [train.py:764] Epoch 1, batch 4300, train_loss[loss=3.293, ArTop10Accuracy=0.7733, NarTop10Accuracy=0.5665, over 1125.00 frames. ], tot_loss[loss=3.393, ArTop10Accuracy=0.7399, NarTop10Accuracy=0.5412, over 1201.24 frames. ], batch size: 1, lr: 4.35e-03, grad_scale: 32.0 +2023-11-01 00:35:58,283 INFO [train.py:764] Epoch 1, batch 4400, train_loss[loss=2.99, ArTop10Accuracy=0.7618, NarTop10Accuracy=0.7263, over 1297.00 frames. ], tot_loss[loss=3.387, ArTop10Accuracy=0.7425, NarTop10Accuracy=0.5403, over 1202.84 frames. ], batch size: 3, lr: 4.33e-03, grad_scale: 32.0 +2023-11-01 00:36:20,271 INFO [train.py:764] Epoch 1, batch 4500, train_loss[loss=3.166, ArTop10Accuracy=0.7474, NarTop10Accuracy=0.6354, over 1271.00 frames. ], tot_loss[loss=3.375, ArTop10Accuracy=0.7434, NarTop10Accuracy=0.5462, over 1206.43 frames. ], batch size: 3, lr: 4.31e-03, grad_scale: 32.0 +2023-11-01 00:36:42,281 INFO [train.py:764] Epoch 1, batch 4600, train_loss[loss=3.479, ArTop10Accuracy=0.7316, NarTop10Accuracy=0.5057, over 980.00 frames. ], tot_loss[loss=3.377, ArTop10Accuracy=0.7436, NarTop10Accuracy=0.5457, over 1199.69 frames. ], batch size: 2, lr: 4.29e-03, grad_scale: 32.0 +2023-11-01 00:37:04,337 INFO [train.py:764] Epoch 1, batch 4700, train_loss[loss=3.177, ArTop10Accuracy=0.7289, NarTop10Accuracy=0.6232, over 1280.00 frames. ], tot_loss[loss=3.378, ArTop10Accuracy=0.7425, NarTop10Accuracy=0.5457, over 1200.61 frames. ], batch size: 3, lr: 4.27e-03, grad_scale: 32.0 +2023-11-01 00:37:26,359 INFO [train.py:764] Epoch 1, batch 4800, train_loss[loss=3.718, ArTop10Accuracy=0.7287, NarTop10Accuracy=0.4516, over 1176.00 frames. ], tot_loss[loss=3.384, ArTop10Accuracy=0.7417, NarTop10Accuracy=0.5444, over 1204.83 frames. ], batch size: 2, lr: 4.25e-03, grad_scale: 32.0 +2023-11-01 00:37:48,245 INFO [train.py:764] Epoch 1, batch 4900, train_loss[loss=3.189, ArTop10Accuracy=0.7412, NarTop10Accuracy=0.6122, over 962.00 frames. ], tot_loss[loss=3.395, ArTop10Accuracy=0.7405, NarTop10Accuracy=0.5393, over 1196.82 frames. ], batch size: 2, lr: 4.23e-03, grad_scale: 32.0 +2023-11-01 00:38:10,398 INFO [train.py:764] Epoch 1, batch 5000, train_loss[loss=3.969, ArTop10Accuracy=0.6697, NarTop10Accuracy=0.3746, over 1002.00 frames. ], tot_loss[loss=3.4, ArTop10Accuracy=0.7401, NarTop10Accuracy=0.5376, over 1198.57 frames. ], batch size: 2, lr: 4.20e-03, grad_scale: 32.0 +2023-11-01 00:38:10,556 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.722e+01 3.674e+01 3.909e+01 4.182e+01 1.163e+02, threshold=7.817e+01, percent-clipped=0.1 +2023-11-01 00:38:32,372 INFO [train.py:764] Epoch 1, batch 5100, train_loss[loss=3.425, ArTop10Accuracy=0.7333, NarTop10Accuracy=0.535, over 1050.00 frames. ], tot_loss[loss=3.389, ArTop10Accuracy=0.7421, NarTop10Accuracy=0.5403, over 1202.12 frames. ], batch size: 2, lr: 4.18e-03, grad_scale: 32.0 +2023-11-01 00:38:54,235 INFO [train.py:764] Epoch 1, batch 5200, train_loss[loss=3.11, ArTop10Accuracy=0.7507, NarTop10Accuracy=0.6442, over 1352.00 frames. ], tot_loss[loss=3.382, ArTop10Accuracy=0.7421, NarTop10Accuracy=0.5436, over 1199.90 frames. ], batch size: 3, lr: 4.16e-03, grad_scale: 32.0 +2023-11-01 00:39:15,969 INFO [train.py:764] Epoch 1, batch 5300, train_loss[loss=3.178, ArTop10Accuracy=0.756, NarTop10Accuracy=0.5823, over 1217.00 frames. ], tot_loss[loss=3.4, ArTop10Accuracy=0.7417, NarTop10Accuracy=0.5379, over 1195.55 frames. ], batch size: 3, lr: 4.14e-03, grad_scale: 32.0 +2023-11-01 00:39:37,856 INFO [train.py:764] Epoch 1, batch 5400, train_loss[loss=3.272, ArTop10Accuracy=0.7515, NarTop10Accuracy=0.5808, over 1300.00 frames. ], tot_loss[loss=3.385, ArTop10Accuracy=0.7428, NarTop10Accuracy=0.5426, over 1202.33 frames. ], batch size: 3, lr: 4.12e-03, grad_scale: 32.0 +2023-11-01 00:39:59,844 INFO [train.py:764] Epoch 1, batch 5500, train_loss[loss=3.962, ArTop10Accuracy=0.7026, NarTop10Accuracy=0.362, over 1318.00 frames. ], tot_loss[loss=3.393, ArTop10Accuracy=0.7416, NarTop10Accuracy=0.5403, over 1204.76 frames. ], batch size: 3, lr: 4.10e-03, grad_scale: 32.0 +2023-11-01 00:40:21,881 INFO [train.py:764] Epoch 1, batch 5600, train_loss[loss=3.23, ArTop10Accuracy=0.7509, NarTop10Accuracy=0.6012, over 1064.00 frames. ], tot_loss[loss=3.389, ArTop10Accuracy=0.742, NarTop10Accuracy=0.5422, over 1209.03 frames. ], batch size: 2, lr: 4.08e-03, grad_scale: 32.0 +2023-11-01 00:40:44,136 INFO [train.py:764] Epoch 1, batch 5700, train_loss[loss=3.756, ArTop10Accuracy=0.7013, NarTop10Accuracy=0.43, over 1309.00 frames. ], tot_loss[loss=3.404, ArTop10Accuracy=0.7411, NarTop10Accuracy=0.5373, over 1206.83 frames. ], batch size: 3, lr: 4.06e-03, grad_scale: 32.0 +2023-11-01 00:41:06,015 INFO [train.py:764] Epoch 1, batch 5800, train_loss[loss=3.22, ArTop10Accuracy=0.7976, NarTop10Accuracy=0.5996, over 1077.00 frames. ], tot_loss[loss=3.393, ArTop10Accuracy=0.7424, NarTop10Accuracy=0.5391, over 1198.69 frames. ], batch size: 2, lr: 4.04e-03, grad_scale: 32.0 +2023-11-01 00:41:27,922 INFO [train.py:764] Epoch 1, batch 5900, train_loss[loss=3.255, ArTop10Accuracy=0.7603, NarTop10Accuracy=0.5729, over 1410.00 frames. ], tot_loss[loss=3.379, ArTop10Accuracy=0.7444, NarTop10Accuracy=0.5428, over 1195.35 frames. ], batch size: 2, lr: 4.02e-03, grad_scale: 32.0 +2023-11-01 00:41:49,781 INFO [train.py:764] Epoch 1, batch 6000, train_loss[loss=3.04, ArTop10Accuracy=0.754, NarTop10Accuracy=0.6513, over 1264.00 frames. ], tot_loss[loss=3.367, ArTop10Accuracy=0.7448, NarTop10Accuracy=0.549, over 1191.87 frames. ], batch size: 3, lr: 4.00e-03, grad_scale: 64.0 +2023-11-01 00:41:49,950 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 3.018e+01 3.667e+01 3.892e+01 4.174e+01 9.103e+01, threshold=7.785e+01, percent-clipped=0.2 +2023-11-01 00:42:11,871 INFO [train.py:764] Epoch 1, batch 6100, train_loss[loss=3.224, ArTop10Accuracy=0.7514, NarTop10Accuracy=0.5748, over 1275.00 frames. ], tot_loss[loss=3.365, ArTop10Accuracy=0.7445, NarTop10Accuracy=0.5489, over 1200.31 frames. ], batch size: 3, lr: 3.98e-03, grad_scale: 64.0 +2023-11-01 00:42:33,790 INFO [train.py:764] Epoch 1, batch 6200, train_loss[loss=3.631, ArTop10Accuracy=0.7441, NarTop10Accuracy=0.4927, over 1067.00 frames. ], tot_loss[loss=3.368, ArTop10Accuracy=0.7456, NarTop10Accuracy=0.5473, over 1197.29 frames. ], batch size: 2, lr: 3.96e-03, grad_scale: 64.0 +2023-11-01 00:42:55,647 INFO [train.py:764] Epoch 1, batch 6300, train_loss[loss=2.863, ArTop10Accuracy=0.7722, NarTop10Accuracy=0.6714, over 1229.00 frames. ], tot_loss[loss=3.358, ArTop10Accuracy=0.7464, NarTop10Accuracy=0.549, over 1195.66 frames. ], batch size: 3, lr: 3.94e-03, grad_scale: 64.0 +2023-11-01 00:43:17,732 INFO [train.py:764] Epoch 1, batch 6400, train_loss[loss=3.313, ArTop10Accuracy=0.7168, NarTop10Accuracy=0.6248, over 1342.00 frames. ], tot_loss[loss=3.364, ArTop10Accuracy=0.7454, NarTop10Accuracy=0.5488, over 1200.90 frames. ], batch size: 3, lr: 3.92e-03, grad_scale: 16.0 +2023-11-01 00:43:39,683 INFO [train.py:764] Epoch 1, batch 6500, train_loss[loss=3.58, ArTop10Accuracy=0.7492, NarTop10Accuracy=0.4578, over 1324.00 frames. ], tot_loss[loss=3.365, ArTop10Accuracy=0.7452, NarTop10Accuracy=0.5472, over 1203.64 frames. ], batch size: 3, lr: 3.90e-03, grad_scale: 16.0 +2023-11-01 00:44:01,658 INFO [train.py:764] Epoch 1, batch 6600, train_loss[loss=3.618, ArTop10Accuracy=0.7234, NarTop10Accuracy=0.4793, over 1157.00 frames. ], tot_loss[loss=3.375, ArTop10Accuracy=0.7447, NarTop10Accuracy=0.5439, over 1199.80 frames. ], batch size: 2, lr: 3.89e-03, grad_scale: 16.0 +2023-11-01 00:44:23,811 INFO [train.py:764] Epoch 1, batch 6700, train_loss[loss=3.909, ArTop10Accuracy=0.7282, NarTop10Accuracy=0.3605, over 1512.00 frames. ], tot_loss[loss=3.374, ArTop10Accuracy=0.747, NarTop10Accuracy=0.5432, over 1206.18 frames. ], batch size: 2, lr: 3.87e-03, grad_scale: 16.0 +2023-11-01 00:44:45,778 INFO [train.py:764] Epoch 1, batch 6800, train_loss[loss=3.756, ArTop10Accuracy=0.6656, NarTop10Accuracy=0.4652, over 1250.00 frames. ], tot_loss[loss=3.378, ArTop10Accuracy=0.7473, NarTop10Accuracy=0.5408, over 1211.75 frames. ], batch size: 3, lr: 3.85e-03, grad_scale: 16.0 +2023-11-01 00:45:07,536 INFO [train.py:764] Epoch 1, batch 6900, train_loss[loss=3.302, ArTop10Accuracy=0.7848, NarTop10Accuracy=0.5048, over 1199.00 frames. ], tot_loss[loss=3.369, ArTop10Accuracy=0.7478, NarTop10Accuracy=0.5444, over 1203.83 frames. ], batch size: 3, lr: 3.83e-03, grad_scale: 16.0 +2023-11-01 00:45:29,567 INFO [train.py:764] Epoch 1, batch 7000, train_loss[loss=3.614, ArTop10Accuracy=0.667, NarTop10Accuracy=0.5579, over 1054.00 frames. ], tot_loss[loss=3.379, ArTop10Accuracy=0.7464, NarTop10Accuracy=0.5433, over 1205.70 frames. ], batch size: 2, lr: 3.81e-03, grad_scale: 16.0 +2023-11-01 00:45:30,189 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.893e+01 3.646e+01 3.891e+01 4.178e+01 1.168e+02, threshold=7.782e+01, percent-clipped=0.2 +2023-11-01 00:45:51,356 INFO [train.py:764] Epoch 1, batch 7100, train_loss[loss=3.365, ArTop10Accuracy=0.7592, NarTop10Accuracy=0.539, over 1221.00 frames. ], tot_loss[loss=3.363, ArTop10Accuracy=0.7483, NarTop10Accuracy=0.5466, over 1200.17 frames. ], batch size: 3, lr: 3.79e-03, grad_scale: 16.0 +2023-11-01 00:46:13,329 INFO [train.py:764] Epoch 1, batch 7200, train_loss[loss=3.422, ArTop10Accuracy=0.7782, NarTop10Accuracy=0.5144, over 1109.00 frames. ], tot_loss[loss=3.349, ArTop10Accuracy=0.7504, NarTop10Accuracy=0.5512, over 1200.81 frames. ], batch size: 2, lr: 3.78e-03, grad_scale: 16.0 +2023-11-01 00:46:35,352 INFO [train.py:764] Epoch 1, batch 7300, train_loss[loss=3.123, ArTop10Accuracy=0.7526, NarTop10Accuracy=0.6595, over 1047.00 frames. ], tot_loss[loss=3.357, ArTop10Accuracy=0.7506, NarTop10Accuracy=0.549, over 1199.39 frames. ], batch size: 2, lr: 3.76e-03, grad_scale: 16.0 +2023-11-01 00:46:57,454 INFO [train.py:764] Epoch 1, batch 7400, train_loss[loss=3.457, ArTop10Accuracy=0.7662, NarTop10Accuracy=0.4982, over 1142.00 frames. ], tot_loss[loss=3.35, ArTop10Accuracy=0.7506, NarTop10Accuracy=0.552, over 1204.30 frames. ], batch size: 2, lr: 3.74e-03, grad_scale: 16.0 +2023-11-01 00:47:19,658 INFO [train.py:764] Epoch 1, batch 7500, train_loss[loss=3.83, ArTop10Accuracy=0.6948, NarTop10Accuracy=0.4401, over 1019.00 frames. ], tot_loss[loss=3.359, ArTop10Accuracy=0.7496, NarTop10Accuracy=0.5494, over 1211.85 frames. ], batch size: 2, lr: 3.72e-03, grad_scale: 16.0 +2023-11-01 00:47:41,652 INFO [train.py:764] Epoch 1, batch 7600, train_loss[loss=3.049, ArTop10Accuracy=0.7516, NarTop10Accuracy=0.6564, over 1538.00 frames. ], tot_loss[loss=3.346, ArTop10Accuracy=0.7518, NarTop10Accuracy=0.5516, over 1203.46 frames. ], batch size: 3, lr: 3.71e-03, grad_scale: 16.0 +2023-11-01 00:48:03,855 INFO [train.py:764] Epoch 1, batch 7700, train_loss[loss=3.38, ArTop10Accuracy=0.7527, NarTop10Accuracy=0.5145, over 1500.00 frames. ], tot_loss[loss=3.343, ArTop10Accuracy=0.7512, NarTop10Accuracy=0.553, over 1210.10 frames. ], batch size: 3, lr: 3.69e-03, grad_scale: 16.0 +2023-11-01 00:48:25,842 INFO [train.py:764] Epoch 1, batch 7800, train_loss[loss=3.577, ArTop10Accuracy=0.7123, NarTop10Accuracy=0.5032, over 1300.00 frames. ], tot_loss[loss=3.344, ArTop10Accuracy=0.7498, NarTop10Accuracy=0.5536, over 1207.39 frames. ], batch size: 3, lr: 3.67e-03, grad_scale: 16.0 +2023-11-01 00:48:47,914 INFO [train.py:764] Epoch 1, batch 7900, train_loss[loss=3.129, ArTop10Accuracy=0.7551, NarTop10Accuracy=0.6453, over 1323.00 frames. ], tot_loss[loss=3.348, ArTop10Accuracy=0.7489, NarTop10Accuracy=0.5529, over 1205.69 frames. ], batch size: 3, lr: 3.66e-03, grad_scale: 16.0 +2023-11-01 00:49:10,108 INFO [train.py:764] Epoch 1, batch 8000, train_loss[loss=3.435, ArTop10Accuracy=0.7504, NarTop10Accuracy=0.5231, over 1314.00 frames. ], tot_loss[loss=3.344, ArTop10Accuracy=0.7484, NarTop10Accuracy=0.5538, over 1204.55 frames. ], batch size: 2, lr: 3.64e-03, grad_scale: 16.0 +2023-11-01 00:49:10,719 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.574e+01 3.623e+01 3.864e+01 4.175e+01 9.270e+01, threshold=7.727e+01, percent-clipped=0.3 +2023-11-01 00:49:32,315 INFO [train.py:764] Epoch 1, batch 8100, train_loss[loss=3.578, ArTop10Accuracy=0.7281, NarTop10Accuracy=0.5042, over 1453.00 frames. ], tot_loss[loss=3.369, ArTop10Accuracy=0.7464, NarTop10Accuracy=0.5469, over 1201.98 frames. ], batch size: 3, lr: 3.62e-03, grad_scale: 16.0 +2023-11-01 00:49:54,412 INFO [train.py:764] Epoch 1, batch 8200, train_loss[loss=3.126, ArTop10Accuracy=0.7671, NarTop10Accuracy=0.6341, over 1198.00 frames. ], tot_loss[loss=3.377, ArTop10Accuracy=0.7451, NarTop10Accuracy=0.5455, over 1201.66 frames. ], batch size: 3, lr: 3.61e-03, grad_scale: 16.0 +2023-11-01 00:50:16,462 INFO [train.py:764] Epoch 1, batch 8300, train_loss[loss=3.51, ArTop10Accuracy=0.7526, NarTop10Accuracy=0.4518, over 1354.00 frames. ], tot_loss[loss=3.363, ArTop10Accuracy=0.7486, NarTop10Accuracy=0.546, over 1200.11 frames. ], batch size: 3, lr: 3.59e-03, grad_scale: 16.0 +2023-11-01 00:50:38,610 INFO [train.py:764] Epoch 1, batch 8400, train_loss[loss=3.781, ArTop10Accuracy=0.7058, NarTop10Accuracy=0.4102, over 1064.00 frames. ], tot_loss[loss=3.363, ArTop10Accuracy=0.7496, NarTop10Accuracy=0.545, over 1201.74 frames. ], batch size: 2, lr: 3.58e-03, grad_scale: 32.0 +2023-11-01 00:51:00,590 INFO [train.py:764] Epoch 1, batch 8500, train_loss[loss=3.679, ArTop10Accuracy=0.72, NarTop10Accuracy=0.4794, over 1082.00 frames. ], tot_loss[loss=3.357, ArTop10Accuracy=0.7495, NarTop10Accuracy=0.5478, over 1189.28 frames. ], batch size: 2, lr: 3.56e-03, grad_scale: 32.0 +2023-11-01 00:51:22,638 INFO [train.py:764] Epoch 1, batch 8600, train_loss[loss=3.35, ArTop10Accuracy=0.7558, NarTop10Accuracy=0.5426, over 1208.00 frames. ], tot_loss[loss=3.361, ArTop10Accuracy=0.7485, NarTop10Accuracy=0.546, over 1195.17 frames. ], batch size: 3, lr: 3.54e-03, grad_scale: 32.0 +2023-11-01 00:51:44,857 INFO [train.py:764] Epoch 1, batch 8700, train_loss[loss=3.502, ArTop10Accuracy=0.7509, NarTop10Accuracy=0.4911, over 1076.00 frames. ], tot_loss[loss=3.341, ArTop10Accuracy=0.7513, NarTop10Accuracy=0.5539, over 1199.46 frames. ], batch size: 2, lr: 3.53e-03, grad_scale: 32.0 +2023-11-01 00:52:06,705 INFO [train.py:764] Epoch 1, batch 8800, train_loss[loss=3.171, ArTop10Accuracy=0.7301, NarTop10Accuracy=0.6783, over 1178.00 frames. ], tot_loss[loss=3.339, ArTop10Accuracy=0.751, NarTop10Accuracy=0.5542, over 1196.85 frames. ], batch size: 3, lr: 3.51e-03, grad_scale: 16.0 +2023-11-01 00:52:28,687 INFO [train.py:764] Epoch 1, batch 8900, train_loss[loss=3.443, ArTop10Accuracy=0.7263, NarTop10Accuracy=0.5612, over 1330.00 frames. ], tot_loss[loss=3.333, ArTop10Accuracy=0.7516, NarTop10Accuracy=0.5562, over 1197.63 frames. ], batch size: 3, lr: 3.50e-03, grad_scale: 16.0 +2023-11-01 00:52:50,763 INFO [train.py:764] Epoch 1, batch 9000, train_loss[loss=3.046, ArTop10Accuracy=0.7712, NarTop10Accuracy=0.6817, over 1355.00 frames. ], tot_loss[loss=3.346, ArTop10Accuracy=0.7506, NarTop10Accuracy=0.5509, over 1206.31 frames. ], batch size: 3, lr: 3.48e-03, grad_scale: 16.0 +2023-11-01 00:52:51,581 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.596e+01 3.632e+01 3.884e+01 4.203e+01 1.192e+02, threshold=7.767e+01, percent-clipped=0.1 +2023-11-01 00:53:12,725 INFO [train.py:764] Epoch 1, batch 9100, train_loss[loss=3.108, ArTop10Accuracy=0.745, NarTop10Accuracy=0.6108, over 1255.00 frames. ], tot_loss[loss=3.325, ArTop10Accuracy=0.7506, NarTop10Accuracy=0.5588, over 1204.55 frames. ], batch size: 3, lr: 3.47e-03, grad_scale: 16.0 +2023-11-01 00:53:34,455 INFO [train.py:764] Epoch 1, batch 9200, train_loss[loss=3.607, ArTop10Accuracy=0.7313, NarTop10Accuracy=0.4606, over 1243.00 frames. ], tot_loss[loss=3.323, ArTop10Accuracy=0.7512, NarTop10Accuracy=0.559, over 1199.74 frames. ], batch size: 3, lr: 3.46e-03, grad_scale: 16.0 +2023-11-01 00:53:56,283 INFO [train.py:764] Epoch 1, batch 9300, train_loss[loss=3.341, ArTop10Accuracy=0.7796, NarTop10Accuracy=0.5181, over 1243.00 frames. ], tot_loss[loss=3.327, ArTop10Accuracy=0.7531, NarTop10Accuracy=0.5566, over 1196.75 frames. ], batch size: 3, lr: 3.44e-03, grad_scale: 16.0 +2023-11-01 00:54:18,225 INFO [train.py:764] Epoch 1, batch 9400, train_loss[loss=3.287, ArTop10Accuracy=0.7442, NarTop10Accuracy=0.5898, over 1501.00 frames. ], tot_loss[loss=3.318, ArTop10Accuracy=0.7531, NarTop10Accuracy=0.5604, over 1201.10 frames. ], batch size: 3, lr: 3.43e-03, grad_scale: 16.0 +2023-11-01 00:54:40,274 INFO [train.py:764] Epoch 1, batch 9500, train_loss[loss=3.335, ArTop10Accuracy=0.7351, NarTop10Accuracy=0.6181, over 1023.00 frames. ], tot_loss[loss=3.318, ArTop10Accuracy=0.7547, NarTop10Accuracy=0.5604, over 1206.75 frames. ], batch size: 2, lr: 3.41e-03, grad_scale: 16.0 +2023-11-01 00:55:02,388 INFO [train.py:764] Epoch 1, batch 9600, train_loss[loss=3.33, ArTop10Accuracy=0.7322, NarTop10Accuracy=0.6035, over 1225.00 frames. ], tot_loss[loss=3.326, ArTop10Accuracy=0.7529, NarTop10Accuracy=0.5581, over 1210.68 frames. ], batch size: 3, lr: 3.40e-03, grad_scale: 16.0 +2023-11-01 00:55:24,417 INFO [train.py:764] Epoch 1, batch 9700, train_loss[loss=3.696, ArTop10Accuracy=0.7275, NarTop10Accuracy=0.4242, over 1358.00 frames. ], tot_loss[loss=3.33, ArTop10Accuracy=0.752, NarTop10Accuracy=0.5553, over 1204.10 frames. ], batch size: 3, lr: 3.38e-03, grad_scale: 16.0 +2023-11-01 00:55:46,226 INFO [train.py:764] Epoch 1, batch 9800, train_loss[loss=3.352, ArTop10Accuracy=0.7327, NarTop10Accuracy=0.607, over 1025.00 frames. ], tot_loss[loss=3.327, ArTop10Accuracy=0.7526, NarTop10Accuracy=0.5557, over 1201.65 frames. ], batch size: 2, lr: 3.37e-03, grad_scale: 16.0 +2023-11-01 00:56:08,325 INFO [train.py:764] Epoch 1, batch 9900, train_loss[loss=3.73, ArTop10Accuracy=0.715, NarTop10Accuracy=0.4577, over 1130.00 frames. ], tot_loss[loss=3.33, ArTop10Accuracy=0.7521, NarTop10Accuracy=0.5557, over 1206.02 frames. ], batch size: 2, lr: 3.36e-03, grad_scale: 16.0 diff --git a/exp/valle_dev/log/log-train-2023-11-01-01-01-00 b/exp/valle_dev/log/log-train-2023-11-01-01-01-00 new file mode 100644 index 0000000000000000000000000000000000000000..cc2ce8f61ec5abec9876c884c751b61934e28a8f --- /dev/null +++ b/exp/valle_dev/log/log-train-2023-11-01-01-01-00 @@ -0,0 +1,172 @@ +2023-11-01 01:01:00,501 INFO [train.py:851] Training started +2023-11-01 01:01:00,502 INFO [train.py:870] Device: cuda:0 +2023-11-01 01:01:00,503 INFO [train.py:871] {'best_train_loss': inf, 'best_valid_loss': inf, 'best_train_epoch': -1, 'best_valid_epoch': -1, 'batch_idx_train': 0, 'log_interval': 100, 'reset_interval': 200, 'valid_interval': 10000, 'world_size': 1, 'master_port': 12354, 'tensorboard': True, 'num_epochs': 20, 'start_epoch': 1, 'start_batch': 0, 'exp_dir': PosixPath('exp/valle_dev'), 'optimizer_name': 'ScaledAdam', 'scheduler_name': 'Eden', 'base_lr': 0.005, 'warmup_steps': 200, 'seed': 42, 'inf_check': False, 'save_every_n': 10000, 'keep_last_k': 20, 'average_period': 0, 'accumulate_grad_steps': 1, 'dtype': 'float16', 'filter_min_duration': 0.0, 'filter_max_duration': 20.0, 'train_stage': 0, 'visualize': False, 'oom_check': True, 'train_dir': '/home/ubuntu/VALL-E-X/JS_Dataset/JS_Dataset/train_tune', 'valid_dir': '/home/ubuntu/VALL-E-X/JS_Dataset/JS_Dataset/valid_tune', 'model_name': 'VALL-E', 'decoder_dim': 1024, 'nhead': 16, 'num_decoder_layers': 12, 'scale_factor': 1.0, 'norm_first': True, 'add_prenet': False, 'prefix_mode': 0, 'share_embedding': True, 'prepend_bos': False, 'num_quantizers': 8, 'scaling_xformers': False} +2023-11-01 01:01:00,503 INFO [train.py:873] About to create model +2023-11-01 01:01:05,108 INFO [train.py:877] Number of model parameters: 370539524 +2023-11-01 01:01:05,334 DEBUG [__init__.py:113] Building prefix dict from the default dictionary ... +2023-11-01 01:01:05,334 DEBUG [__init__.py:132] Loading model from cache /tmp/jieba.cache +2023-11-01 01:01:05,847 DEBUG [__init__.py:164] Loading model cost 0.513 seconds. +2023-11-01 01:01:05,847 DEBUG [__init__.py:166] Prefix dict has been built successfully. +2023-11-01 01:01:28,103 INFO [train.py:764] Epoch 1, batch 100, train_loss[loss=3.201, ArTop10Accuracy=0.7404, NarTop10Accuracy=0.6034, over 1306.00 frames. ], tot_loss[loss=3.398, ArTop10Accuracy=0.7056, NarTop10Accuracy=0.5532, over 476.97 frames. ], batch size: 3, lr: 3.75e-03, grad_scale: 1.0 +2023-11-01 01:01:49,616 INFO [train.py:764] Epoch 1, batch 200, train_loss[loss=3.527, ArTop10Accuracy=0.6953, NarTop10Accuracy=0.5522, over 1234.00 frames. ], tot_loss[loss=3.408, ArTop10Accuracy=0.709, NarTop10Accuracy=0.552, over 749.45 frames. ], batch size: 3, lr: 5.00e-03, grad_scale: 1.0 +2023-11-01 01:02:11,657 INFO [train.py:764] Epoch 1, batch 300, train_loss[loss=3.605, ArTop10Accuracy=0.7095, NarTop10Accuracy=0.4503, over 995.00 frames. ], tot_loss[loss=3.443, ArTop10Accuracy=0.7106, NarTop10Accuracy=0.5387, over 935.67 frames. ], batch size: 2, lr: 5.00e-03, grad_scale: 1.0 +2023-11-01 01:02:33,731 INFO [train.py:764] Epoch 1, batch 400, train_loss[loss=3.412, ArTop10Accuracy=0.6864, NarTop10Accuracy=0.5319, over 1234.00 frames. ], tot_loss[loss=3.462, ArTop10Accuracy=0.7132, NarTop10Accuracy=0.5284, over 1040.70 frames. ], batch size: 3, lr: 4.99e-03, grad_scale: 2.0 +2023-11-01 01:02:55,462 INFO [train.py:764] Epoch 1, batch 500, train_loss[loss=3.292, ArTop10Accuracy=0.727, NarTop10Accuracy=0.5829, over 1271.00 frames. ], tot_loss[loss=3.483, ArTop10Accuracy=0.7154, NarTop10Accuracy=0.5211, over 1094.80 frames. ], batch size: 3, lr: 4.99e-03, grad_scale: 2.0 +2023-11-01 01:03:17,499 INFO [train.py:764] Epoch 1, batch 600, train_loss[loss=3.666, ArTop10Accuracy=0.7166, NarTop10Accuracy=0.4386, over 1496.00 frames. ], tot_loss[loss=3.46, ArTop10Accuracy=0.719, NarTop10Accuracy=0.5268, over 1141.86 frames. ], batch size: 3, lr: 4.98e-03, grad_scale: 2.0 +2023-11-01 01:03:39,337 INFO [train.py:764] Epoch 1, batch 700, train_loss[loss=3.255, ArTop10Accuracy=0.6812, NarTop10Accuracy=0.6464, over 1010.00 frames. ], tot_loss[loss=3.468, ArTop10Accuracy=0.7186, NarTop10Accuracy=0.527, over 1167.56 frames. ], batch size: 2, lr: 4.98e-03, grad_scale: 2.0 +2023-11-01 01:04:01,250 INFO [train.py:764] Epoch 1, batch 800, train_loss[loss=3.898, ArTop10Accuracy=0.6695, NarTop10Accuracy=0.4247, over 947.00 frames. ], tot_loss[loss=3.467, ArTop10Accuracy=0.7206, NarTop10Accuracy=0.527, over 1184.08 frames. ], batch size: 2, lr: 4.97e-03, grad_scale: 4.0 +2023-11-01 01:04:23,115 INFO [train.py:764] Epoch 1, batch 900, train_loss[loss=3.424, ArTop10Accuracy=0.7506, NarTop10Accuracy=0.5276, over 1195.00 frames. ], tot_loss[loss=3.461, ArTop10Accuracy=0.7221, NarTop10Accuracy=0.5286, over 1188.23 frames. ], batch size: 3, lr: 4.96e-03, grad_scale: 4.0 +2023-11-01 01:04:45,007 INFO [train.py:764] Epoch 1, batch 1000, train_loss[loss=3.606, ArTop10Accuracy=0.7147, NarTop10Accuracy=0.4905, over 1339.00 frames. ], tot_loss[loss=3.458, ArTop10Accuracy=0.7239, NarTop10Accuracy=0.5285, over 1190.57 frames. ], batch size: 3, lr: 4.95e-03, grad_scale: 4.0 +2023-11-01 01:04:45,173 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 3.165e+01 4.527e+01 4.998e+01 5.591e+01 9.306e+01, threshold=9.997e+01, percent-clipped=0.0 +2023-11-01 01:05:07,092 INFO [train.py:764] Epoch 1, batch 1100, train_loss[loss=3.756, ArTop10Accuracy=0.7031, NarTop10Accuracy=0.4571, over 1007.00 frames. ], tot_loss[loss=3.465, ArTop10Accuracy=0.7242, NarTop10Accuracy=0.5252, over 1194.69 frames. ], batch size: 2, lr: 4.94e-03, grad_scale: 4.0 +2023-11-01 01:05:29,224 INFO [train.py:764] Epoch 1, batch 1200, train_loss[loss=3.244, ArTop10Accuracy=0.7549, NarTop10Accuracy=0.5967, over 1228.00 frames. ], tot_loss[loss=3.456, ArTop10Accuracy=0.7256, NarTop10Accuracy=0.5275, over 1198.98 frames. ], batch size: 3, lr: 4.93e-03, grad_scale: 8.0 +2023-11-01 01:05:51,281 INFO [train.py:764] Epoch 1, batch 1300, train_loss[loss=3.368, ArTop10Accuracy=0.7277, NarTop10Accuracy=0.5906, over 1054.00 frames. ], tot_loss[loss=3.464, ArTop10Accuracy=0.7263, NarTop10Accuracy=0.526, over 1202.37 frames. ], batch size: 2, lr: 4.92e-03, grad_scale: 8.0 +2023-11-01 01:06:13,118 INFO [train.py:764] Epoch 1, batch 1400, train_loss[loss=3.445, ArTop10Accuracy=0.7333, NarTop10Accuracy=0.5311, over 1301.00 frames. ], tot_loss[loss=3.474, ArTop10Accuracy=0.7277, NarTop10Accuracy=0.5206, over 1198.94 frames. ], batch size: 3, lr: 4.91e-03, grad_scale: 8.0 +2023-11-01 01:06:35,108 INFO [train.py:764] Epoch 1, batch 1500, train_loss[loss=3.337, ArTop10Accuracy=0.754, NarTop10Accuracy=0.566, over 1236.00 frames. ], tot_loss[loss=3.46, ArTop10Accuracy=0.7282, NarTop10Accuracy=0.5245, over 1198.26 frames. ], batch size: 3, lr: 4.89e-03, grad_scale: 8.0 +2023-11-01 01:06:57,122 INFO [train.py:764] Epoch 1, batch 1600, train_loss[loss=3.626, ArTop10Accuracy=0.7161, NarTop10Accuracy=0.4777, over 1201.00 frames. ], tot_loss[loss=3.464, ArTop10Accuracy=0.7262, NarTop10Accuracy=0.5244, over 1204.65 frames. ], batch size: 3, lr: 4.88e-03, grad_scale: 8.0 +2023-11-01 01:07:19,077 INFO [train.py:764] Epoch 1, batch 1700, train_loss[loss=3.4, ArTop10Accuracy=0.7569, NarTop10Accuracy=0.499, over 650.00 frames. ], tot_loss[loss=3.46, ArTop10Accuracy=0.7276, NarTop10Accuracy=0.5238, over 1202.22 frames. ], batch size: 1, lr: 4.87e-03, grad_scale: 8.0 +2023-11-01 01:07:40,966 INFO [train.py:764] Epoch 1, batch 1800, train_loss[loss=3.575, ArTop10Accuracy=0.7287, NarTop10Accuracy=0.4463, over 1253.00 frames. ], tot_loss[loss=3.46, ArTop10Accuracy=0.7279, NarTop10Accuracy=0.5244, over 1198.05 frames. ], batch size: 3, lr: 4.85e-03, grad_scale: 8.0 +2023-11-01 01:08:02,894 INFO [train.py:764] Epoch 1, batch 1900, train_loss[loss=3.345, ArTop10Accuracy=0.8437, NarTop10Accuracy=0.5034, over 819.00 frames. ], tot_loss[loss=3.453, ArTop10Accuracy=0.7277, NarTop10Accuracy=0.5275, over 1198.59 frames. ], batch size: 1, lr: 4.83e-03, grad_scale: 8.0 +2023-11-01 01:08:24,667 INFO [train.py:764] Epoch 1, batch 2000, train_loss[loss=3.321, ArTop10Accuracy=0.7224, NarTop10Accuracy=0.5903, over 1286.00 frames. ], tot_loss[loss=3.442, ArTop10Accuracy=0.7301, NarTop10Accuracy=0.53, over 1193.18 frames. ], batch size: 3, lr: 4.82e-03, grad_scale: 16.0 +2023-11-01 01:08:24,840 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.935e+01 4.004e+01 4.278e+01 4.591e+01 1.283e+02, threshold=8.555e+01, percent-clipped=0.1 +2023-11-01 01:08:46,652 INFO [train.py:764] Epoch 1, batch 2100, train_loss[loss=3.536, ArTop10Accuracy=0.7298, NarTop10Accuracy=0.5135, over 1114.00 frames. ], tot_loss[loss=3.459, ArTop10Accuracy=0.7287, NarTop10Accuracy=0.5254, over 1201.39 frames. ], batch size: 2, lr: 4.80e-03, grad_scale: 16.0 +2023-11-01 01:09:08,857 INFO [train.py:764] Epoch 1, batch 2200, train_loss[loss=3.196, ArTop10Accuracy=0.8063, NarTop10Accuracy=0.545, over 1084.00 frames. ], tot_loss[loss=3.452, ArTop10Accuracy=0.73, NarTop10Accuracy=0.5287, over 1212.86 frames. ], batch size: 2, lr: 4.78e-03, grad_scale: 16.0 +2023-11-01 01:09:30,803 INFO [train.py:764] Epoch 1, batch 2300, train_loss[loss=3.648, ArTop10Accuracy=0.7415, NarTop10Accuracy=0.4108, over 1478.00 frames. ], tot_loss[loss=3.457, ArTop10Accuracy=0.7292, NarTop10Accuracy=0.5254, over 1212.39 frames. ], batch size: 3, lr: 4.77e-03, grad_scale: 16.0 +2023-11-01 01:09:52,725 INFO [train.py:764] Epoch 1, batch 2400, train_loss[loss=3.594, ArTop10Accuracy=0.7306, NarTop10Accuracy=0.4828, over 1325.00 frames. ], tot_loss[loss=3.43, ArTop10Accuracy=0.7311, NarTop10Accuracy=0.5345, over 1209.83 frames. ], batch size: 3, lr: 4.75e-03, grad_scale: 16.0 +2023-11-01 01:10:14,502 INFO [train.py:764] Epoch 1, batch 2500, train_loss[loss=3.158, ArTop10Accuracy=0.7867, NarTop10Accuracy=0.6099, over 1280.00 frames. ], tot_loss[loss=3.419, ArTop10Accuracy=0.7338, NarTop10Accuracy=0.5354, over 1200.35 frames. ], batch size: 3, lr: 4.73e-03, grad_scale: 16.0 +2023-11-01 01:10:36,448 INFO [train.py:764] Epoch 1, batch 2600, train_loss[loss=3.217, ArTop10Accuracy=0.7426, NarTop10Accuracy=0.6008, over 1321.00 frames. ], tot_loss[loss=3.417, ArTop10Accuracy=0.7343, NarTop10Accuracy=0.5362, over 1203.85 frames. ], batch size: 3, lr: 4.71e-03, grad_scale: 16.0 +2023-11-01 01:10:58,352 INFO [train.py:764] Epoch 1, batch 2700, train_loss[loss=3.172, ArTop10Accuracy=0.748, NarTop10Accuracy=0.624, over 1480.00 frames. ], tot_loss[loss=3.406, ArTop10Accuracy=0.7351, NarTop10Accuracy=0.5391, over 1201.18 frames. ], batch size: 3, lr: 4.69e-03, grad_scale: 16.0 +2023-11-01 01:11:20,304 INFO [train.py:764] Epoch 1, batch 2800, train_loss[loss=3.185, ArTop10Accuracy=0.734, NarTop10Accuracy=0.6313, over 1297.00 frames. ], tot_loss[loss=3.409, ArTop10Accuracy=0.7356, NarTop10Accuracy=0.5372, over 1201.74 frames. ], batch size: 3, lr: 4.67e-03, grad_scale: 16.0 +2023-11-01 01:11:42,304 INFO [train.py:764] Epoch 1, batch 2900, train_loss[loss=3.039, ArTop10Accuracy=0.7433, NarTop10Accuracy=0.6679, over 1387.00 frames. ], tot_loss[loss=3.421, ArTop10Accuracy=0.7359, NarTop10Accuracy=0.5336, over 1199.06 frames. ], batch size: 3, lr: 4.65e-03, grad_scale: 16.0 +2023-11-01 01:12:04,208 INFO [train.py:764] Epoch 1, batch 3000, train_loss[loss=3.229, ArTop10Accuracy=0.7407, NarTop10Accuracy=0.6181, over 1261.00 frames. ], tot_loss[loss=3.428, ArTop10Accuracy=0.7354, NarTop10Accuracy=0.5309, over 1193.63 frames. ], batch size: 3, lr: 4.63e-03, grad_scale: 16.0 +2023-11-01 01:12:04,384 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.561e+01 3.787e+01 4.032e+01 4.340e+01 1.223e+02, threshold=8.065e+01, percent-clipped=0.1 +2023-11-01 01:12:26,564 INFO [train.py:764] Epoch 1, batch 3100, train_loss[loss=3.249, ArTop10Accuracy=0.7327, NarTop10Accuracy=0.6701, over 1070.00 frames. ], tot_loss[loss=3.42, ArTop10Accuracy=0.7352, NarTop10Accuracy=0.5346, over 1195.52 frames. ], batch size: 2, lr: 4.61e-03, grad_scale: 16.0 +2023-11-01 01:12:48,991 INFO [train.py:764] Epoch 1, batch 3200, train_loss[loss=3.381, ArTop10Accuracy=0.7176, NarTop10Accuracy=0.5645, over 1289.00 frames. ], tot_loss[loss=3.418, ArTop10Accuracy=0.7361, NarTop10Accuracy=0.5337, over 1210.89 frames. ], batch size: 3, lr: 4.59e-03, grad_scale: 16.0 +2023-11-01 01:13:10,935 INFO [train.py:764] Epoch 1, batch 3300, train_loss[loss=3.741, ArTop10Accuracy=0.7543, NarTop10Accuracy=0.3948, over 1331.00 frames. ], tot_loss[loss=3.427, ArTop10Accuracy=0.7365, NarTop10Accuracy=0.5314, over 1199.90 frames. ], batch size: 3, lr: 4.57e-03, grad_scale: 16.0 +2023-11-01 01:13:32,934 INFO [train.py:764] Epoch 1, batch 3400, train_loss[loss=3.206, ArTop10Accuracy=0.7596, NarTop10Accuracy=0.6492, over 1223.00 frames. ], tot_loss[loss=3.425, ArTop10Accuracy=0.7375, NarTop10Accuracy=0.5304, over 1204.36 frames. ], batch size: 3, lr: 4.55e-03, grad_scale: 16.0 +2023-11-01 01:13:54,893 INFO [train.py:764] Epoch 1, batch 3500, train_loss[loss=3.203, ArTop10Accuracy=0.7498, NarTop10Accuracy=0.6391, over 1315.00 frames. ], tot_loss[loss=3.417, ArTop10Accuracy=0.7378, NarTop10Accuracy=0.5328, over 1203.43 frames. ], batch size: 3, lr: 4.53e-03, grad_scale: 16.0 +2023-11-01 01:14:16,952 INFO [train.py:764] Epoch 1, batch 3600, train_loss[loss=3.249, ArTop10Accuracy=0.7305, NarTop10Accuracy=0.596, over 1002.00 frames. ], tot_loss[loss=3.41, ArTop10Accuracy=0.738, NarTop10Accuracy=0.5372, over 1200.89 frames. ], batch size: 2, lr: 4.50e-03, grad_scale: 16.0 +2023-11-01 01:14:38,878 INFO [train.py:764] Epoch 1, batch 3700, train_loss[loss=3.047, ArTop10Accuracy=0.7559, NarTop10Accuracy=0.6173, over 1270.00 frames. ], tot_loss[loss=3.404, ArTop10Accuracy=0.7377, NarTop10Accuracy=0.5375, over 1199.71 frames. ], batch size: 3, lr: 4.48e-03, grad_scale: 16.0 +2023-11-01 01:15:00,764 INFO [train.py:764] Epoch 1, batch 3800, train_loss[loss=3.431, ArTop10Accuracy=0.7261, NarTop10Accuracy=0.5124, over 953.00 frames. ], tot_loss[loss=3.422, ArTop10Accuracy=0.737, NarTop10Accuracy=0.5299, over 1206.54 frames. ], batch size: 2, lr: 4.46e-03, grad_scale: 16.0 +2023-11-01 01:15:22,762 INFO [train.py:764] Epoch 1, batch 3900, train_loss[loss=3.266, ArTop10Accuracy=0.766, NarTop10Accuracy=0.5619, over 1346.00 frames. ], tot_loss[loss=3.409, ArTop10Accuracy=0.738, NarTop10Accuracy=0.5353, over 1214.09 frames. ], batch size: 3, lr: 4.44e-03, grad_scale: 16.0 +2023-11-01 01:15:44,640 INFO [train.py:764] Epoch 1, batch 4000, train_loss[loss=3.197, ArTop10Accuracy=0.7829, NarTop10Accuracy=0.5988, over 1336.00 frames. ], tot_loss[loss=3.396, ArTop10Accuracy=0.7388, NarTop10Accuracy=0.539, over 1202.95 frames. ], batch size: 3, lr: 4.42e-03, grad_scale: 32.0 +2023-11-01 01:15:44,805 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.733e+01 3.740e+01 3.969e+01 4.257e+01 1.029e+02, threshold=7.938e+01, percent-clipped=0.2 +2023-11-01 01:16:06,416 INFO [train.py:764] Epoch 1, batch 4100, train_loss[loss=3.244, ArTop10Accuracy=0.7525, NarTop10Accuracy=0.5985, over 1277.00 frames. ], tot_loss[loss=3.4, ArTop10Accuracy=0.7391, NarTop10Accuracy=0.5378, over 1197.35 frames. ], batch size: 3, lr: 4.40e-03, grad_scale: 32.0 +2023-11-01 01:16:28,445 INFO [train.py:764] Epoch 1, batch 4200, train_loss[loss=3.324, ArTop10Accuracy=0.7329, NarTop10Accuracy=0.5902, over 1228.00 frames. ], tot_loss[loss=3.395, ArTop10Accuracy=0.7386, NarTop10Accuracy=0.5409, over 1204.03 frames. ], batch size: 3, lr: 4.38e-03, grad_scale: 32.0 +2023-11-01 01:16:50,432 INFO [train.py:764] Epoch 1, batch 4300, train_loss[loss=3.314, ArTop10Accuracy=0.7644, NarTop10Accuracy=0.5612, over 1125.00 frames. ], tot_loss[loss=3.401, ArTop10Accuracy=0.7396, NarTop10Accuracy=0.5402, over 1201.24 frames. ], batch size: 1, lr: 4.35e-03, grad_scale: 8.0 +2023-11-01 01:17:12,468 INFO [train.py:764] Epoch 1, batch 4400, train_loss[loss=2.998, ArTop10Accuracy=0.754, NarTop10Accuracy=0.7196, over 1297.00 frames. ], tot_loss[loss=3.392, ArTop10Accuracy=0.7426, NarTop10Accuracy=0.54, over 1202.84 frames. ], batch size: 3, lr: 4.33e-03, grad_scale: 8.0 +2023-11-01 01:17:34,486 INFO [train.py:764] Epoch 1, batch 4500, train_loss[loss=3.158, ArTop10Accuracy=0.7451, NarTop10Accuracy=0.6344, over 1271.00 frames. ], tot_loss[loss=3.377, ArTop10Accuracy=0.7434, NarTop10Accuracy=0.5462, over 1206.43 frames. ], batch size: 3, lr: 4.31e-03, grad_scale: 8.0 +2023-11-01 01:17:56,444 INFO [train.py:764] Epoch 1, batch 4600, train_loss[loss=3.468, ArTop10Accuracy=0.7347, NarTop10Accuracy=0.4962, over 980.00 frames. ], tot_loss[loss=3.379, ArTop10Accuracy=0.7433, NarTop10Accuracy=0.5449, over 1199.69 frames. ], batch size: 2, lr: 4.29e-03, grad_scale: 8.0 +2023-11-01 01:18:18,361 INFO [train.py:764] Epoch 1, batch 4700, train_loss[loss=3.19, ArTop10Accuracy=0.7266, NarTop10Accuracy=0.6189, over 1280.00 frames. ], tot_loss[loss=3.379, ArTop10Accuracy=0.7423, NarTop10Accuracy=0.545, over 1200.61 frames. ], batch size: 3, lr: 4.27e-03, grad_scale: 8.0 +2023-11-01 01:18:40,342 INFO [train.py:764] Epoch 1, batch 4800, train_loss[loss=3.732, ArTop10Accuracy=0.7355, NarTop10Accuracy=0.4267, over 1176.00 frames. ], tot_loss[loss=3.384, ArTop10Accuracy=0.7417, NarTop10Accuracy=0.5435, over 1204.83 frames. ], batch size: 2, lr: 4.25e-03, grad_scale: 8.0 +2023-11-01 01:19:02,286 INFO [train.py:764] Epoch 1, batch 4900, train_loss[loss=3.203, ArTop10Accuracy=0.7443, NarTop10Accuracy=0.6233, over 962.00 frames. ], tot_loss[loss=3.396, ArTop10Accuracy=0.7404, NarTop10Accuracy=0.5386, over 1196.82 frames. ], batch size: 2, lr: 4.23e-03, grad_scale: 8.0 +2023-11-01 01:19:24,468 INFO [train.py:764] Epoch 1, batch 5000, train_loss[loss=3.96, ArTop10Accuracy=0.6766, NarTop10Accuracy=0.3849, over 1002.00 frames. ], tot_loss[loss=3.4, ArTop10Accuracy=0.74, NarTop10Accuracy=0.5378, over 1198.57 frames. ], batch size: 2, lr: 4.20e-03, grad_scale: 8.0 +2023-11-01 01:19:25,064 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.820e+01 3.661e+01 3.895e+01 4.176e+01 5.538e+02, threshold=7.791e+01, percent-clipped=0.3 +2023-11-01 01:19:46,481 INFO [train.py:764] Epoch 1, batch 5100, train_loss[loss=3.419, ArTop10Accuracy=0.7219, NarTop10Accuracy=0.5399, over 1050.00 frames. ], tot_loss[loss=3.389, ArTop10Accuracy=0.7419, NarTop10Accuracy=0.5407, over 1202.12 frames. ], batch size: 2, lr: 4.18e-03, grad_scale: 8.0 +2023-11-01 01:20:08,364 INFO [train.py:764] Epoch 1, batch 5200, train_loss[loss=3.099, ArTop10Accuracy=0.7485, NarTop10Accuracy=0.6468, over 1352.00 frames. ], tot_loss[loss=3.381, ArTop10Accuracy=0.7422, NarTop10Accuracy=0.5441, over 1199.90 frames. ], batch size: 3, lr: 4.16e-03, grad_scale: 8.0 +2023-11-01 01:20:30,120 INFO [train.py:764] Epoch 1, batch 5300, train_loss[loss=3.2, ArTop10Accuracy=0.7527, NarTop10Accuracy=0.573, over 1217.00 frames. ], tot_loss[loss=3.398, ArTop10Accuracy=0.7423, NarTop10Accuracy=0.5382, over 1195.55 frames. ], batch size: 3, lr: 4.14e-03, grad_scale: 8.0 +2023-11-01 01:20:52,015 INFO [train.py:764] Epoch 1, batch 5400, train_loss[loss=3.275, ArTop10Accuracy=0.7423, NarTop10Accuracy=0.5832, over 1300.00 frames. ], tot_loss[loss=3.384, ArTop10Accuracy=0.7429, NarTop10Accuracy=0.5434, over 1202.33 frames. ], batch size: 3, lr: 4.12e-03, grad_scale: 8.0 +2023-11-01 01:21:13,989 INFO [train.py:764] Epoch 1, batch 5500, train_loss[loss=3.955, ArTop10Accuracy=0.6973, NarTop10Accuracy=0.361, over 1318.00 frames. ], tot_loss[loss=3.391, ArTop10Accuracy=0.7416, NarTop10Accuracy=0.5408, over 1204.76 frames. ], batch size: 3, lr: 4.10e-03, grad_scale: 8.0 +2023-11-01 01:21:36,015 INFO [train.py:764] Epoch 1, batch 5600, train_loss[loss=3.215, ArTop10Accuracy=0.7528, NarTop10Accuracy=0.6052, over 1064.00 frames. ], tot_loss[loss=3.389, ArTop10Accuracy=0.7419, NarTop10Accuracy=0.5422, over 1209.03 frames. ], batch size: 2, lr: 4.08e-03, grad_scale: 8.0 +2023-11-01 01:21:58,246 INFO [train.py:764] Epoch 1, batch 5700, train_loss[loss=3.757, ArTop10Accuracy=0.7044, NarTop10Accuracy=0.4133, over 1309.00 frames. ], tot_loss[loss=3.403, ArTop10Accuracy=0.7408, NarTop10Accuracy=0.5376, over 1206.83 frames. ], batch size: 3, lr: 4.06e-03, grad_scale: 8.0 +2023-11-01 01:22:20,084 INFO [train.py:764] Epoch 1, batch 5800, train_loss[loss=3.222, ArTop10Accuracy=0.7902, NarTop10Accuracy=0.5901, over 1077.00 frames. ], tot_loss[loss=3.393, ArTop10Accuracy=0.7415, NarTop10Accuracy=0.5391, over 1198.69 frames. ], batch size: 2, lr: 4.04e-03, grad_scale: 8.0 +2023-11-01 01:22:41,986 INFO [train.py:764] Epoch 1, batch 5900, train_loss[loss=3.256, ArTop10Accuracy=0.7596, NarTop10Accuracy=0.5688, over 1410.00 frames. ], tot_loss[loss=3.379, ArTop10Accuracy=0.7435, NarTop10Accuracy=0.5425, over 1195.35 frames. ], batch size: 2, lr: 4.02e-03, grad_scale: 8.0 +2023-11-01 01:23:03,855 INFO [train.py:764] Epoch 1, batch 6000, train_loss[loss=3.04, ArTop10Accuracy=0.7555, NarTop10Accuracy=0.6494, over 1264.00 frames. ], tot_loss[loss=3.367, ArTop10Accuracy=0.7443, NarTop10Accuracy=0.5488, over 1191.87 frames. ], batch size: 3, lr: 4.00e-03, grad_scale: 8.0 +2023-11-01 01:23:04,464 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.955e+01 3.660e+01 3.898e+01 4.175e+01 1.106e+02, threshold=7.796e+01, percent-clipped=0.2 +2023-11-01 01:23:25,947 INFO [train.py:764] Epoch 1, batch 6100, train_loss[loss=3.244, ArTop10Accuracy=0.7569, NarTop10Accuracy=0.5706, over 1275.00 frames. ], tot_loss[loss=3.366, ArTop10Accuracy=0.7445, NarTop10Accuracy=0.5487, over 1200.31 frames. ], batch size: 3, lr: 3.98e-03, grad_scale: 8.0 +2023-11-01 01:23:47,870 INFO [train.py:764] Epoch 1, batch 6200, train_loss[loss=3.64, ArTop10Accuracy=0.7432, NarTop10Accuracy=0.4895, over 1067.00 frames. ], tot_loss[loss=3.368, ArTop10Accuracy=0.7455, NarTop10Accuracy=0.5473, over 1197.29 frames. ], batch size: 2, lr: 3.96e-03, grad_scale: 8.0 +2023-11-01 01:24:09,740 INFO [train.py:764] Epoch 1, batch 6300, train_loss[loss=2.884, ArTop10Accuracy=0.7787, NarTop10Accuracy=0.656, over 1229.00 frames. ], tot_loss[loss=3.358, ArTop10Accuracy=0.7462, NarTop10Accuracy=0.5488, over 1195.66 frames. ], batch size: 3, lr: 3.94e-03, grad_scale: 16.0 +2023-11-01 01:24:31,832 INFO [train.py:764] Epoch 1, batch 6400, train_loss[loss=3.337, ArTop10Accuracy=0.7198, NarTop10Accuracy=0.6022, over 1342.00 frames. ], tot_loss[loss=3.363, ArTop10Accuracy=0.7452, NarTop10Accuracy=0.5489, over 1200.90 frames. ], batch size: 3, lr: 3.92e-03, grad_scale: 16.0 +2023-11-01 01:24:53,712 INFO [train.py:764] Epoch 1, batch 6500, train_loss[loss=3.571, ArTop10Accuracy=0.7508, NarTop10Accuracy=0.4587, over 1324.00 frames. ], tot_loss[loss=3.364, ArTop10Accuracy=0.7447, NarTop10Accuracy=0.5472, over 1203.64 frames. ], batch size: 3, lr: 3.90e-03, grad_scale: 16.0 +2023-11-01 01:25:15,706 INFO [train.py:764] Epoch 1, batch 6600, train_loss[loss=3.618, ArTop10Accuracy=0.7208, NarTop10Accuracy=0.4864, over 1157.00 frames. ], tot_loss[loss=3.375, ArTop10Accuracy=0.7441, NarTop10Accuracy=0.544, over 1199.80 frames. ], batch size: 2, lr: 3.89e-03, grad_scale: 16.0 +2023-11-01 01:25:37,824 INFO [train.py:764] Epoch 1, batch 6700, train_loss[loss=3.916, ArTop10Accuracy=0.7235, NarTop10Accuracy=0.3773, over 1512.00 frames. ], tot_loss[loss=3.373, ArTop10Accuracy=0.7464, NarTop10Accuracy=0.5436, over 1206.18 frames. ], batch size: 2, lr: 3.87e-03, grad_scale: 16.0 +2023-11-01 01:25:59,844 INFO [train.py:764] Epoch 1, batch 6800, train_loss[loss=3.743, ArTop10Accuracy=0.6712, NarTop10Accuracy=0.473, over 1250.00 frames. ], tot_loss[loss=3.378, ArTop10Accuracy=0.747, NarTop10Accuracy=0.5415, over 1211.75 frames. ], batch size: 3, lr: 3.85e-03, grad_scale: 16.0 +2023-11-01 01:26:21,673 INFO [train.py:764] Epoch 1, batch 6900, train_loss[loss=3.288, ArTop10Accuracy=0.794, NarTop10Accuracy=0.5091, over 1199.00 frames. ], tot_loss[loss=3.368, ArTop10Accuracy=0.748, NarTop10Accuracy=0.5445, over 1203.83 frames. ], batch size: 3, lr: 3.83e-03, grad_scale: 16.0 +2023-11-01 01:26:43,753 INFO [train.py:764] Epoch 1, batch 7000, train_loss[loss=3.611, ArTop10Accuracy=0.6679, NarTop10Accuracy=0.559, over 1054.00 frames. ], tot_loss[loss=3.379, ArTop10Accuracy=0.7463, NarTop10Accuracy=0.5433, over 1205.70 frames. ], batch size: 2, lr: 3.81e-03, grad_scale: 16.0 +2023-11-01 01:26:44,377 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.938e+01 3.640e+01 3.899e+01 4.197e+01 1.539e+02, threshold=7.798e+01, percent-clipped=0.2 +2023-11-01 01:27:05,623 INFO [train.py:764] Epoch 1, batch 7100, train_loss[loss=3.34, ArTop10Accuracy=0.7641, NarTop10Accuracy=0.5495, over 1221.00 frames. ], tot_loss[loss=3.364, ArTop10Accuracy=0.7483, NarTop10Accuracy=0.5462, over 1200.17 frames. ], batch size: 3, lr: 3.79e-03, grad_scale: 16.0 +2023-11-01 01:27:27,790 INFO [train.py:764] Epoch 1, batch 7200, train_loss[loss=3.402, ArTop10Accuracy=0.7728, NarTop10Accuracy=0.522, over 1109.00 frames. ], tot_loss[loss=3.349, ArTop10Accuracy=0.75, NarTop10Accuracy=0.551, over 1200.81 frames. ], batch size: 2, lr: 3.78e-03, grad_scale: 16.0 +2023-11-01 01:27:49,946 INFO [train.py:764] Epoch 1, batch 7300, train_loss[loss=3.102, ArTop10Accuracy=0.7641, NarTop10Accuracy=0.645, over 1047.00 frames. ], tot_loss[loss=3.358, ArTop10Accuracy=0.7507, NarTop10Accuracy=0.5483, over 1199.39 frames. ], batch size: 2, lr: 3.76e-03, grad_scale: 16.0 +2023-11-01 01:28:12,023 INFO [train.py:764] Epoch 1, batch 7400, train_loss[loss=3.492, ArTop10Accuracy=0.7566, NarTop10Accuracy=0.49, over 1142.00 frames. ], tot_loss[loss=3.35, ArTop10Accuracy=0.7503, NarTop10Accuracy=0.552, over 1204.30 frames. ], batch size: 2, lr: 3.74e-03, grad_scale: 16.0 +2023-11-01 01:28:34,245 INFO [train.py:764] Epoch 1, batch 7500, train_loss[loss=3.834, ArTop10Accuracy=0.6968, NarTop10Accuracy=0.4323, over 1019.00 frames. ], tot_loss[loss=3.359, ArTop10Accuracy=0.7492, NarTop10Accuracy=0.5488, over 1211.85 frames. ], batch size: 2, lr: 3.72e-03, grad_scale: 16.0 +2023-11-01 01:28:56,204 INFO [train.py:764] Epoch 1, batch 7600, train_loss[loss=3.051, ArTop10Accuracy=0.7471, NarTop10Accuracy=0.6682, over 1538.00 frames. ], tot_loss[loss=3.346, ArTop10Accuracy=0.7511, NarTop10Accuracy=0.5516, over 1203.46 frames. ], batch size: 3, lr: 3.71e-03, grad_scale: 16.0 +2023-11-01 01:29:18,414 INFO [train.py:764] Epoch 1, batch 7700, train_loss[loss=3.394, ArTop10Accuracy=0.7467, NarTop10Accuracy=0.508, over 1500.00 frames. ], tot_loss[loss=3.342, ArTop10Accuracy=0.7508, NarTop10Accuracy=0.5528, over 1210.10 frames. ], batch size: 3, lr: 3.69e-03, grad_scale: 16.0 +2023-11-01 01:29:40,478 INFO [train.py:764] Epoch 1, batch 7800, train_loss[loss=3.565, ArTop10Accuracy=0.7138, NarTop10Accuracy=0.5097, over 1300.00 frames. ], tot_loss[loss=3.345, ArTop10Accuracy=0.7497, NarTop10Accuracy=0.553, over 1207.39 frames. ], batch size: 3, lr: 3.67e-03, grad_scale: 16.0 +2023-11-01 01:30:02,574 INFO [train.py:764] Epoch 1, batch 7900, train_loss[loss=3.114, ArTop10Accuracy=0.7528, NarTop10Accuracy=0.6468, over 1323.00 frames. ], tot_loss[loss=3.348, ArTop10Accuracy=0.7485, NarTop10Accuracy=0.5526, over 1205.69 frames. ], batch size: 3, lr: 3.66e-03, grad_scale: 16.0 +2023-11-01 01:30:24,766 INFO [train.py:764] Epoch 1, batch 8000, train_loss[loss=3.416, ArTop10Accuracy=0.7549, NarTop10Accuracy=0.5289, over 1314.00 frames. ], tot_loss[loss=3.344, ArTop10Accuracy=0.7481, NarTop10Accuracy=0.553, over 1204.55 frames. ], batch size: 2, lr: 3.64e-03, grad_scale: 16.0 +2023-11-01 01:30:25,379 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.581e+01 3.622e+01 3.870e+01 4.187e+01 1.276e+02, threshold=7.739e+01, percent-clipped=0.3 +2023-11-01 01:30:47,002 INFO [train.py:764] Epoch 1, batch 8100, train_loss[loss=3.579, ArTop10Accuracy=0.7254, NarTop10Accuracy=0.493, over 1453.00 frames. ], tot_loss[loss=3.368, ArTop10Accuracy=0.7466, NarTop10Accuracy=0.5466, over 1201.98 frames. ], batch size: 3, lr: 3.62e-03, grad_scale: 16.0 +2023-11-01 01:31:09,160 INFO [train.py:764] Epoch 1, batch 8200, train_loss[loss=3.123, ArTop10Accuracy=0.7755, NarTop10Accuracy=0.6341, over 1198.00 frames. ], tot_loss[loss=3.377, ArTop10Accuracy=0.7455, NarTop10Accuracy=0.5452, over 1201.66 frames. ], batch size: 3, lr: 3.61e-03, grad_scale: 16.0 +2023-11-01 01:31:31,231 INFO [train.py:764] Epoch 1, batch 8300, train_loss[loss=3.518, ArTop10Accuracy=0.7555, NarTop10Accuracy=0.4488, over 1354.00 frames. ], tot_loss[loss=3.362, ArTop10Accuracy=0.7486, NarTop10Accuracy=0.5461, over 1200.11 frames. ], batch size: 3, lr: 3.59e-03, grad_scale: 32.0 +2023-11-01 01:31:53,404 INFO [train.py:764] Epoch 1, batch 8400, train_loss[loss=3.782, ArTop10Accuracy=0.7124, NarTop10Accuracy=0.4265, over 1064.00 frames. ], tot_loss[loss=3.363, ArTop10Accuracy=0.7499, NarTop10Accuracy=0.5457, over 1201.74 frames. ], batch size: 2, lr: 3.58e-03, grad_scale: 32.0 +2023-11-01 01:32:15,398 INFO [train.py:764] Epoch 1, batch 8500, train_loss[loss=3.664, ArTop10Accuracy=0.7246, NarTop10Accuracy=0.4731, over 1082.00 frames. ], tot_loss[loss=3.357, ArTop10Accuracy=0.7498, NarTop10Accuracy=0.5488, over 1189.28 frames. ], batch size: 2, lr: 3.56e-03, grad_scale: 32.0 +2023-11-01 01:32:37,449 INFO [train.py:764] Epoch 1, batch 8600, train_loss[loss=3.343, ArTop10Accuracy=0.755, NarTop10Accuracy=0.5416, over 1208.00 frames. ], tot_loss[loss=3.362, ArTop10Accuracy=0.7486, NarTop10Accuracy=0.5467, over 1195.17 frames. ], batch size: 3, lr: 3.54e-03, grad_scale: 32.0 +2023-11-01 01:32:59,631 INFO [train.py:764] Epoch 1, batch 8700, train_loss[loss=3.506, ArTop10Accuracy=0.7528, NarTop10Accuracy=0.4847, over 1076.00 frames. ], tot_loss[loss=3.341, ArTop10Accuracy=0.7514, NarTop10Accuracy=0.5544, over 1199.46 frames. ], batch size: 2, lr: 3.53e-03, grad_scale: 32.0 +2023-11-01 01:33:21,552 INFO [train.py:764] Epoch 1, batch 8800, train_loss[loss=3.168, ArTop10Accuracy=0.7199, NarTop10Accuracy=0.6646, over 1178.00 frames. ], tot_loss[loss=3.338, ArTop10Accuracy=0.751, NarTop10Accuracy=0.5547, over 1196.85 frames. ], batch size: 3, lr: 3.51e-03, grad_scale: 32.0 +2023-11-01 01:33:43,552 INFO [train.py:764] Epoch 1, batch 8900, train_loss[loss=3.424, ArTop10Accuracy=0.7301, NarTop10Accuracy=0.5693, over 1330.00 frames. ], tot_loss[loss=3.332, ArTop10Accuracy=0.7518, NarTop10Accuracy=0.5568, over 1197.63 frames. ], batch size: 3, lr: 3.50e-03, grad_scale: 32.0 +2023-11-01 01:34:05,651 INFO [train.py:764] Epoch 1, batch 9000, train_loss[loss=3.032, ArTop10Accuracy=0.7749, NarTop10Accuracy=0.6663, over 1355.00 frames. ], tot_loss[loss=3.344, ArTop10Accuracy=0.7508, NarTop10Accuracy=0.5512, over 1206.31 frames. ], batch size: 3, lr: 3.48e-03, grad_scale: 32.0 +2023-11-01 01:34:06,281 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.623e+01 3.625e+01 3.891e+01 4.198e+01 1.204e+02, threshold=7.783e+01, percent-clipped=0.2 +2023-11-01 01:34:27,643 INFO [train.py:764] Epoch 1, batch 9100, train_loss[loss=3.115, ArTop10Accuracy=0.7458, NarTop10Accuracy=0.6156, over 1255.00 frames. ], tot_loss[loss=3.325, ArTop10Accuracy=0.7508, NarTop10Accuracy=0.5588, over 1204.55 frames. ], batch size: 3, lr: 3.47e-03, grad_scale: 32.0 +2023-11-01 01:34:49,396 INFO [train.py:764] Epoch 1, batch 9200, train_loss[loss=3.593, ArTop10Accuracy=0.7426, NarTop10Accuracy=0.4606, over 1243.00 frames. ], tot_loss[loss=3.323, ArTop10Accuracy=0.7518, NarTop10Accuracy=0.5592, over 1199.74 frames. ], batch size: 3, lr: 3.46e-03, grad_scale: 32.0 +2023-11-01 01:35:11,250 INFO [train.py:764] Epoch 1, batch 9300, train_loss[loss=3.347, ArTop10Accuracy=0.786, NarTop10Accuracy=0.5172, over 1243.00 frames. ], tot_loss[loss=3.328, ArTop10Accuracy=0.7537, NarTop10Accuracy=0.5565, over 1196.75 frames. ], batch size: 3, lr: 3.44e-03, grad_scale: 32.0 +2023-11-01 01:35:33,210 INFO [train.py:764] Epoch 1, batch 9400, train_loss[loss=3.267, ArTop10Accuracy=0.7515, NarTop10Accuracy=0.5882, over 1501.00 frames. ], tot_loss[loss=3.318, ArTop10Accuracy=0.7535, NarTop10Accuracy=0.5602, over 1201.10 frames. ], batch size: 3, lr: 3.43e-03, grad_scale: 32.0 +2023-11-01 01:35:55,287 INFO [train.py:764] Epoch 1, batch 9500, train_loss[loss=3.33, ArTop10Accuracy=0.741, NarTop10Accuracy=0.6289, over 1023.00 frames. ], tot_loss[loss=3.318, ArTop10Accuracy=0.7546, NarTop10Accuracy=0.5603, over 1206.75 frames. ], batch size: 2, lr: 3.41e-03, grad_scale: 32.0 +2023-11-01 01:36:17,423 INFO [train.py:764] Epoch 1, batch 9600, train_loss[loss=3.327, ArTop10Accuracy=0.7469, NarTop10Accuracy=0.6008, over 1225.00 frames. ], tot_loss[loss=3.326, ArTop10Accuracy=0.7527, NarTop10Accuracy=0.5576, over 1210.68 frames. ], batch size: 3, lr: 3.40e-03, grad_scale: 32.0 +2023-11-01 01:36:39,461 INFO [train.py:764] Epoch 1, batch 9700, train_loss[loss=3.695, ArTop10Accuracy=0.7334, NarTop10Accuracy=0.4212, over 1358.00 frames. ], tot_loss[loss=3.33, ArTop10Accuracy=0.7523, NarTop10Accuracy=0.5554, over 1204.10 frames. ], batch size: 3, lr: 3.38e-03, grad_scale: 32.0 +2023-11-01 01:37:01,299 INFO [train.py:764] Epoch 1, batch 9800, train_loss[loss=3.36, ArTop10Accuracy=0.7327, NarTop10Accuracy=0.6126, over 1025.00 frames. ], tot_loss[loss=3.328, ArTop10Accuracy=0.7528, NarTop10Accuracy=0.5558, over 1201.65 frames. ], batch size: 2, lr: 3.37e-03, grad_scale: 32.0 +2023-11-01 01:37:23,421 INFO [train.py:764] Epoch 1, batch 9900, train_loss[loss=3.719, ArTop10Accuracy=0.7257, NarTop10Accuracy=0.4459, over 1130.00 frames. ], tot_loss[loss=3.331, ArTop10Accuracy=0.7523, NarTop10Accuracy=0.5558, over 1206.02 frames. ], batch size: 2, lr: 3.36e-03, grad_scale: 32.0 +2023-11-01 01:37:45,281 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-10000.pt +2023-11-01 01:37:54,135 INFO [train.py:764] Epoch 1, batch 10000, train_loss[loss=3.626, ArTop10Accuracy=0.7504, NarTop10Accuracy=0.4714, over 1278.00 frames. ], tot_loss[loss=3.326, ArTop10Accuracy=0.7525, NarTop10Accuracy=0.5572, over 1196.17 frames. ], batch size: 3, lr: 3.34e-03, grad_scale: 32.0 +2023-11-01 01:37:54,138 INFO [train.py:802] Computing validation loss +2023-11-01 01:41:43,550 INFO [train.py:810] Epoch 1, validation: loss=3.193, ArTop10Accuracy=0.7614, NarTop10Accuracy=0.5796, over 1739106.00 frames. +2023-11-01 01:41:43,550 INFO [train.py:813] Maximum memory allocated so far is 17387MB +2023-11-01 01:41:44,169 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.795e+01 3.605e+01 3.882e+01 4.179e+01 1.156e+02, threshold=7.765e+01, percent-clipped=0.2 +2023-11-01 01:42:05,744 INFO [train.py:764] Epoch 1, batch 10100, train_loss[loss=3.277, ArTop10Accuracy=0.7554, NarTop10Accuracy=0.5287, over 1165.00 frames. ], tot_loss[loss=3.317, ArTop10Accuracy=0.754, NarTop10Accuracy=0.5596, over 1204.24 frames. ], batch size: 3, lr: 3.33e-03, grad_scale: 32.0 +2023-11-01 01:42:27,939 INFO [train.py:764] Epoch 1, batch 10200, train_loss[loss=3.551, ArTop10Accuracy=0.7434, NarTop10Accuracy=0.4833, over 1243.00 frames. ], tot_loss[loss=3.316, ArTop10Accuracy=0.7536, NarTop10Accuracy=0.5606, over 1202.58 frames. ], batch size: 3, lr: 3.32e-03, grad_scale: 32.0 +2023-11-01 01:42:50,826 INFO [train.py:764] Epoch 1, batch 10300, train_loss[loss=3.3, ArTop10Accuracy=0.7664, NarTop10Accuracy=0.508, over 1049.00 frames. ], tot_loss[loss=3.326, ArTop10Accuracy=0.7522, NarTop10Accuracy=0.5587, over 1209.79 frames. ], batch size: 2, lr: 3.30e-03, grad_scale: 64.0 +2023-11-01 01:43:12,842 INFO [train.py:764] Epoch 1, batch 10400, train_loss[loss=3.616, ArTop10Accuracy=0.7065, NarTop10Accuracy=0.5428, over 1237.00 frames. ], tot_loss[loss=3.314, ArTop10Accuracy=0.7537, NarTop10Accuracy=0.5616, over 1195.83 frames. ], batch size: 3, lr: 3.29e-03, grad_scale: 64.0 +2023-11-01 01:43:34,961 INFO [train.py:764] Epoch 1, batch 10500, train_loss[loss=3.53, ArTop10Accuracy=0.7334, NarTop10Accuracy=0.5249, over 1343.00 frames. ], tot_loss[loss=3.328, ArTop10Accuracy=0.7528, NarTop10Accuracy=0.5573, over 1201.99 frames. ], batch size: 3, lr: 3.28e-03, grad_scale: 64.0 +2023-11-01 01:43:57,011 INFO [train.py:764] Epoch 1, batch 10600, train_loss[loss=3.209, ArTop10Accuracy=0.7266, NarTop10Accuracy=0.6411, over 1262.00 frames. ], tot_loss[loss=3.323, ArTop10Accuracy=0.7559, NarTop10Accuracy=0.5564, over 1204.76 frames. ], batch size: 3, lr: 3.27e-03, grad_scale: 16.0 +2023-11-01 01:44:19,318 INFO [train.py:764] Epoch 1, batch 10700, train_loss[loss=3.45, ArTop10Accuracy=0.716, NarTop10Accuracy=0.5662, over 1067.00 frames. ], tot_loss[loss=3.324, ArTop10Accuracy=0.7551, NarTop10Accuracy=0.5563, over 1203.94 frames. ], batch size: 2, lr: 3.25e-03, grad_scale: 16.0 +2023-11-01 01:44:42,212 INFO [train.py:764] Epoch 1, batch 10800, train_loss[loss=3.276, ArTop10Accuracy=0.7893, NarTop10Accuracy=0.5161, over 992.00 frames. ], tot_loss[loss=3.311, ArTop10Accuracy=0.7567, NarTop10Accuracy=0.5599, over 1206.94 frames. ], batch size: 2, lr: 3.24e-03, grad_scale: 16.0 +2023-11-01 01:45:04,261 INFO [train.py:764] Epoch 1, batch 10900, train_loss[loss=3.293, ArTop10Accuracy=0.7395, NarTop10Accuracy=0.5362, over 833.00 frames. ], tot_loss[loss=3.312, ArTop10Accuracy=0.7552, NarTop10Accuracy=0.5621, over 1197.04 frames. ], batch size: 1, lr: 3.23e-03, grad_scale: 16.0 +2023-11-01 01:45:26,606 INFO [train.py:764] Epoch 1, batch 11000, train_loss[loss=3.684, ArTop10Accuracy=0.7243, NarTop10Accuracy=0.4497, over 1023.00 frames. ], tot_loss[loss=3.319, ArTop10Accuracy=0.7556, NarTop10Accuracy=0.5566, over 1192.92 frames. ], batch size: 2, lr: 3.22e-03, grad_scale: 16.0 +2023-11-01 01:45:27,631 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.656e+01 3.581e+01 3.876e+01 4.218e+01 2.198e+02, threshold=7.753e+01, percent-clipped=0.5 +2023-11-01 01:45:48,570 INFO [train.py:764] Epoch 1, batch 11100, train_loss[loss=3.345, ArTop10Accuracy=0.7677, NarTop10Accuracy=0.5429, over 1218.00 frames. ], tot_loss[loss=3.328, ArTop10Accuracy=0.7565, NarTop10Accuracy=0.5523, over 1188.64 frames. ], batch size: 3, lr: 3.20e-03, grad_scale: 16.0 +2023-11-01 01:46:11,057 INFO [train.py:764] Epoch 1, batch 11200, train_loss[loss=3.674, ArTop10Accuracy=0.7002, NarTop10Accuracy=0.4926, over 1451.00 frames. ], tot_loss[loss=3.328, ArTop10Accuracy=0.7558, NarTop10Accuracy=0.5533, over 1199.65 frames. ], batch size: 3, lr: 3.19e-03, grad_scale: 16.0 +2023-11-01 01:46:33,210 INFO [train.py:764] Epoch 1, batch 11300, train_loss[loss=3.116, ArTop10Accuracy=0.7731, NarTop10Accuracy=0.6661, over 1516.00 frames. ], tot_loss[loss=3.333, ArTop10Accuracy=0.7557, NarTop10Accuracy=0.5515, over 1198.36 frames. ], batch size: 3, lr: 3.18e-03, grad_scale: 16.0 +2023-11-01 01:46:55,584 INFO [train.py:764] Epoch 1, batch 11400, train_loss[loss=3.208, ArTop10Accuracy=0.7723, NarTop10Accuracy=0.6035, over 1010.00 frames. ], tot_loss[loss=3.317, ArTop10Accuracy=0.7566, NarTop10Accuracy=0.5581, over 1207.38 frames. ], batch size: 2, lr: 3.17e-03, grad_scale: 16.0 +2023-11-01 01:47:18,045 INFO [train.py:764] Epoch 1, batch 11500, train_loss[loss=2.939, ArTop10Accuracy=0.7846, NarTop10Accuracy=0.6675, over 1114.00 frames. ], tot_loss[loss=3.314, ArTop10Accuracy=0.7566, NarTop10Accuracy=0.5598, over 1217.46 frames. ], batch size: 2, lr: 3.16e-03, grad_scale: 16.0 +2023-11-01 01:47:39,987 INFO [train.py:764] Epoch 1, batch 11600, train_loss[loss=3.135, ArTop10Accuracy=0.7496, NarTop10Accuracy=0.6593, over 1178.00 frames. ], tot_loss[loss=3.321, ArTop10Accuracy=0.7559, NarTop10Accuracy=0.558, over 1200.17 frames. ], batch size: 3, lr: 3.15e-03, grad_scale: 16.0 +2023-11-01 01:47:56,239 INFO [train.py:648] Reaches end of dataloader. +2023-11-01 01:47:56,242 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/epoch-1.pt +2023-11-01 01:48:36,133 INFO [train.py:764] Epoch 2, batch 100, train_loss[loss=3.517, ArTop10Accuracy=0.7405, NarTop10Accuracy=0.5475, over 1291.00 frames. ], tot_loss[loss=3.278, ArTop10Accuracy=0.7682, NarTop10Accuracy=0.5618, over 475.14 frames. ], batch size: 3, lr: 3.08e-03, grad_scale: 16.0 +2023-11-01 01:48:58,354 INFO [train.py:764] Epoch 2, batch 200, train_loss[loss=3.173, ArTop10Accuracy=0.7737, NarTop10Accuracy=0.5945, over 1264.00 frames. ], tot_loss[loss=3.284, ArTop10Accuracy=0.7679, NarTop10Accuracy=0.5589, over 764.18 frames. ], batch size: 3, lr: 3.07e-03, grad_scale: 16.0 +2023-11-01 01:49:20,372 INFO [train.py:764] Epoch 2, batch 300, train_loss[loss=3.15, ArTop10Accuracy=0.7964, NarTop10Accuracy=0.5779, over 1238.00 frames. ], tot_loss[loss=3.279, ArTop10Accuracy=0.7677, NarTop10Accuracy=0.5628, over 933.46 frames. ], batch size: 3, lr: 3.06e-03, grad_scale: 16.0 +2023-11-01 01:49:27,316 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.615e+01 3.644e+01 3.906e+01 4.267e+01 1.348e+02, threshold=7.812e+01, percent-clipped=0.3 +2023-11-01 01:49:42,335 INFO [train.py:764] Epoch 2, batch 400, train_loss[loss=3.183, ArTop10Accuracy=0.7688, NarTop10Accuracy=0.6139, over 1289.00 frames. ], tot_loss[loss=3.263, ArTop10Accuracy=0.7705, NarTop10Accuracy=0.5659, over 1033.80 frames. ], batch size: 3, lr: 3.05e-03, grad_scale: 16.0 +2023-11-01 01:50:04,654 INFO [train.py:764] Epoch 2, batch 500, train_loss[loss=3.224, ArTop10Accuracy=0.7834, NarTop10Accuracy=0.5896, over 974.00 frames. ], tot_loss[loss=3.266, ArTop10Accuracy=0.7696, NarTop10Accuracy=0.5658, over 1103.83 frames. ], batch size: 2, lr: 3.04e-03, grad_scale: 16.0 +2023-11-01 01:50:26,894 INFO [train.py:764] Epoch 2, batch 600, train_loss[loss=3.192, ArTop10Accuracy=0.7686, NarTop10Accuracy=0.5814, over 1059.00 frames. ], tot_loss[loss=3.252, ArTop10Accuracy=0.7713, NarTop10Accuracy=0.5709, over 1142.77 frames. ], batch size: 2, lr: 3.02e-03, grad_scale: 16.0 +2023-11-01 01:50:49,069 INFO [train.py:764] Epoch 2, batch 700, train_loss[loss=3.272, ArTop10Accuracy=0.7538, NarTop10Accuracy=0.6008, over 1174.00 frames. ], tot_loss[loss=3.253, ArTop10Accuracy=0.7714, NarTop10Accuracy=0.5695, over 1168.33 frames. ], batch size: 3, lr: 3.01e-03, grad_scale: 16.0 +2023-11-01 01:51:11,287 INFO [train.py:764] Epoch 2, batch 800, train_loss[loss=3.539, ArTop10Accuracy=0.7563, NarTop10Accuracy=0.4397, over 1227.00 frames. ], tot_loss[loss=3.273, ArTop10Accuracy=0.7692, NarTop10Accuracy=0.5629, over 1178.72 frames. ], batch size: 3, lr: 3.00e-03, grad_scale: 16.0 +2023-11-01 01:51:33,655 INFO [train.py:764] Epoch 2, batch 900, train_loss[loss=3.88, ArTop10Accuracy=0.6952, NarTop10Accuracy=0.4376, over 1004.00 frames. ], tot_loss[loss=3.277, ArTop10Accuracy=0.7692, NarTop10Accuracy=0.56, over 1183.23 frames. ], batch size: 2, lr: 2.99e-03, grad_scale: 32.0 +2023-11-01 01:51:55,740 INFO [train.py:764] Epoch 2, batch 1000, train_loss[loss=3.467, ArTop10Accuracy=0.7846, NarTop10Accuracy=0.4436, over 1235.00 frames. ], tot_loss[loss=3.28, ArTop10Accuracy=0.768, NarTop10Accuracy=0.5604, over 1186.34 frames. ], batch size: 3, lr: 2.98e-03, grad_scale: 32.0 +2023-11-01 01:52:17,749 INFO [train.py:764] Epoch 2, batch 1100, train_loss[loss=3.059, ArTop10Accuracy=0.8348, NarTop10Accuracy=0.57, over 1277.00 frames. ], tot_loss[loss=3.262, ArTop10Accuracy=0.7692, NarTop10Accuracy=0.5665, over 1186.39 frames. ], batch size: 3, lr: 2.97e-03, grad_scale: 32.0 +2023-11-01 01:52:40,095 INFO [train.py:764] Epoch 2, batch 1200, train_loss[loss=3.164, ArTop10Accuracy=0.7892, NarTop10Accuracy=0.5847, over 1115.00 frames. ], tot_loss[loss=3.271, ArTop10Accuracy=0.7688, NarTop10Accuracy=0.5645, over 1196.82 frames. ], batch size: 2, lr: 2.96e-03, grad_scale: 32.0 +2023-11-01 01:53:02,469 INFO [train.py:764] Epoch 2, batch 1300, train_loss[loss=3.172, ArTop10Accuracy=0.8073, NarTop10Accuracy=0.5677, over 1204.00 frames. ], tot_loss[loss=3.275, ArTop10Accuracy=0.768, NarTop10Accuracy=0.5649, over 1197.53 frames. ], batch size: 3, lr: 2.95e-03, grad_scale: 32.0 +2023-11-01 01:53:09,537 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.571e+01 3.646e+01 3.940e+01 4.297e+01 1.030e+02, threshold=7.880e+01, percent-clipped=0.1 +2023-11-01 01:53:24,675 INFO [train.py:764] Epoch 2, batch 1400, train_loss[loss=3.376, ArTop10Accuracy=0.7127, NarTop10Accuracy=0.5969, over 1065.00 frames. ], tot_loss[loss=3.259, ArTop10Accuracy=0.7695, NarTop10Accuracy=0.5666, over 1207.86 frames. ], batch size: 2, lr: 2.94e-03, grad_scale: 32.0 +2023-11-01 01:53:46,768 INFO [train.py:764] Epoch 2, batch 1500, train_loss[loss=3.237, ArTop10Accuracy=0.7795, NarTop10Accuracy=0.5848, over 1256.00 frames. ], tot_loss[loss=3.255, ArTop10Accuracy=0.7699, NarTop10Accuracy=0.5686, over 1208.58 frames. ], batch size: 3, lr: 2.93e-03, grad_scale: 32.0 +2023-11-01 01:54:08,665 INFO [train.py:764] Epoch 2, batch 1600, train_loss[loss=3.242, ArTop10Accuracy=0.726, NarTop10Accuracy=0.6307, over 989.00 frames. ], tot_loss[loss=3.244, ArTop10Accuracy=0.7713, NarTop10Accuracy=0.5715, over 1199.33 frames. ], batch size: 2, lr: 2.92e-03, grad_scale: 32.0 +2023-11-01 01:54:30,744 INFO [train.py:764] Epoch 2, batch 1700, train_loss[loss=2.888, ArTop10Accuracy=0.7923, NarTop10Accuracy=0.6888, over 1305.00 frames. ], tot_loss[loss=3.25, ArTop10Accuracy=0.7712, NarTop10Accuracy=0.5707, over 1203.12 frames. ], batch size: 2, lr: 2.91e-03, grad_scale: 32.0 +2023-11-01 01:54:53,004 INFO [train.py:764] Epoch 2, batch 1800, train_loss[loss=2.743, ArTop10Accuracy=0.7932, NarTop10Accuracy=0.6948, over 967.00 frames. ], tot_loss[loss=3.27, ArTop10Accuracy=0.7691, NarTop10Accuracy=0.5652, over 1210.34 frames. ], batch size: 2, lr: 2.90e-03, grad_scale: 32.0 +2023-11-01 01:55:14,944 INFO [train.py:764] Epoch 2, batch 1900, train_loss[loss=3.528, ArTop10Accuracy=0.7713, NarTop10Accuracy=0.4586, over 1277.00 frames. ], tot_loss[loss=3.274, ArTop10Accuracy=0.7706, NarTop10Accuracy=0.5617, over 1207.27 frames. ], batch size: 3, lr: 2.90e-03, grad_scale: 32.0 +2023-11-01 01:55:37,022 INFO [train.py:764] Epoch 2, batch 2000, train_loss[loss=3.354, ArTop10Accuracy=0.7612, NarTop10Accuracy=0.509, over 1030.00 frames. ], tot_loss[loss=3.267, ArTop10Accuracy=0.7721, NarTop10Accuracy=0.5622, over 1205.23 frames. ], batch size: 2, lr: 2.89e-03, grad_scale: 32.0 +2023-11-01 01:55:59,142 INFO [train.py:764] Epoch 2, batch 2100, train_loss[loss=3.008, ArTop10Accuracy=0.7989, NarTop10Accuracy=0.6327, over 1253.00 frames. ], tot_loss[loss=3.278, ArTop10Accuracy=0.7713, NarTop10Accuracy=0.5594, over 1207.06 frames. ], batch size: 3, lr: 2.88e-03, grad_scale: 32.0 +2023-11-01 01:56:21,029 INFO [train.py:764] Epoch 2, batch 2200, train_loss[loss=3.097, ArTop10Accuracy=0.7775, NarTop10Accuracy=0.6281, over 1272.00 frames. ], tot_loss[loss=3.266, ArTop10Accuracy=0.7719, NarTop10Accuracy=0.563, over 1199.67 frames. ], batch size: 3, lr: 2.87e-03, grad_scale: 32.0 +2023-11-01 01:56:43,276 INFO [train.py:764] Epoch 2, batch 2300, train_loss[loss=3.314, ArTop10Accuracy=0.7717, NarTop10Accuracy=0.5371, over 1270.00 frames. ], tot_loss[loss=3.244, ArTop10Accuracy=0.7723, NarTop10Accuracy=0.5711, over 1213.70 frames. ], batch size: 3, lr: 2.86e-03, grad_scale: 32.0 +2023-11-01 01:56:50,205 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.446e+01 3.674e+01 3.960e+01 4.425e+01 1.163e+02, threshold=7.920e+01, percent-clipped=0.2 +2023-11-01 01:57:05,137 INFO [train.py:764] Epoch 2, batch 2400, train_loss[loss=2.835, ArTop10Accuracy=0.8084, NarTop10Accuracy=0.6297, over 950.00 frames. ], tot_loss[loss=3.257, ArTop10Accuracy=0.7717, NarTop10Accuracy=0.5661, over 1204.28 frames. ], batch size: 2, lr: 2.85e-03, grad_scale: 32.0 +2023-11-01 01:57:27,371 INFO [train.py:764] Epoch 2, batch 2500, train_loss[loss=3.096, ArTop10Accuracy=0.7811, NarTop10Accuracy=0.6451, over 1421.00 frames. ], tot_loss[loss=3.266, ArTop10Accuracy=0.771, NarTop10Accuracy=0.5629, over 1206.71 frames. ], batch size: 2, lr: 2.84e-03, grad_scale: 16.0 +2023-11-01 01:57:49,515 INFO [train.py:764] Epoch 2, batch 2600, train_loss[loss=3.526, ArTop10Accuracy=0.7525, NarTop10Accuracy=0.499, over 1204.00 frames. ], tot_loss[loss=3.269, ArTop10Accuracy=0.7704, NarTop10Accuracy=0.5633, over 1207.73 frames. ], batch size: 3, lr: 2.83e-03, grad_scale: 16.0 +2023-11-01 01:58:11,257 INFO [train.py:764] Epoch 2, batch 2700, train_loss[loss=2.971, ArTop10Accuracy=0.7834, NarTop10Accuracy=0.6313, over 1279.00 frames. ], tot_loss[loss=3.267, ArTop10Accuracy=0.7712, NarTop10Accuracy=0.5641, over 1196.88 frames. ], batch size: 3, lr: 2.82e-03, grad_scale: 16.0 diff --git a/exp/valle_dev/tensorboard/events.out.tfevents.1698769188.vallex1-4110961-iaas.58414.0 b/exp/valle_dev/tensorboard/events.out.tfevents.1698769188.vallex1-4110961-iaas.58414.0 new file mode 100644 index 0000000000000000000000000000000000000000..75bf8d55d0f7ac15abba1ee8c875f636f0e4ac2b --- /dev/null +++ b/exp/valle_dev/tensorboard/events.out.tfevents.1698769188.vallex1-4110961-iaas.58414.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6675fdba042d5999c24e258a02434eee15b71eb9358e67df381d956010ee26e +size 66553 diff --git a/exp/valle_dev/tensorboard/events.out.tfevents.1698771660.vallex1-4110961-iaas.58697.0 b/exp/valle_dev/tensorboard/events.out.tfevents.1698771660.vallex1-4110961-iaas.58697.0 new file mode 100644 index 0000000000000000000000000000000000000000..2aed40ddbc35ce2b268f33763da2939ab92c7a16 --- /dev/null +++ b/exp/valle_dev/tensorboard/events.out.tfevents.1698771660.vallex1-4110961-iaas.58697.0 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e32669f11c346ac94101e4b83226e3a8792257df84bf93ba2dbd428118de47a +size 96315 diff --git a/images/vallex_framework.jpg b/images/vallex_framework.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c8dea042c2e3919003721a6adeb67cb658ed76bc Binary files /dev/null and b/images/vallex_framework.jpg differ diff --git a/infer.ipynb b/infer.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..4442b5ab7b5c6fd351f900f3063ef8ec2ae95e25 --- /dev/null +++ b/infer.ipynb @@ -0,0 +1,378 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 27, + "id": "d5a1b342-1dfb-4d79-98f7-250aa3b72d93", + "metadata": {}, + "outputs": [], + "source": [ + "# coding: utf-8\n", + "import os\n", + "import torch\n", + "from vocos import Vocos\n", + "import logging\n", + "import py3langid as langid\n", + "langid.set_languages(['en', 'zh', 'ja', 'vi'])\n", + "\n", + "import pathlib\n", + "import platform\n", + "if platform.system().lower() == 'windows':\n", + " temp = pathlib.PosixPath\n", + " pathlib.PosixPath = pathlib.WindowsPath\n", + "else:\n", + " temp = pathlib.WindowsPath\n", + " pathlib.WindowsPath = pathlib.PosixPath\n", + "\n", + "import numpy as np\n", + "from data.tokenizer import (\n", + " AudioTokenizer,\n", + " tokenize_audio,\n", + ")\n", + "from data.collation import get_text_token_collater\n", + "from models.vallex import VALLE\n", + "from utils.g2p import PhonemeBpeTokenizer\n", + "from utils.sentence_cutter import split_text_into_sentences\n", + "\n", + "from macros import *\n", + "\n", + "device = torch.device(\"cpu\")\n", + "# if torch.cuda.is_available():\n", + "# device = torch.device(\"cuda\", 0)\n", + "\n", + "url = 'https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt'\n", + "\n", + "checkpoints_dir = \"./checkpoints/\"\n", + "\n", + "model_checkpoint_name = \"vallex-checkpoint.pt\"\n", + "\n", + "model = None\n", + "\n", + "codec = None\n", + "\n", + "vocos = None\n", + "\n", + "text_tokenizer = PhonemeBpeTokenizer(tokenizer_path=\"./utils/g2p/bpe_69.json\")\n", + "text_collater = get_text_token_collater()\n", + "\n", + "def preload_models(model_path):\n", + " global model, codec, vocos\n", + " # if not os.path.exists(checkpoints_dir): os.mkdir(checkpoints_dir)\n", + " # if not os.path.exists(os.path.join(checkpoints_dir, model_checkpoint_name)):\n", + " # import wget\n", + " # try:\n", + " # logging.info(\n", + " # \"Downloading model from https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt ...\")\n", + " # # download from https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt to ./checkpoints/vallex-checkpoint.pt\n", + " # wget.download(\"https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt\",\n", + " # out=\"./checkpoints/vallex-checkpoint.pt\", bar=wget.bar_adaptive)\n", + " # except Exception as e:\n", + " # logging.info(e)\n", + " # raise Exception(\n", + " # \"\\n Model weights download failed, please go to 'https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt'\"\n", + " # \"\\n manually download model weights and put it to {} .\".format(os.getcwd() + \"\\checkpoints\"))\n", + " # # VALL-E\n", + " model = VALLE(\n", + " N_DIM,\n", + " NUM_HEAD,\n", + " NUM_LAYERS,\n", + " norm_first=True,\n", + " add_prenet=False,\n", + " prefix_mode=PREFIX_MODE,\n", + " share_embedding=True,\n", + " nar_scale_factor=1.0,\n", + " prepend_bos=True,\n", + " num_quantizers=NUM_QUANTIZERS,\n", + " ).to(device)\n", + " checkpoint = torch.load(model_path, map_location='cpu')\n", + " missing_keys, unexpected_keys = model.load_state_dict(\n", + " checkpoint[\"model\"], strict=True\n", + " )\n", + " assert not missing_keys\n", + " model.eval()\n", + "\n", + " # Encodec\n", + " codec = AudioTokenizer(device)\n", + " \n", + " vocos = Vocos.from_pretrained('charactr/vocos-encodec-24khz').to(device)\n", + "\n", + "@torch.no_grad()\n", + "def generate_audio(text, prompt=None, language='auto', accent='no-accent'):\n", + " global model, codec, vocos, text_tokenizer, text_collater\n", + " text = text.replace(\"\\n\", \"\").strip(\" \")\n", + " # detect language\n", + " if language == \"auto\":\n", + " language = langid.classify(text)[0]\n", + " lang_token = lang2token[language]\n", + " lang = token2lang[lang_token]\n", + " text = lang_token + text + lang_token\n", + "\n", + " # load prompt\n", + " if prompt is not None:\n", + " prompt_path = prompt\n", + " if not os.path.exists(prompt_path):\n", + " prompt_path = \"./presets/\" + prompt + \".npz\"\n", + " if not os.path.exists(prompt_path):\n", + " prompt_path = \"./customs/\" + prompt + \".npz\"\n", + " if not os.path.exists(prompt_path):\n", + " raise ValueError(f\"Cannot find prompt {prompt}\")\n", + " prompt_data = np.load(prompt_path)\n", + " audio_prompts = prompt_data['audio_tokens']\n", + " text_prompts = prompt_data['text_tokens']\n", + " lang_pr = prompt_data['lang_code']\n", + " lang_pr = code2lang[int(lang_pr)]\n", + "\n", + " # numpy to tensor\n", + " audio_prompts = torch.tensor(audio_prompts).type(torch.int32).to(device)\n", + " text_prompts = torch.tensor(text_prompts).type(torch.int32)\n", + " else:\n", + " audio_prompts = torch.zeros([1, 0, NUM_QUANTIZERS]).type(torch.int32).to(device)\n", + " text_prompts = torch.zeros([1, 0]).type(torch.int32)\n", + " lang_pr = lang if lang != 'mix' else 'en'\n", + "\n", + " enroll_x_lens = text_prompts.shape[-1]\n", + " logging.info(f\"synthesize text: {text}\")\n", + " phone_tokens, langs = text_tokenizer.tokenize(text=f\"_{text}\".strip())\n", + " text_tokens, text_tokens_lens = text_collater(\n", + " [\n", + " phone_tokens\n", + " ]\n", + " )\n", + " text_tokens = torch.cat([text_prompts, text_tokens], dim=-1)\n", + " text_tokens_lens += enroll_x_lens\n", + " # accent control\n", + " lang = lang if accent == \"no-accent\" else token2lang[langdropdown2token[accent]]\n", + " encoded_frames = model.inference(\n", + " text_tokens.to(device),\n", + " text_tokens_lens.to(device),\n", + " audio_prompts,\n", + " enroll_x_lens=enroll_x_lens,\n", + " top_k=-100,\n", + " temperature=1,\n", + " prompt_language=lang_pr,\n", + " text_language=langs if accent == \"no-accent\" else lang,\n", + " )\n", + " # Decode with Vocos\n", + " frames = encoded_frames.permute(2,0,1)\n", + " features = vocos.codes_to_features(frames)\n", + " samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device))\n", + "\n", + " return samples.squeeze().cpu().numpy()\n", + "\n", + "@torch.no_grad()\n", + "def generate_audio_from_long_text(text, prompt=None, language='auto', accent='no-accent', mode='sliding-window'):\n", + " \"\"\"\n", + " For long audio generation, two modes are available.\n", + " fixed-prompt: This mode will keep using the same prompt the user has provided, and generate audio sentence by sentence.\n", + " sliding-window: This mode will use the last sentence as the prompt for the next sentence, but has some concern on speaker maintenance.\n", + " \"\"\"\n", + " global model, codec, vocos, text_tokenizer, text_collater\n", + " if prompt is None or prompt == \"\":\n", + " mode = 'sliding-window' # If no prompt is given, use sliding-window mode\n", + " sentences = split_text_into_sentences(text)\n", + " # detect language\n", + " if language == \"auto\":\n", + " language = langid.classify(text)[0]\n", + "\n", + " # if initial prompt is given, encode it\n", + " if prompt is not None and prompt != \"\":\n", + " prompt_path = prompt\n", + " if not os.path.exists(prompt_path):\n", + " prompt_path = \"./presets/\" + prompt + \".npz\"\n", + " if not os.path.exists(prompt_path):\n", + " prompt_path = \"./customs/\" + prompt + \".npz\"\n", + " if not os.path.exists(prompt_path):\n", + " raise ValueError(f\"Cannot find prompt {prompt}\")\n", + " prompt_data = np.load(prompt_path)\n", + " audio_prompts = prompt_data['audio_tokens']\n", + " text_prompts = prompt_data['text_tokens']\n", + " lang_pr = prompt_data['lang_code']\n", + " lang_pr = code2lang[int(lang_pr)]\n", + "\n", + " # numpy to tensor\n", + " audio_prompts = torch.tensor(audio_prompts).type(torch.int32).to(device)\n", + " text_prompts = torch.tensor(text_prompts).type(torch.int32)\n", + " else:\n", + " audio_prompts = torch.zeros([1, 0, NUM_QUANTIZERS]).type(torch.int32).to(device)\n", + " text_prompts = torch.zeros([1, 0]).type(torch.int32)\n", + " lang_pr = language if language != 'mix' else 'en'\n", + " if mode == 'fixed-prompt':\n", + " complete_tokens = torch.zeros([1, NUM_QUANTIZERS, 0]).type(torch.LongTensor).to(device)\n", + " for text in sentences:\n", + " text = text.replace(\"\\n\", \"\").strip(\" \")\n", + " if text == \"\":\n", + " continue\n", + " lang_token = lang2token[language]\n", + " lang = token2lang[lang_token]\n", + " text = lang_token + text + lang_token\n", + "\n", + " enroll_x_lens = text_prompts.shape[-1]\n", + " logging.info(f\"synthesize text: {text}\")\n", + " phone_tokens, langs = text_tokenizer.tokenize(text=f\"_{text}\".strip())\n", + " text_tokens, text_tokens_lens = text_collater(\n", + " [\n", + " phone_tokens\n", + " ]\n", + " )\n", + " text_tokens = torch.cat([text_prompts, text_tokens], dim=-1)\n", + " text_tokens_lens += enroll_x_lens\n", + " # accent control\n", + " lang = lang if accent == \"no-accent\" else token2lang[langdropdown2token[accent]]\n", + " encoded_frames = model.inference(\n", + " text_tokens.to(device),\n", + " text_tokens_lens.to(device),\n", + " audio_prompts,\n", + " enroll_x_lens=enroll_x_lens,\n", + " top_k=-100,\n", + " temperature=1,\n", + " prompt_language=lang_pr,\n", + " text_language=langs if accent == \"no-accent\" else lang,\n", + " )\n", + " complete_tokens = torch.cat([complete_tokens, encoded_frames.transpose(2, 1)], dim=-1)\n", + " # Decode with Vocos\n", + " frames = complete_tokens.permute(1,0,2)\n", + " features = vocos.codes_to_features(frames)\n", + " samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device))\n", + " return samples.squeeze().cpu().numpy()\n", + " elif mode == \"sliding-window\":\n", + " complete_tokens = torch.zeros([1, NUM_QUANTIZERS, 0]).type(torch.LongTensor).to(device)\n", + " original_audio_prompts = audio_prompts\n", + " original_text_prompts = text_prompts\n", + " for text in sentences:\n", + " text = text.replace(\"\\n\", \"\").strip(\" \")\n", + " if text == \"\":\n", + " continue\n", + " lang_token = lang2token[language]\n", + " lang = token2lang[lang_token]\n", + " text = lang_token + text + lang_token\n", + "\n", + " enroll_x_lens = text_prompts.shape[-1]\n", + " logging.info(f\"synthesize text: {text}\")\n", + " phone_tokens, langs = text_tokenizer.tokenize(text=f\"_{text}\".strip())\n", + " text_tokens, text_tokens_lens = text_collater(\n", + " [\n", + " phone_tokens\n", + " ]\n", + " )\n", + " text_tokens = torch.cat([text_prompts, text_tokens], dim=-1)\n", + " text_tokens_lens += enroll_x_lens\n", + " # accent control\n", + " lang = lang if accent == \"no-accent\" else token2lang[langdropdown2token[accent]]\n", + " encoded_frames = model.inference(\n", + " text_tokens.to(device),\n", + " text_tokens_lens.to(device),\n", + " audio_prompts,\n", + " enroll_x_lens=enroll_x_lens,\n", + " top_k=-100,\n", + " temperature=1,\n", + " prompt_language=lang_pr,\n", + " text_language=langs if accent == \"no-accent\" else lang,\n", + " )\n", + " complete_tokens = torch.cat([complete_tokens, encoded_frames.transpose(2, 1)], dim=-1)\n", + " if torch.rand(1) < 0.5:\n", + " audio_prompts = encoded_frames[:, :, -NUM_QUANTIZERS:]\n", + " text_prompts = text_tokens[:, enroll_x_lens:]\n", + " else:\n", + " audio_prompts = original_audio_prompts\n", + " text_prompts = original_text_prompts\n", + " # Decode with Vocos\n", + " frames = complete_tokens.permute(1,0,2)\n", + " features = vocos.codes_to_features(frames)\n", + " samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device))\n", + " return samples.squeeze().cpu().numpy()\n", + " else:\n", + " raise ValueError(f\"No such mode {mode}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "a91524e3-407f-4baa-be5e-061d3fb97091", + "metadata": {}, + "outputs": [], + "source": [ + "# from utils.generation import SAMPLE_RATE, generate_audio, preload_models\n", + "from scipy.io.wavfile import write as write_wav\n", + "from IPython.display import Audio\n", + "model = 'exp/valle_dev/epoch-1.pt'\n", + "# download and load all models\n", + "preload_models(model)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "id": "ce872b2f-57c4-450e-989b-95932a923b47", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VALL-E EOS [0 -> 603]\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# generate audio from text\n", + "text_prompt = \"\"\"\n", + "他整個身體是瀰漫在 空間之間的 他所有的力氣 他所有的生長的力氣 已經消耗盡了.\n", + "\"\"\"\n", + "audio_array = generate_audio(text_prompt)\n", + "\n", + "# save audio to disk\n", + "# write_wav(\"ep10.wav\", SAMPLE_RATE, audio_array)\n", + "\n", + "# play text in notebook\n", + "Audio(audio_array, rate=SAMPLE_RATE)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1768174c-4d95-4c27-9e9f-ff720a1a4feb", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/launch-ui.py b/launch-ui.py new file mode 100644 index 0000000000000000000000000000000000000000..4f7baebfa3b06f5e7d56d2b6bca09ab8e7c2e9ce --- /dev/null +++ b/launch-ui.py @@ -0,0 +1,432 @@ +# coding: utf-8 +import logging +import os +import pathlib +import time +import tempfile +import platform +import webbrowser +import sys + +print(f"default encoding is {sys.getdefaultencoding()},file system encoding is {sys.getfilesystemencoding()}") +print(f"You are using Python version {platform.python_version()}") +if (sys.version_info[0] < 3 or sys.version_info[1] < 7): + print("The Python version is too low and may cause problems") + +if platform.system().lower() == 'windows': + temp = pathlib.PosixPath + pathlib.PosixPath = pathlib.WindowsPath +else: + temp = pathlib.WindowsPath + pathlib.WindowsPath = pathlib.PosixPath +os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" + +import py3langid as langid + +langid.set_languages(['en', 'zh', 'ja', 'vi']) + +import nltk + +nltk.data.path = nltk.data.path + [os.path.join(os.getcwd(), "nltk_data")] + +import torch +import torchaudio + +import numpy as np + +from data.tokenizer import ( + AudioTokenizer, + tokenize_audio, +) +from data.collation import get_text_token_collater +from models.vallex import VALLE +from utils.g2p import PhonemeBpeTokenizer +from descriptions import * +from macros import * + +import gradio as gr +import whisper +from vocos import Vocos +import multiprocessing + +thread_count = multiprocessing.cpu_count() + +print("Use", thread_count, "cpu cores for computing") + +torch.set_num_threads(thread_count) +torch.set_num_interop_threads(thread_count) +torch._C._jit_set_profiling_executor(False) +torch._C._jit_set_profiling_mode(False) +torch._C._set_graph_executor_optimize(False) + +text_tokenizer = PhonemeBpeTokenizer(tokenizer_path="./utils/g2p/bpe_175.json") +text_collater = get_text_token_collater() + +device = torch.device("cpu") +if torch.cuda.is_available(): + device = torch.device("cuda", 0) + +# VALL-E-X model +model = VALLE( + N_DIM, + NUM_HEAD, + NUM_LAYERS, + norm_first=True, + add_prenet=False, + prefix_mode=PREFIX_MODE, + share_embedding=True, + nar_scale_factor=1.0, + prepend_bos=True, + num_quantizers=NUM_QUANTIZERS, +) +checkpoint = torch.load("./checkpoints/vallex-checkpoint.pt", map_location='cpu') +missing_keys, unexpected_keys = model.load_state_dict( + checkpoint["model"], strict=True +) +assert not missing_keys +model.eval() + +# Encodec model +audio_tokenizer = AudioTokenizer(device) + +# Vocos decoder +vocos = Vocos.from_pretrained('charactr/vocos-encodec-24khz').to(device) + +# ASR +if not os.path.exists("./whisper/"): os.mkdir("./whisper/") +try: + whisper_model = whisper.load_model("medium", download_root=os.path.join(os.getcwd(), "whisper")).cpu() +except Exception as e: + logging.info(e) + raise Exception( + "\n Whisper download failed or damaged, please go to " + "'https://openaipublic.azureedge.net/main/whisper/models/345ae4da62f9b3d59415adc60127b97c714f32e89e936602e85993674d08dcb1/medium.pt'" + "\n manually download model and put it to {} .".format(os.getcwd() + "/whisper")) + +# Voice Presets +preset_list = os.walk("./presets/").__next__()[2] +preset_list = [preset[:-4] for preset in preset_list if preset.endswith(".npz")] + + +def inference_encoded_frames(text_tokens, text_tokens_lens, audio_prompts, enroll_x_lens, lang_pr, langs, accent, lang): + if lang_pr == vi_code: + lang_pr = zh_code + + if lang == vi_code: + lang = ja_code + + encoded_frames = model.inference( + text_tokens.to(device), + text_tokens_lens.to(device), + audio_prompts, + enroll_x_lens=enroll_x_lens, + top_k=-100, + temperature=1, + prompt_language=lang_pr, + text_language=langs if accent == "no-accent" else lang, + best_of=5, + ) + + return encoded_frames + + +def inference_samples(text_tokens, text_tokens_lens, audio_prompts, enroll_x_lens, lang_pr, langs, accent, lang): + encoded_frames = inference_encoded_frames(text_tokens, text_tokens_lens, audio_prompts, enroll_x_lens, lang_pr, + langs, + accent, lang) + # Decode with Vocos + frames = encoded_frames.permute(2, 0, 1) + features = vocos.codes_to_features(frames) + samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device)) + + return samples + + +def clear_prompts(): + try: + path = tempfile.gettempdir() + for eachfile in os.listdir(path): + filename = os.path.join(path, eachfile) + if os.path.isfile(filename) and filename.endswith(".npz"): + lastmodifytime = os.stat(filename).st_mtime + endfiletime = time.time() - 60 + if endfiletime > lastmodifytime: + os.remove(filename) + except: + return + + +def transcribe_one(model, audio_path): + # load audio and pad/trim it to fit 30 seconds + audio = whisper.load_audio(audio_path) + audio = whisper.pad_or_trim(audio) + + # make log-Mel spectrogram and move to the same device as the model + mel = whisper.log_mel_spectrogram(audio).to(model.device) + + # detect the spoken language + _, probs = model.detect_language(mel) + print(f"Detected language: {max(probs, key=probs.get)}") + lang = max(probs, key=probs.get) + # decode the audio + options = whisper.DecodingOptions(temperature=1.0, best_of=5, fp16=False if device == torch.device("cpu") else True, + sample_len=150) + result = whisper.decode(model, mel, options) + + # print the recognized text + print(result.text) + + text_pr = result.text + if text_pr.strip(" ")[-1] not in "?!.,。,?!。、": + text_pr += "." + return lang, text_pr + + +def make_npz_prompt(name, uploaded_audio, recorded_audio, transcript_content): + global model, text_collater, text_tokenizer, audio_tokenizer + clear_prompts() + audio_prompt = uploaded_audio if uploaded_audio is not None else recorded_audio + sr, wav_pr = audio_prompt + if not isinstance(wav_pr, torch.FloatTensor): + wav_pr = torch.FloatTensor(wav_pr) + if wav_pr.abs().max() > 1: + wav_pr /= wav_pr.abs().max() + if wav_pr.size(-1) == 2: + wav_pr = wav_pr[:, 0] + if wav_pr.ndim == 1: + wav_pr = wav_pr.unsqueeze(0) + assert wav_pr.ndim and wav_pr.size(0) == 1 + + if transcript_content == "": + text_pr, lang_pr = make_prompt(name, wav_pr, sr, save=False) + else: + lang_pr = langid.classify(str(transcript_content))[0] + lang_token = lang2token[lang_pr] + text_pr = f"{lang_token}{str(transcript_content)}{lang_token}" + # tokenize audio + encoded_frames = tokenize_audio(audio_tokenizer, (wav_pr, sr)) + audio_tokens = encoded_frames[0][0].transpose(2, 1).cpu().numpy() + + # tokenize text + phonemes, _ = text_tokenizer.tokenize(text=f"{text_pr}".strip()) + text_tokens, enroll_x_lens = text_collater( + [ + phonemes + ] + ) + + message = f"Detected language: {lang_pr}\n Detected text {text_pr}\n" + + # save as npz file + np.savez(os.path.join(tempfile.gettempdir(), f"{name}.npz"), + audio_tokens=audio_tokens, text_tokens=text_tokens, lang_code=lang2code[lang_pr]) + return message, os.path.join(tempfile.gettempdir(), f"{name}.npz") + + +def make_prompt(name, wav, sr, save=True): + global whisper_model + whisper_model.to(device) + if not isinstance(wav, torch.FloatTensor): + wav = torch.tensor(wav) + if wav.abs().max() > 1: + wav /= wav.abs().max() + if wav.size(-1) == 2: + wav = wav.mean(-1, keepdim=False) + if wav.ndim == 1: + wav = wav.unsqueeze(0) + assert wav.ndim and wav.size(0) == 1 + torchaudio.save(f"./prompts/{name}.wav", wav, sr) + lang, text = transcribe_one(whisper_model, f"./prompts/{name}.wav") + lang_token = lang2token[lang] + text = lang_token + text + lang_token + with open(f"./prompts/{name}.txt", 'w', encoding='utf-8') as f: + f.write(text) + if not save: + os.remove(f"./prompts/{name}.wav") + os.remove(f"./prompts/{name}.txt") + + whisper_model.cpu() + torch.cuda.empty_cache() + return text, lang + + +from utils.sentence_cutter import split_text_into_sentences + + +@torch.no_grad() +def infer_long_text(text, preset_prompt, prompt=None, language='auto', accent='no-accent'): + """ + For long audio generation, two modes are available. + fixed-prompt: This mode will keep using the same prompt the user has provided, and generate audio sentence by sentence. + sliding-window: This mode will use the last sentence as the prompt for the next sentence, but has some concern on speaker maintenance. + """ + mode = 'fixed-prompt' + global model, audio_tokenizer, text_tokenizer, text_collater + model.to(device) + if (prompt is None or prompt == "") and preset_prompt == "": + mode = 'sliding-window' # If no prompt is given, use sliding-window mode + sentences = split_text_into_sentences(text) + # detect language + if language == "auto-detect": + language = langid.classify(text)[0] + else: + language = token2lang[langdropdown2token[language]] + + # if initial prompt is given, encode it + if prompt is not None and prompt != "": + # load prompt + prompt_data = np.load(prompt.name) + audio_prompts = prompt_data['audio_tokens'] + text_prompts = prompt_data['text_tokens'] + lang_pr = prompt_data['lang_code'] + lang_pr = code2lang[int(lang_pr)] + + # numpy to tensor + audio_prompts = torch.tensor(audio_prompts).type(torch.int32).to(device) + text_prompts = torch.tensor(text_prompts).type(torch.int32) + elif preset_prompt is not None and preset_prompt != "": + prompt_data = np.load(os.path.join("./presets/", f"{preset_prompt}.npz")) + audio_prompts = prompt_data['audio_tokens'] + text_prompts = prompt_data['text_tokens'] + lang_pr = prompt_data['lang_code'] + lang_pr = code2lang[int(lang_pr)] + + # numpy to tensor + audio_prompts = torch.tensor(audio_prompts).type(torch.int32).to(device) + text_prompts = torch.tensor(text_prompts).type(torch.int32) + else: + audio_prompts = torch.zeros([1, 0, NUM_QUANTIZERS]).type(torch.int32).to(device) + text_prompts = torch.zeros([1, 0]).type(torch.int32) + lang_pr = language if language != 'mix' else 'en' + if mode == 'fixed-prompt': + complete_tokens = torch.zeros([1, NUM_QUANTIZERS, 0]).type(torch.LongTensor).to(device) + for text in sentences: + text = text.replace("\n", "").strip(" ") + if text == "": + continue + lang_token = lang2token[language] + lang = token2lang[lang_token] + text = lang_token + text + lang_token + + enroll_x_lens = text_prompts.shape[-1] + logging.info(f"synthesize text: {text}") + phone_tokens, langs = text_tokenizer.tokenize(text=f"_{text}".strip()) + text_tokens, text_tokens_lens = text_collater( + [ + phone_tokens + ] + ) + text_tokens = torch.cat([text_prompts, text_tokens], dim=-1) + text_tokens_lens += enroll_x_lens + # accent control + lang = lang if accent == "no-accent" else token2lang[langdropdown2token[accent]] + encoded_frames = inference_encoded_frames(text_tokens, text_tokens_lens, audio_prompts, enroll_x_lens, + lang_pr, langs, accent, lang) + complete_tokens = torch.cat([complete_tokens, encoded_frames.transpose(2, 1)], dim=-1) + # Decode with Vocos + frames = complete_tokens.permute(1, 0, 2) + features = vocos.codes_to_features(frames) + samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device)) + + model.to('cpu') + message = f"Cut into {len(sentences)} sentences" + return message, (24000, samples.squeeze(0).cpu().numpy()) + elif mode == "sliding-window": + complete_tokens = torch.zeros([1, NUM_QUANTIZERS, 0]).type(torch.LongTensor).to(device) + original_audio_prompts = audio_prompts + original_text_prompts = text_prompts + for text in sentences: + text = text.replace("\n", "").strip(" ") + if text == "": + continue + lang_token = lang2token[language] + lang = token2lang[lang_token] + text = lang_token + text + lang_token + + enroll_x_lens = text_prompts.shape[-1] + logging.info(f"synthesize text: {text}") + phone_tokens, langs = text_tokenizer.tokenize(text=f"_{text}".strip()) + text_tokens, text_tokens_lens = text_collater( + [ + phone_tokens + ] + ) + text_tokens = torch.cat([text_prompts, text_tokens], dim=-1) + text_tokens_lens += enroll_x_lens + # accent control + lang = lang if accent == "no-accent" else token2lang[langdropdown2token[accent]] + encoded_frames = inference_encoded_frames(text_tokens, text_tokens_lens, audio_prompts, enroll_x_lens, + lang_pr, langs, accent, lang) + complete_tokens = torch.cat([complete_tokens, encoded_frames.transpose(2, 1)], dim=-1) + if torch.rand(1) < 1.0: + audio_prompts = encoded_frames[:, :, -NUM_QUANTIZERS:] + text_prompts = text_tokens[:, enroll_x_lens:] + else: + audio_prompts = original_audio_prompts + text_prompts = original_text_prompts + # Decode with Vocos + frames = complete_tokens.permute(1, 0, 2) + features = vocos.codes_to_features(frames) + samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device)) + + model.to('cpu') + return 24000, samples.squeeze(0).cpu().numpy() + else: + raise ValueError(f"No such mode {mode}") + + +def main(): + app = gr.Blocks(title="TTS and Voice Clone") + with app: + with gr.Tab("Text to Speech"): + with gr.Row(): + with gr.Column(): + textbox_4 = gr.TextArea(label="Text", + placeholder="Type your sentence here", + value=long_text_example, elem_id=f"tts-input") + language_dropdown_4 = gr.Dropdown(choices=language_options, + value='auto-detect', + label='language') + accent_dropdown_4 = gr.Dropdown(choices=language_options, + value='no-accent', + label='accent') + + with gr.Column(): + preset_dropdown_4 = gr.Dropdown(choices=preset_list, value=None, label='Voice preset') + prompt_file_4 = gr.File(file_count='single', file_types=['.npz'], interactive=True) + audio_output_4 = gr.Audio(label="Output Audio", elem_id="tts-audio") + btn_4 = gr.Button("Generate!") + btn_4.click(infer_long_text, + inputs=[textbox_4, preset_dropdown_4, prompt_file_4, language_dropdown_4, + accent_dropdown_4], + outputs=[audio_output_4]) + with gr.Tab("Make prompt for voice clone"): + with gr.Row(): + with gr.Column(): + textbox2 = gr.TextArea(label="Prompt name", + placeholder="Name your prompt here", + value="prompt_1", elem_id=f"prompt-name") + textbox_transcript2 = gr.TextArea(label="Transcript", + placeholder="Write transcript here. (leave empty to use whisper)", + value="", elem_id=f"prompt-name") + upload_audio_prompt_2 = gr.Audio(label='uploaded audio prompt', source='upload', interactive=True) + record_audio_prompt_2 = gr.Audio(label='recorded audio prompt', source='microphone', + interactive=True) + with gr.Column(): + text_output_2 = gr.Textbox(label="Message") + prompt_output_2 = gr.File(interactive=False) + btn_2 = gr.Button("Make!") + btn_2.click(make_npz_prompt, + inputs=[textbox2, upload_audio_prompt_2, record_audio_prompt_2, textbox_transcript2], + outputs=[text_output_2, prompt_output_2]) + + webbrowser.open("http://127.0.0.1:7860") + app.launch() + + +if __name__ == "__main__": + formatter = ( + "%(asctime)s %(levelname)s [%(filename)s:%(lineno)d] %(message)s" + ) + logging.basicConfig(format=formatter, level=logging.INFO) + main() diff --git a/macros.py b/macros.py new file mode 100644 index 0000000000000000000000000000000000000000..ae0c6fb7da60b11230fb7e08ef696f148a457ad0 --- /dev/null +++ b/macros.py @@ -0,0 +1,51 @@ +NUM_LAYERS = 12 +NUM_HEAD = 16 +N_DIM = 1024 +PREFIX_MODE = 1 +NUM_QUANTIZERS = 8 +SAMPLE_RATE = 24000 + +lang2token = { + 'zh': "[ZH]", + 'ja': "[JA]", + "en": "[EN]", + "vi": "[VI]", + 'mix': "", +} + +lang2code = { + 'zh': 0, + 'ja': 1, + "en": 2, + "vi": 3 +} + +token2lang = { + '[ZH]': "zh", + '[JA]': "ja", + "[EN]": "en", + "[VI]": "vi", + "": "mix" +} + +code2lang = { + 0: 'zh', + 1: 'ja', + 2: "en", + 3: "vi", +} + +vi_code = 'vi' +zh_code = 'zh' +en_code = 'en' +ja_code = 'ja' + +langdropdown2token = { + 'English': "[EN]", + 'Chinese': "[ZH]", + 'Japanese': "[JA]", + 'Vietnamese': "[VI]", + 'Mix': "", +} + +language_options = ['no-accent', 'English', 'Chinese', 'Japanese', 'Vietnamese'] \ No newline at end of file diff --git a/makedata.ipynb b/makedata.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..db20e98354a9ef5dd46e2141968e604e7531f0f8 --- /dev/null +++ b/makedata.ipynb @@ -0,0 +1,14853 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "ca65945f", + "metadata": {}, + "outputs": [], + "source": [ + "import h5py\n", + "import glob\n", + "import torch\n", + "import os\n", + "import torchaudio\n", + "import shutil\n", + "import numpy as np\n", + "import soundfile as sf\n", + "from utils.g2p import PhonemeBpeTokenizer\n", + "from utils.prompt_making import make_transcript\n", + "from data.collation import get_text_token_collater\n", + "from tqdm.notebook import tqdm" + ] + }, + { + "cell_type": "markdown", + "id": "bd9ed5bc", + "metadata": {}, + "source": [ + "```\n", + "MyTTSDataset/train\n", + "├── bpe_69.json\n", + "├── wav1\n", + " └── 1-1.wav\n", + " └── 1-2.wav\n", + " └── audio_ann_sum.txt\n", + " └── audio_sum.hdf5\n", + "├── wav2\n", + " └── 2-1.wav\n", + " └── 2-2.wav\n", + " └── audio_ann_sum.txt\n", + " └── audio_sum.hdf5\n", + "......\n", + "└── wav{n}\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "bebe0dab", + "metadata": {}, + "outputs": [], + "source": [ + "# WAV長度處理\n", + "def load_trim_and_save_audio(input_file_path, output_file_path, max_length=15.0):\n", + " waveform, sample_rate = torchaudio.load(input_file_path)\n", + " \n", + " # Calculate the number of samples that correspond to max_length seconds\n", + " max_samples = int(max_length * sample_rate)\n", + " \n", + " # Get the total number of samples in the audio file\n", + " num_samples = waveform.size(-1)\n", + " \n", + " if num_samples > max_samples:\n", + " # If the audio is longer than max_length seconds, trim it\n", + " waveform = waveform[:, :max_samples]\n", + " # Save the waveform back to a file\n", + " torchaudio.save(output_file_path, waveform, sample_rate)\n", + "\n", + "wav_files = glob('MyTTSDataset/train/*wav')\n", + "for wav_file in tqdm(wav_files):\n", + " load_trim_and_save_audio(wav_file,wav_file)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "id": "2d71f66b", + "metadata": {}, + "outputs": [], + "source": [ + "# Mappings from symbol to numeric ID and vice versa:\n", + "from data.tokenizer import (\n", + " AudioTokenizer,\n", + " tokenize_audio,\n", + ")\n", + "\n", + "tokenizer_path = \"./utils/g2p/bpe_69.json\"\n", + "tokenizer = PhonemeBpeTokenizer(tokenizer_path)\n", + "device = 'cuda' if torch.cuda.is_available() else 'cpu'\n", + "\n", + "def make_prompts(name, audio_prompt_path, transcript=None):\n", + " text_tokenizer = PhonemeBpeTokenizer(tokenizer_path=\"./utils/g2p/bpe_69.json\")\n", + " text_collater = get_text_token_collater()\n", + " codec = AudioTokenizer(device)\n", + " wav_pr, sr = torchaudio.load(audio_prompt_path)\n", + " # check length\n", + " if wav_pr.size(-1) / sr > 15:\n", + " raise ValueError(f\"Prompt too long, expect length below 15 seconds, got {wav_pr / sr} seconds.\")\n", + " if wav_pr.size(0) == 2:\n", + " wav_pr = wav_pr.mean(0, keepdim=True)\n", + " text_pr, lang_pr = make_transcript(name, wav_pr, sr, transcript)\n", + "\n", + " # tokenize audio\n", + " encoded_frames = tokenize_audio(codec, (wav_pr, sr))\n", + " audio_tokens = encoded_frames[0][0].transpose(2, 1).cpu().numpy()\n", + "\n", + " # tokenize text\n", + " phonemes, langs = text_tokenizer.tokenize(text=f\"{text_pr}\".strip())\n", + " text_tokens, enroll_x_lens = text_collater(\n", + " [\n", + " phonemes\n", + " ]\n", + " )\n", + "\n", + " return audio_tokens, text_tokens, langs, text_pr\n", + " \n", + "def create_dataset(data_dir, dataloader_process_only):\n", + " if dataloader_process_only:\n", + " h5_output_path=f\"{data_dir}/audio_sum.hdf5\"\n", + " ann_output_path=f\"{data_dir}/audio_ann_sum.txt\"\n", + " #audio_folder = os.path.join(data_dir, 'audio')\n", + " audio_paths = glob.glob(f\"{data_dir}/*.wav\") # Change this to match your audio file extension\n", + "\n", + " # Create or open an HDF5 file\n", + " with h5py.File(h5_output_path, 'w') as h5_file:\n", + " # Loop through each audio and text file, assuming they have the same stem\n", + " for audio_path in audio_paths:\n", + " try:\n", + " stem = os.path.splitext(os.path.basename(audio_path))[0]\n", + " audio_tokens, text_tokens, langs, text = make_prompts(data_dir=data_dir, name=stem, audio_prompt_path=audio_path)\n", + " \n", + " text_tokens = text_tokens.squeeze(0)\n", + " # Create a group for each stem\n", + " grp = h5_file.create_group(stem)\n", + " # Add audio and text tokens as datasets to the group\n", + " grp.create_dataset('audio', data=audio_tokens)\n", + " #grp.create_dataset('text', data=text_tokens)\n", + " \n", + " with open(ann_output_path, 'a', encoding='utf-8') as ann_file:\n", + " audio, sample_rate = sf.read(audio_path)\n", + " duration = len(audio) / sample_rate\n", + " ann_file.write(f'{stem}|{duration}|{langs[0]}|{text}\\n') # 改行を追加\n", + " except Exception as e:\n", + " print(f\"An error occurred: {e}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "1e9d879f", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ">>>> 08-13\n", + "Detected language: zh\n", + "跟大陸文革的結束都開始了一個新的從新去反省以及去醒示近代文學的一個階段\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Building prefix dict from the default dictionary ...\n", + "DEBUG:jieba:Building prefix dict from the default dictionary ...\n", + "Loading model from cache C:\\Users\\BBS\\AppData\\Local\\Temp\\jieba.cache\n", + "DEBUG:jieba:Loading model from cache C:\\Users\\BBS\\AppData\\Local\\Temp\\jieba.cache\n", + "Loading model cost 0.364 seconds.\n", + "DEBUG:jieba:Loading model cost 0.364 seconds.\n", + "Prefix dict has been built successfully.\n", + "DEBUG:jieba:Prefix dict has been built successfully.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Detected language: zh\n", + "因為張二林後來也很自然在他非常小的時候一方面讀古典文學\n", + "Detected language: zh\n", + "一方面她的英文極好她等於是西方的英語教育裡面出來的人\n", + "Detected language: zh\n", + "所以我想 我們就看他住在上海 這種租界的區域當中他受到的影響\n", + "Detected language: zh\n", + "是非常複雜的華洋雜處的一種文學影響\n", + "Detected language: zh\n", + "展露了这个才能之后她就投稿到报纸上去参加征文比赛\n", + "Detected language: zh\n", + "得到名次 得到獎金我們看到他曾經講一個很有趣的故事\n", + "Detected language: zh\n", + "他的母親說你寫作得獎了那你要不要去買一些世界文學明珠\n", + "Detected language: zh\n", + "表示你將來是要走作家這條路他說他沒有照他母親的話去做他偷偷跑出去\n", + "Detected language: zh\n", + "就去買了一支當時名牌的口紅我想這個世界裡面非常明顯透露出\n", + "Detected language: zh\n", + "張二林覺得女性的曖昧好像是一種本能他也覺得他喜歡寫作是一回事\n", + "Detected language: zh\n", + "所以我们都知道,在台湾曾经非常非常流行发生了非常大影响力的张爱玲的小说\n", + "Detected language: zh\n", + "可是還有一些東西可能比寫作更重要是要它要活出它生活裡的意思\n", + "Detected language: zh\n", + "一個獨特的風格所以我們在讀張愛玲的文學的時候我們會感覺到她真正關心的人\n", + "Detected language: zh\n", + "其实并不是文化里的人而是一些城市边缘\n", + "Detected language: zh\n", + "小資產階級對於自己的生活有著小小的愛恨的一些女性\n", + "Detected language: zh\n", + "我自己特別喜歡他在《請場之戀》裡面寫到的很多的女性\n", + "Detected language: zh\n", + "常常寫到他們怎麼去談戀愛,怎麼相親。然後怎麼樣去\n", + "Detected language: zh\n", + "緊張地面對自己接下來生命裡要面對的一個男人因為\n", + "Detected language: zh\n", + "因為這個相親不是一個普通的社交活動因為這個相親裡包含了他這一輩子\n", + "Detected language: zh\n", + "將來是幸福還是不幸福的一個過程所以在這種半開放的社會\n", + "Detected language: zh\n", + "我說半開放已經有了自由戀愛了可是上海當時\n", + "Detected language: zh\n", + "在80年代以後也在中國大陸發生了極大的影響有很多的作家\n", + "Detected language: zh\n", + "又常常讓你覺得很多的女性的婚姻還是操縱在父親母親手中\n", + "Detected language: zh\n", + "所以你會感覺到這個相親在張愛玲的小說裡常常出現\n", + "Detected language: zh\n", + "而女孩子在那時刻裡的某一種有點扮偽裝因為也不太希望讓男性\n", + "Detected language: zh\n", + "看到她自己內心的真正的世界然後在他的整個的文學世界當中\n", + "Detected language: zh\n", + "他開始透露出一些女性的小小的鬼柵小小的雞頸\n", + "Detected language: zh\n", + "這種小小的虛偽的一些心事因為他們希望擄獲男人的心\n", + "Detected language: zh\n", + "他們也希望能夠嫁到比較好的男人家裡去希望變成一個比較好的\n", + "Detected language: zh\n", + "一個有保障的婚姻幸福生活的女性這些題材大概只有張艾伶\n", + "Detected language: zh\n", + "這樣的一個女性作家作了第一次的書寫因為我們特別強調在她之前\n", + "Detected language: zh\n", + "白話文學裡不管謝彬新或者是蕭洪或者丁琳\n", + "Detected language: zh\n", + "特别是女性的作家那么跟台湾的情况是非常类似的\n", + "Detected language: zh\n", + "其實因為他們是左派文學他們並不屑於去描寫女性的\n", + "Detected language: zh\n", + "這個小小的卑微的心事可是張艾琳不一樣張艾琳住在上海\n", + "Detected language: zh\n", + "他的小說是登在報紙上的他的小說是登在雜誌上的他的小說\n", + "Detected language: zh\n", + "是被大眾購買的所以他發展出了最早的所謂通俗暢銷小說的\n", + "Detected language: zh\n", + "這條路他也曾經說作為一個現代的作家他很慶幸\n", + "Detected language: zh\n", + "他是沒有老闆的那他的老闆是誰他的老闆就是消費者\n", + "Detected language: zh\n", + "美國買他的小說的人就是他的老闆可是這個老闆是個很抽象的老闆所以他很高興\n", + "Detected language: zh\n", + "希望她的小說能夠在上海流行 暢銷 賣得出去她可以靠稿費過日子\n", + "Detected language: zh\n", + "我想這樣的一個作家的型態就跟我們前面提到的歷來\n", + "Detected language: zh\n", + "中國文學史上的作家甚至五四運動的男性作家都有一點點不同\n", + "Detected language: zh\n", + "所以我們在今天以張愛玲作爲中國近代文學裏面.一個重要的標誌\n", + "Detected language: zh\n", + "它不只是一个女性,它是一个生活在城市里的女性。它是一个独立的女性。\n", + "Detected language: zh\n", + "張艾玲雖然有過兩次的婚姻可基本上我們一直感覺到張艾玲的世界裡面\n", + "Detected language: zh\n", + "是一個比較獨立不那麼依靠男人生活的一種狀況\n", + "Detected language: zh\n", + "也有很多她的反省跟思考就是,現在的女性真的要擺脫男性嗎?\n", + "Detected language: zh\n", + "現代的女性真的要成為一個自己靠自己的勞力、經濟獨立的女性嗎?\n", + "Detected language: zh\n", + "我們在他的小說裡會看到許許多多這樣的一個心情的女性的描繪\n", + "Detected language: zh\n", + "看到她的得意跟她的感傷可能是一種兩難吧\n", + "Detected language: zh\n", + "所以我們會特別希望把張愛玲定位在現代的城市作家\n", + "Detected language: zh\n", + "現在的女性作家她也從來不避諱她的流行 暢銷\n", + "Detected language: zh\n", + "高 根 通俗\n", + "Detected language: zh\n", + "可能可以談一些有趣的文學史上的事張愛麟,他的流行\n", + "Detected language: zh\n", + "想起它小說裡的片段它在《請誠之戀》這一篇小說裡\n", + "Detected language: zh\n", + "非常感人的一面我們看到他的男主角跟女主角\n", + "Detected language: zh\n", + "是在戰亂里相逢的我們也意識到張愛玲的背景\n", + "Detected language: zh\n", + "是一個繁華的十里羊場的大上海這個大上海看起來繁華\n", + "Detected language: zh\n", + "可是卻在一個非常不穩定的狀態由於從清朝末年開始\n", + "Detected language: zh\n", + "上海就一直是一個戰亂當中 大家逃亡的地方\n", + "Detected language: zh\n", + "許多人在戰爭當中為了避難就會躲到上海因為上海有很多的\n", + "Detected language: zh\n", + "日本租界上海租界英國租界那麼我們就會看到這些租界區\n", + "Detected language: zh\n", + "變成了上海的一種非常特異的現象我想一直到今天許多朋友到上海\n", + "Detected language: zh\n", + "還會感覺到上海在1920前後的所有的建築像和平飯店\n", + "Detected language: zh\n", + "他的暢銷他的影響力要從甚麼角度切入我想是大家非常關心的\n", + "Detected language: zh\n", + "這一類的建築大概在當時都是領先全世界的就是在當時\n", + "Detected language: zh\n", + "就是已經蓋出這樣高的摩天樓然後在整個的外灘就是依靠著\n", + "Detected language: zh\n", + "黃埔江出海口的海灘的這個部分蓋起了所有的\n", + "Detected language: zh\n", + "外商的銀行那麼這些部分使得上海好像又是中國又不像一個中國\n", + "Detected language: zh\n", + "所以我們特別強調這種華洋雜處的一種處境使得上海變成了中國\n", + "Detected language: zh\n", + "我第一个西化的城市那么当时它有很多的外国电影在这边演出\n", + "Detected language: zh\n", + "有很多外国的游乐场有很多外国的这种投资的事业在这里\n", + "Detected language: zh\n", + "所以一般人叫做10里洋厂这个洋厂指的是外国的投资贸易\n", + "Detected language: zh\n", + "帶動的一種繁榮所以很多朋友到今天到上海的外灘走一走\n", + "Detected language: zh\n", + "還會依稀的感覺到張愛玲的小說是以這個東西作為他的大反華的背景\n", + "Detected language: zh\n", + "第一個我想大家了解到中國的文學史我們從詩經 楚詞 一路談下來\n", + "Detected language: zh\n", + "可是我們又隱約感覺到張愛玲在書寫文學的時候大概在1940年代\n", + "Detected language: zh\n", + "其实大家知道1949年当共产党得到政权之后\n", + "Detected language: zh\n", + "執政之後 其實上海的繁華就結束了所以我們總覺得張艾玲的小說像侵澄\n", + "Detected language: zh\n", + "城之链里面,它讲到寝城大家知道这是运用中国古典文学里的 一个典故\n", + "Detected language: zh\n", + "請誠請國那麼中國一直相信一個女孩子沒到最後會為她請誠\n", + "Detected language: zh\n", + "為他請國就是為他亡國的所以張愛玲在小說裡常常覺得一種繁華\n", + "Detected language: zh\n", + "一種美,可是非常的短占好像你抓都抓不住所以當他的男主角\n", + "Detected language: zh\n", + "跟女主角在躲警報的時候大家不要忘記這個時候上海雖然是一個繁華的城市\n", + "Detected language: zh\n", + "可是日本常常在轟炸上海\n", + "Detected language: zh\n", + "日本占领了上海有人称它为孤岛文学的时期就说整个上海\n", + "Detected language: zh\n", + "我们会发现非常非常少女性作家的作品也许在古典的部分里面\n", + "Detected language: zh\n", + "被日本佔領的狀態在這樣的一個狀態裡面張阿林也感覺到\n", + "Detected language: zh\n", + "什麼叫做美什麼叫做愛我們覺得愛情是這麼偉大一個事情\n", + "Detected language: zh\n", + "可是愛情往往因為一個戰亂一下子兩個人就不見了或者因為\n", + "Detected language: zh\n", + "戰亂這兩個人才見面or張愛玲的《請誠之戀》這個小說裡寫出了\n", + "Detected language: zh\n", + "很多很多的偶然所謂的偶然是說我們從來沒有想到因為一個戰亂\n", + "Detected language: zh\n", + "這兩個人才相見了有時候我們想到父母那一代我的父親是福建人\n", + "Detected language: zh\n", + "我的母親是陝西人你會發現說如果不是戰爭他們根本不可能會見面\n", + "Detected language: zh\n", + "因為他們就會各自在自己的省份相隔這麼遠千里萬里他們怎麼可能會見面\n", + "Detected language: zh\n", + "可是因為戰爭 常常偶然地會把兩個人送到一起所以《傾城之戀》裡面\n", + "Detected language: zh\n", + "在講一個偉大的愛情而這個愛情的背後是一個巨大的戰亂好像詹愛玲寫到說\n", + "Detected language: zh\n", + "我們談過一位送戴的李清照幾乎是女性作家群裡的鳳毛麟角\n", + "Detected language: zh\n", + "這個男子擁抱著這個女子說好像整個的天空的戰火\n", + "Detected language: zh\n", + "都是為了我們在放煙火的這個時候裡面有一種美跟感傷的\n", + "Detected language: zh\n", + "非常複雜的混合也會感覺到好像因為這個戰亂他們也必須\n", + "Detected language: zh\n", + "短暫的相處以後就要分離我們也看到張愛玲自己的情感\n", + "Detected language: zh\n", + "她第一次的婚姻 跟湖南城的婚姻湖南城当时是汪精卫政府里面\n", + "Detected language: zh\n", + "一個宣傳部部長那我們可以看到在整個中日戰爭如火如荼的\n", + "Detected language: zh\n", + "這個風煙之間張愛齡是在這樣的戰亂的背景裡最後嫁給了胡蘭城\n", + "Detected language: zh\n", + "而胡蘭成在都在戰亂裡面婚姻的一種不爭他跟其他女人都靠不來\n", + "Detected language: zh\n", + "張愛玲會通過整個封鎖線通過中國跟日本軍隊的\n", + "Detected language: zh\n", + "層層的封鎖到整個的後方去尋找湖南城\n", + "Detected language: zh\n", + "現在遊戲開始已行30秒希望PEAKYLV快點訂製相信了\n", + "Detected language: zh\n", + "我的意思是說我們看到一部中國文學史裡白度斧 白句譯詮釋男人的天下\n", + "Detected language: zh\n", + "你這女性的愛情的強烈 熱烈感動了很多的人你也感覺到等他到現場\n", + "Detected language: zh\n", + "頰後要去尋找好像萬里尋夫的一個熱烈的古典愛情故事到了現場\n", + "Detected language: zh\n", + "她發現她的丈夫是跟別的女人在一起那種幻滅跟感傷所以張愛玲是女性作家\n", + "Detected language: zh\n", + "裡面非常少有的一個特例我覺得女性作家很容易感情用事\n", + "Detected language: zh\n", + "或者有人用比較批評的語言來說女性的作家很容易濫情\n", + "Detected language: zh\n", + "就是很容易感受可是 train scream還是我們在讀張愛玲小說最驚訝的是張愛玲是一個\n", + "Detected language: zh\n", + "非常冷酷的女作家他不讓自己女性的那種自憐\n", + "Detected language: zh\n", + "流露出來她常常在寫一種女性的悲哀而那個女性的悲哀裏面有一種\n", + "Detected language: zh\n", + "頑強的堅忍或者忍受那種孤獨\n", + "Detected language: zh\n", + "在上海的一個公寓的閣樓上晚上聽到最後一班的\n", + "Detected language: zh\n", + "可是女性的創作空間、女性的創作才能為什麼沒有被發展起來?\n", + "Detected language: zh\n", + "夜晚的電車響著噹噹噹的車聲走過他在講一種\n", + "Detected language: zh\n", + "講一種孤獨講到一個女性靠著自己的\n", + "Detected language: zh\n", + "工作 獨立養活自己而內心的某一種悲哀\n", + "Detected language: zh\n", + "在散文裡面說上海出現了最早的一種靠著自己能力\n", + "Detected language: zh\n", + "獨立的女性就是今天講的所謂的女性上班族\n", + "Detected language: zh\n", + "不知道大家有沒有發現我們今天在讀章案林小說的感動是因為我們的社會裡\n", + "Detected language: zh\n", + "也有很多女性的上班族這些女性的上班族因為有很好的學歷\n", + "Detected language: zh\n", + "很好的能力所以他們自己養活自己然後不知道大家有沒有發現我們的周邊\n", + "Detected language: zh\n", + "出现了很多女性不结婚的个案过去传统的社会在农业的社会女性很少\n", + "Detected language: zh\n", + "老到某一個年齡不結婚的因為它必須靠結婚\n", + "Detected language: zh\n", + "這是我們一直關切的一個問題所以過去在介紹李清釗的時候\n", + "Detected language: zh\n", + "來做為她養活她自己生活的另一種選擇可是現代的女性\n", + "Detected language: zh\n", + "可以不選擇這條路現在的女性可以依靠自己的薪水來養活自己\n", + "Detected language: zh\n", + "所以她為什麼要結婚或者她結了婚以後她也很容易就離婚\n", + "Detected language: zh\n", + "因為他覺得我自己養活自己我根本不要忍受這些麻煩\n", + "Detected language: zh\n", + "不是一個他覺得滿意的丈夫他就離開了我們可以說現代城市裡\n", + "Detected language: zh\n", + "最大的特征是出現了很多獨自生活的單身女性張愛玲是第一個寫出\n", + "Detected language: zh\n", + "單身女性的快樂跟不快樂的女作家她寫到一個散文給我非常大的感觸\n", + "Detected language: zh\n", + "他說他有個朋友 他們都是學英文的所以在藏海當時很容易找到工作\n", + "Detected language: zh\n", + "那麽每天上班下了班以後回到家裏很得意跟她說你看我的房子是我自己買的\n", + "Detected language: zh\n", + "我分期貸款然後我的家具是我自己買的我每天做菜我自己做給我自己吃\n", + "Detected language: zh\n", + "我們曾經特別提到 由於特殊的環境李靖趙的父親對他的重視\n", + "Detected language: zh\n", + "他在講他所有的獨立 炫耀他獨立的時候張愛玲說 他忽然感覺到 那個語言\n", + "Detected language: zh\n", + "驕傲的背後裡面的一種心酸那個心酸說他會忽然覺得他這個女性的朋友\n", + "Detected language: zh\n", + "其實多麼渴望有一個可以安慰她可以在夜晚的時候可以安慰她\n", + "Detected language: zh\n", + "捕摸她 擁抱她的男性所以我觉得张愛玲这个心事可能是张诶玲小说\n", + "Detected language: zh\n", + "會在所有的城市裡流行的原因我們不要忘記在50年代\n", + "Detected language: zh\n", + "在60年代以後台灣的社會出來很多單身的女性模仿張艾琳的小說的女作家\n", + "Detected language: zh\n", + "也在台灣大行其道因為張愛玲是有她書寫的某一個廣泛的讀者群的\n", + "Detected language: zh\n", + "如果你是一個喜歡張愛玲小說的讀者如果你是身邊的讀者\n", + "Detected language: zh\n", + "今天有很多喜欢章二龄小说的读者你不妨观察一下他们是不是这一类现代人\n", + "Detected language: zh\n", + "就在肚子里的单身女性\n", + "Detected language: zh\n", + "李青照結婚以後他的丈夫趙明成對他的欣賞 才完成了一位女性作家\n", + "Detected language: zh\n", + "最後提到張艾琳這位大家很熟悉的作家\n", + "Detected language: zh\n", + "不管是男性的讀者或女性的讀者其實我覺得張艾琳都是去瞭解\n", + "Detected language: zh\n", + "给现代城市里面两性关系非常好的一位作家因为中国从五四运动以后\n", + "Detected language: zh\n", + "很多所謂的左右文學可以說是鎖義和老迅和我們提到的大陸裏面的美學但是我們比較多的人包括當我們不知道我們就是很留意我們\n", + "Detected language: zh\n", + "丁玲、肖宏这些女作家由于给予文学一个太大的使命感\n", + "Detected language: zh\n", + "所以你會感覺到他們的小說裡很少寫到一般的城市裡冕市民的生活\n", + "Detected language: zh\n", + "那這一點,我們不得不承認詹艾林是寫城市寫城市里面\n", + "Detected language: zh\n", + "裡面小市民的最好的作家文學不一定要寫偉大的主題革命啊\n", + "Detected language: zh\n", + "戰爭啊人性的價值啊當然可以寫成非常好的文學可是我們會覺得\n", + "Detected language: zh\n", + "今天大部分生活在都市裡的人每天八個小時上班打卡\n", + "Detected language: zh\n", + "作家的出現可是在李清照之後我們看到長達八九百年當中\n", + "Detected language: zh\n", + "用分期付款來付房貸然後買一部車子\n", + "Detected language: zh\n", + "周末跟自己心愛的人去吃一頓比較好的西餐我覺得障礙力的世界\n", + "Detected language: zh\n", + "也是这样的世界他总是让我们感觉到这些人有这些人的快乐也有这些人的心酸\n", + "Detected language: zh\n", + "因為上海是第一個中國的現代化城市所以很自然張愛玲寫出\n", + "Detected language: zh\n", + "這些人的時候讓我們今天有一種親切感因為我們會發現今天我們不管\n", + "Detected language: zh\n", + "居住在台北紐約東京高雄其實我們是差不多的\n", + "Detected language: zh\n", + "城市的文化里面出现了一种上班族这些上班族对他的生活\n", + "Detected language: zh\n", + "有時候不一定能夠有多麽偉大的理想我們記得小時候寫作文寫我的志願\n", + "Detected language: zh\n", + "那個志願都是非常偉大的什麼要到邊疆去開荒啊\n", + "Detected language: zh\n", + "什麼資料或者當時我記得我們很多的女同學們他的志願\n", + "Detected language: zh\n", + "元代明朝清朝也並沒有非常重要的女性作家出現\n", + "Detected language: zh\n", + "竟然是做護士做什麼白衣天使啊他也不覺得護士只是一個職業\n", + "Detected language: zh\n", + "他覺得他的夢想裡面是一個很偉大的一個主題吧可張愛玲很冷酷的\n", + "Detected language: zh\n", + "把現實裡人的生活拉回到最基本的東西上去我想我一直用冷酷\n", + "Detected language: zh\n", + "這個詞 形容張愛玲就張愛玲的熱情其實是受過傷的她的第一次婚姻\n", + "Detected language: zh\n", + "曾經通過層層的戰爭風火線她命都不要了,去尋找她的丈夫\n", + "Detected language: zh\n", + "而到了那個地方發現她丈夫已經跟別的女人在一起了他當然有一種感傷\n", + "Detected language: zh\n", + "幻滅 而她的熱情受到的那種一盆冷水澆下來的痛苦 也使她\n", + "Detected language: zh\n", + "她後來在看待人生現象的時候她是用冷冷的方法在看不像一般的女作家\n", + "Detected language: zh\n", + "這麼容易大哭大叫她覺得好像應該回來好好的認清\n", + "Detected language: zh\n", + "現實的冷酷所以我們看到他有很多的小說裡寫到這種人跟人的關係\n", + "Detected language: zh\n", + "那麼這一點 我們還是覺得女性在整個社會當中因為她的角色地位\n", + "Detected language: zh\n", + "特別是現代城市生活裏夫妻的關係他覺得也不像表面也看的這麽了解\n", + "Detected language: zh\n", + "美滿跟.. 令人陶醉他會覺得裡面有一種..陌生的...\n", + "Detected language: zh\n", + "有一種隔閡我覺得很少女作家像她這麼大膽地寫道 leur\n", + "Detected language: zh\n", + "有時候我們看到他寫到一個妻子結了婚他覺得丈夫每個晚上對他的\n", + "Detected language: zh\n", + "都是暴力她會躲在浴室不想要出來那我覺得這是很少女作家\n", + "Detected language: zh\n", + "大家敢這樣寫的可是在讀到張喊霖這些小說的時候也會看到一個非常幽微的\n", + "Detected language: zh\n", + "女性的角度跟女性的心事就是丈夫總覺從她的角度\n", + "Detected language: zh\n", + "下了班覺得自己很累那太太好像也就是一個發洩的工具可從來沒有覺得\n", + "Detected language: zh\n", + "性之外 其實有更多的應該是疼愛安慰溫暖或者是\n", + "Detected language: zh\n", + "有時候也許泡杯茶夫妻之間聊聊天聊聊精神上的東西\n", + "Detected language: zh\n", + "受到了很大地壓抑所以並沒有得到施展她的才能的機會\n", + "Detected language: zh\n", + "是很重要的部分可是張愛玲的小說裡常常很冷酷地寫出那個事實\n", + "Detected language: zh\n", + "所以有時候覺得讀障礙靈的小說讓我們會用另外一個角度\n", + "Detected language: zh\n", + "去心疼現代城市裡的某些女性的孤單所以這個女性的孤單\n", + "Detected language: zh\n", + "但不只是我们说经济独立的单身女性的孤独甚至结了婚 有了孩子\n", + "Detected language: zh\n", + "他也可能是孤獨的因為他的內在世界並沒有被真正了解\n", + "Detected language: zh\n", + "所以,可能大家知道,張艾琳最有名的小說就是《金鎖記》後來,她還曾經\n", + "Detected language: zh\n", + "改寫為《怨女》,是同樣題材的小說名字不一樣\n", + "Detected language: zh\n", + "一個叫金鎖記 一個叫怨誉裡面他的主角叫做曹七巧\n", + "Detected language: zh\n", + "這樣子一個在菜市場裏面賣豆腐這樣的一個女孩子長得很漂亮就被人家稱為\n", + "Detected language: zh\n", + "豆腐吸食之類的可是出身很卑微所以有一個大戶人家\n", + "Detected language: zh\n", + "一直到五四運動到30年代我們看到慢慢開始有了\n", + "Detected language: zh\n", + "就為了要讓他的一個殘障的孩子就是低智障的孩子\n", + "Detected language: zh\n", + "能夠傳宗接代就取了這個草棋橋我們就看到張愛玲的小說裡\n", + "Detected language: zh\n", + "常常會覺得最後這個女性的角色其實是不自主的因為不自主她就嫁到了\n", + "Detected language: zh\n", + "這樣的家庭嫁到這樣的家庭以後男人都非常不成財而她丈夫根本是一個\n", + "Detected language: zh\n", + "這個完全不能夠有理智的一個智障每天晚上壓在身上\n", + "Detected language: zh\n", + "其實像,他形容說,好像一個豬肉攤販裡的\n", + "Detected language: zh\n", + "一個死掉的豬然後他這樣子去描寫他丈夫的身體他覺得裡面連體溫都沒有是一個冰涼的\n", + "Detected language: zh\n", + "可是她也因為這樣就懷了孕生下了孩子然後在這個家族裡\n", + "Detected language: zh\n", + "所有人就覺得她只是一個被利用來生孩子的女人她根本沒有地位\n", + "Detected language: zh\n", + "因為他出生非常的卑微因為這個家族是有錢人的家族每個人都欺負他\n", + "Detected language: zh\n", + "到了最後最靜態的部分要總結在一位女性的作家身上\n", + "Detected language: zh\n", + "女性意識的萌芽比如說在50運動之後沒有多久\n", + "Detected language: zh\n", + "那麼最後曹奇巧如何在家庭裏面開始掌控一切然後等到她做婆婆\n", + "Detected language: zh\n", + "他自己借助於他兒子的力量 開始反撲的時候他教會他兒子抽牙片\n", + "Detected language: zh\n", + "因為她覺得她兒子抽壓片就沒有辦法離開她就要被她掌控\n", + "Detected language: zh\n", + "很毒的女人最後的晚年的那種反撲的狀況\n", + "Detected language: zh\n", + "這些都是一般女性作家很少能夠用這麼冷酷的筆調在寫小說\n", + "Detected language: zh\n", + "這裏面卻寫出了女性的悲哀寫出了女性的痛苦\n", + "Detected language: zh\n", + "一直到今天張愛玲還是一個值得重視的女性作家因為她的小說裡的確呈現了\n", + "Detected language: zh\n", + "在現代社會裡面女性角色許多的反省以及甚至提供給男性的\n", + "Detected language: zh\n", + "做反省跟思考為什麼出現了這樣的女性也許我們可以從新\n", + "Detected language: zh\n", + "对于女性的孤独世界做另外一个不同角度的探索了\n", + "Detected language: zh\n", + "有一位女性作家謝冰心就代表了比較女性的一些角色\n", + "Detected language: zh\n", + "把张爱玲提供给大家那么作为我们一个最后对于现代中国\n", + "Detected language: zh\n", + "這個文學的理解的個案吧\n", + "Detected language: zh\n", + "可是我們看到冰心的很多的作品在白話文學裡是比較傾向於\n", + "Detected language: zh\n", + "去 給兒童文學的青少年文學的所以這一點上 我們還是覺得\n", + "Detected language: zh\n", + "是不是女性的空間有一點被局限在家庭\n", + "Detected language: zh\n", + "像夫教子 這個傳統的議題上好像男性的作家可以書寫\n", + "Detected language: zh\n", + "許許多多特異的題材寫戰爭寫情愛甚至寫\n", + "Detected language: zh\n", + "很多的寬敞之間男女的關係可是總覺得女性作家好像不適合去\n", + "Detected language: zh\n", + "觸碰這一類的題材\n", + "Detected language: zh\n", + "也有一些女性作家出現包括像丁玲向東北作家的這個肖虹\n", + "Detected language: zh\n", + "就是大家非常熟悉的張愛玲我想尤其在台灣吧\n", + "Detected language: zh\n", + "那麼這類的作家像丁玲跟蕭弘事實上都是左派的作家\n", + "Detected language: zh\n", + "所以蕭虹有一些短篇小說以及她寫的長篇弧蘭河傳\n", + "Detected language: zh\n", + "都有一種反抗意識有一些批判意識我覺得它是30年代\n", + "Detected language: zh\n", + "左派作家裡非常優秀的余味那麼丁玲\n", + "Detected language: zh\n", + "太陽照在桑干河上那麼它也是後來在國民黨跟共產黨\n", + "Detected language: zh\n", + "分裂之後 跑到延安去的一位女性作家所以也等於是左派的文學利益\n", + "Detected language: zh\n", + "扮演了比較重要的角色\n", + "Detected language: zh\n", + "不只是了解張愛玲 也了解近代在她同時有一些\n", + "Detected language: zh\n", + "其他女性的這個發展可是我們關心的一點是為什麼特別在1949年以後\n", + "Detected language: zh\n", + "在台灣的暢銷文學、大眾文學、通俗文學裡張愛麟\n", + "Detected language: zh\n", + "可能有一段時間兩岸的文學是隔離的所以像在臺灣,可能三〇年代許多\n", + "Detected language: zh\n", + "具備有這麼大的影響力我想熟悉的文學人都了解到在戰後\n", + "Detected language: zh\n", + "第二次世界大戰以後台灣許許的女性作家整個的風格\n", + "Detected language: zh\n", + "和文筆書寫方向幾乎完全受到張愛玲的影響甚至有人\n", + "Detected language: zh\n", + "特別在這幾年開了研討會,談到兩岸的張派文學\n", + "Detected language: zh\n", + "所謂的張派就是張愛玲劍然變成了一種問題變成了一種\n", + "Detected language: zh\n", + "文類變成一個派別\n", + "Detected language: zh\n", + "有许多的女作家在追隋张艾琳之后书写女性歌词\n", + "Detected language: zh\n", + "性情感\n", + "Detected language: zh\n", + "意識特別強的作家他跟前面提到的蕭弘、丁玲\n", + "Detected language: zh\n", + "因為我們在讀肖宏的《湖南河傳》讀丁琳的《東河祭功夫》\n", + "Detected language: zh\n", + "他們的作品\n", + "Detected language: zh\n", + "太陽照在桑干河上這些小說的時候並沒有特別意識到\n", + "Detected language: zh\n", + "他們作為女性的角色他們希望把自己變成男性他們希望強調\n", + "Detected language: zh\n", + "他們在左派的社會理想裡他們也要去勞動他們也要去頒言\n", + "Detected language: zh\n", + "所謂的女性扛起半邊天的這種有一點陽剛的角色\n", + "Detected language: zh\n", + "可是 張愛玲不同張愛玲的小說裡最大的特徵她非常認同她自己\n", + "Detected language: zh\n", + "屬於女性的一種特質但是這個女性的特質是什麼呢他認為\n", + "Detected language: zh\n", + "在長期的以男性為中心的社會當中女性對於男性的依賴女性的撒嬌\n", + "Detected language: zh\n", + "女性的喜歡化妝品女性的愛美她覺得這些就是女性特質\n", + "Detected language: zh\n", + "他並不認為女性在現代社會裡面要放掉這些 左派理論當中\n", + "Detected language: zh\n", + "認為女性應該要放棄掉的特徵所以我想也許從這個角度切入\n", + "Detected language: zh\n", + "曾經大概長達三四十年在臺灣被列為禁書\n", + "Detected language: zh\n", + "我們會比較有興趣探討為什麼張愛玲在現代的大眾\n", + "Detected language: zh\n", + "竟然發生了这么大的影响力我们在近代中国文学里\n", + "Detected language: zh\n", + "已經提到了張愛玲這一位作家我們也特別感覺到\n", + "Detected language: zh\n", + "她小说里的一种强烈的女性意识我们感觉到\n", + "Detected language: zh\n", + "非常奇特的一點是張愛玲在1949年以後由於中國大陸政權的改變\n", + "Detected language: zh\n", + "所以他不多久就離開了他一直寫作的背景上海\n", + "Detected language: zh\n", + "就飛到美國去了基本上我們看到他後來重要的居住地方\n", + "Detected language: zh\n", + "其实是在美国的细岸他来过台湾可是也是非常短暂的停留\n", + "Detected language: zh\n", + "大概也不到几个礼拜的时间可是张爱玲一定没有想到蛋丝迵 reveal我了\n", + "Detected language: zh\n", + "有一個地方臺灣竟然變成了他的小說文學最暢銷的地方甚至在大陸\n", + "Detected language: zh\n", + "那麼同樣的,我們也知道像在台灣非常流行的張愛玲\n", + "Detected language: zh\n", + "整個禁止讀他的小說的時候華文的世界當中張愛玲的文學\n", + "Detected language: zh\n", + "是以臺灣作為中心點來發生它的影響力而特別是臺灣\n", + "Detected language: zh\n", + "到60 年代 70 年代许许多多有名的女作家基本上\n", + "Detected language: zh\n", + "完全是受張愛玲影響出來的張派傳人所以從這個角度上\n", + "Detected language: zh\n", + "我們大概可以看到張愛玲是第一個意識到在城市當中\n", + "Detected language: zh\n", + "女性角色改變的一個特殊作家怎麼去解釋這件事情?\n", + "Detected language: zh\n", + "我們講一個小小的故事張艾林非常小的時候就展露了他寫作的才華\n", + "Detected language: zh\n", + "我們知道他的父親他的母親兩家都是清朝做大官的人\n", + "Detected language: zh\n", + "所以,我們可以說它是標準的,典型的,書香釋迦出來的一個孩子。\n", + "Detected language: zh\n", + "可在清末明初的這個階段,我們也會看到這種非常古老的壽香家庭。\n", + "Detected language: zh\n", + "反而在大陸的1949年以後也列為進俗80年代以後台灣的解嚴\n", + "Detected language: zh\n", + "在父亲祖父那一辈的保守 男性中心主义\n", + "Detected language: zh\n", + "也就是 女性往往又有一種努力去對抗整個社會\n", + "Detected language: zh\n", + "可以壓抑的一種新思潮開始出來所以了解張愛玲背景的朋友大概都知道她的母親\n", + "Detected language: zh\n", + "而前年她的姑姑 这两位女性对她发生非常大的影响都是在清朝末年\n", + "Detected language: zh\n", + "受到封建禮教影响的女性都禅小脚\n", + "Detected language: zh\n", + "他们又开始出国读英文了如果大家去读张艾琳的母亲跟姑姑的传记\n", + "Detected language: zh\n", + "我們會嘆為觀止就看到那些纏了小腳的清末明初的女性竟然會跑到印度\n", + "Detected language: zh\n", + "跑到英國,甚至到工場去做女工,甚至到瑞士去滑雪\n", + "Detected language: zh\n", + "把他們的小腳外面想辦法,包得大一點,然後穿起滑雪\n", + "Detected language: zh\n", + "雪橇去滑雪的所以這些經驗在張愛玲身上其實發生了很明顯的影響\n", + ">>>> 09-01\n", + "Detected language: zh\n", + "被重視當然我想并不说明这匹艺术家不好可是有另外一类艺术家\n", + "Detected language: zh\n", + "我們怎麼忠言辛勞最后的钱最后的这些农作物,全部都给西班牙拿走\n", + "Detected language: zh\n", + "所以他們當然會慢慢覺得不對然後他們也出現了一些中產階級\n", + "Detected language: zh\n", + "就是他們社會裡面的知識份子他們就在開始討論西班牙是一個什麼樣的國家\n", + "Detected language: zh\n", + "西班牙當時信仰天主教,就是梵蒂岡這邊的天主教,叫做舊教\n", + "Detected language: zh\n", + "然後祂們都是有大教堂大教堂裡面掛滿耶穌像聖母像各種雕像\n", + "Detected language: zh\n", + "然後每天有很多繁衆的儀式然後我常常形容說這個教皇出來的時候\n", + "Detected language: zh\n", + "手满手都是宝石的戒指可是我们知道基督教如果我们真正去读耶稣的福音书\n", + "Detected language: zh\n", + "他講的話是非常簡單他說窮人有福了耶穌是一個非常為窮人講話的人\n", + "Detected language: zh\n", + "就是他的步道的思想 都在幫助窮人要站起來被壓迫的人要站起來\n", + "Detected language: zh\n", + "因為當時,我們知道耶穌所在的耶路撒冷等於是被羅馬統治\n", + "Detected language: zh\n", + "我們會發現他有一個特徵,就是他除了在藝術領域畫畫之外,他的畫會感動很多的人。\n", + "Detected language: zh\n", + "所以有點像荷蘭當時被西班牙統治所以我們就會發現荷蘭就出現了一些重要的思想家\n", + "Detected language: zh\n", + "特别是宗教的思想下比如说从法国来的后来在荷兰发生很大影响的一个人\n", + "Detected language: zh\n", + "叫做戈爾文我們翻譯成戈爾文戈爾文後來大家都聽到\n", + "Detected language: zh\n", + "有一個叫格爾文教派格爾文教派就是說他讀聖經以後他發現耶穌的話這麼簡單\n", + "Detected language: zh\n", + "耶穌跟祂的學生、弟子跟祂的信眾,是過非常樸素的生活的。\n", + "Detected language: zh\n", + "他会很反对那种奢侈很反对去掠夺别人的财产那么他对这种统治阶层\n", + "Detected language: zh\n", + "他也有他的一種對抗的力量所以格爾文教派當時就提倡說\n", + "Detected language: zh\n", + "要创立新教我们知道新教就跟旧教产生了严重的对立跟冲突\n", + "Detected language: zh\n", + "其實新教就是我們今天講的基督教那舊教就是現在我們所說的天主教\n", + "Detected language: zh\n", + "就是梵蒂岡為代表的儀式很複雜然後裝飾很多的舊交\n", + "Detected language: zh\n", + "甚至不是從事美術工作的連一般的低階層的民眾甚至工人農民\n", + "Detected language: zh\n", + "心教就是基督教现在的很多的教派所以心教的思想在当时\n", + "Detected language: zh\n", + "當然是被禁止的因為就教會覺得你們是遭教皇的反抗\n", + "Detected language: zh\n", + "梵蒂岡覺得解釋聖經的權力是由梵蒂岡來決定的\n", + "Detected language: zh\n", + "那你格爾文只是一個地方上的小小的這個牧師或者神父嗎?\n", + "Detected language: zh\n", + "你憑什麼來解釋聖經可是格爾文當時因為他們看到老百姓受的痛苦\n", + "Detected language: zh\n", + "所以他们反对旧教同时也反对跟旧教合作的西班牙王犬\n", + "Detected language: zh\n", + "我们知道政教合一就西班牙的国王当他要带那个皇冠的时候\n", + "Detected language: zh\n", + "是由梵蒂岡的教皇来加冕的所以我们叫君权神兽祂是由上帝来给祂的\n", + "Detected language: zh\n", + "所以老百姓不能反抗他是因為有軍權神獸的思想就是說,你們反對國王就是反對上帝\n", + "Detected language: zh\n", + "所以大家不敢造反可是格尔文教派就告诉大家说你们可以造反你们可以革命\n", + "Detected language: zh\n", + "站在他的畫前面都會被震動都會得到很大的很大的撞擊\n", + "Detected language: zh\n", + "因為他們的權利不是上帝給的上帝不會贊同這些人去剝削老百姓\n", + "Detected language: zh\n", + "所以格爾文教派當時就一下子影響到所有這些窮苦的地區\n", + "Detected language: zh\n", + "所有的老百姓覺得得到了一個很大的支持可以讓他們用心教的信仰\n", + "Detected language: zh\n", + "来对抗西班牙所以荷兰就开始革命了他们的独立建国运动一共有80年之久\n", + "Detected language: zh\n", + "每次被抓可能被逮捕、被殺死受酷刑可是他們前仆後繼\n", + "Detected language: zh\n", + "不断的去对抗西班牙王权终于在17世纪建立了一个国家\n", + "Detected language: zh\n", + "我的家叫做荷蘭以新教的理想為主以新教思想為主建立了一個荷蘭\n", + "Detected language: zh\n", + "這是返古誕生以前的荷蘭的背景我們花了一點時間把十六世紀\n", + "Detected language: zh\n", + "17世纪的荷兰的信仰以及它的海泉事业大概叙述了一下\n", + "Detected language: zh\n", + "主要是因为这些可能跟返古会有很密切的关系\n", + "Detected language: zh\n", + "那这一类的画家 我觉得他们最大的特征是他们不是用颜料在画画\n", + "Detected language: zh\n", + "雖然返古誕生的時候你已經到了1853年可是我們知道荷蘭建國之後\n", + "Detected language: zh\n", + "荷蘭很快地取代了西班牙成為西方歐洲的海上霸權\n", + "Detected language: zh\n", + "我不知道大家有沒有印象大概17世紀的時候荷蘭人已經統治了台灣了\n", + "Detected language: zh\n", + "所以說明 西班牙來過西班牙人來過大概在北邊就是淡水這一帶\n", + "Detected language: zh\n", + "在台湾的北部这一带活动后来西班牙人放弃了台湾主要他的据点都放在菲律宾\n", + "Detected language: zh\n", + "荷蘭人就替代了西班牙在台灣的殖民,他就把據點放在南部\n", + "Detected language: zh\n", + "就是今天的北港当时叫做奔港然后荷兰人在这个地方做了很多的开发跟经营\n", + "Detected language: zh\n", + "那么也统治当时的原住民最早主要是原住民因为大概十七世纪以后\n", + "Detected language: zh\n", + "韓人移民來的很少那荷蘭人就統治了北港這個地區他們主要的目的\n", + "Detected language: zh\n", + "就是讓原住民幫他們打獵那因為台灣當時路很多譬如說我們聽到的什麼鹿港\n", + "Detected language: zh\n", + "不是用畫筆在畫畫他們通常用生命在畫畫我想翻蠱\n", + "Detected language: zh\n", + "啊什麼很多地名是跟鹿有關台灣很多的鹿那鹿皮對於欧洲人來講\n", + "Detected language: zh\n", + "是很珍貴的一種物資所以他們每一天就打很多裂然後把這些\n", + "Detected language: zh\n", + "駱皮運到荷蘭現在很多做台灣早期歷史研究的學者\n", + "Detected language: zh\n", + "那么会到荷兰去,在荷兰找到很多老的档案,有老荷兰文的档案。\n", + "Detected language: zh\n", + "就是每一年他們如何管理台灣 如何把鹿皮帶走\n", + "Detected language: zh\n", + "可是我们注意一下,荷兰的殖民台湾跟西班牙殖民荷兰\n", + "Detected language: zh\n", + "有一点不同我们知道旧的殖民主义他们就是帝国发展王犬\n", + "Detected language: zh\n", + "然後它要控制你的思想把你的稅收什麼全部都剝削走\n", + "Detected language: zh\n", + "新的殖民地像荷蘭很特別它比較像一個商業企業管理\n", + "Detected language: zh\n", + "所以我想大家聽過一個名字叫做核鼠冬印度公司\n", + "Detected language: zh\n", + "是最典型的一個例子這是為什麼我想我們會發現\n", + "Detected language: zh\n", + "就荷兰所属下的东印度公司随荷兰当时管理台湾\n", + "Detected language: zh\n", + "管理非常广阔地区的澡。就是今天的印尼以及印度的一部分。\n", + "Detected language: zh\n", + "這個公司叫做河蜀東印度公司印度以東的亞洲公司\n", + "Detected language: zh\n", + "东南亚的地区被荷兰所管理他是用公司来管理所以这里也可以看到\n", + "Detected language: zh\n", + "到荷蘭在獨立建國之後他有一點不相同於以前西班牙這種王權的殖民地\n", + "Detected language: zh\n", + "他把它變成一個現代資本主義的一個商業管理的方式當然他還是把臺灣很多東西都運走了\n", + "Detected language: zh\n", + "運走以後他就可以在這邊獲得很大的利益也可以說當時台灣的原住民\n", + "Detected language: zh\n", + "其實是等於受荷蘭的剝削的可是慢慢地台灣的路因為打獵打得太厲害\n", + "Detected language: zh\n", + "所以慢慢就沒有路了就是我們知道動物他有他的繁殖期\n", + "Detected language: zh\n", + "如果你的繁殖器还在打猎的话慢慢台湾鹿的生产就越来越少当时也没有什么环保的这种观念\n", + "Detected language: zh\n", + "范古他的生平一次一次被寫成非常精彩的撰稽\n", + "Detected language: zh\n", + "所以后来河南人就有一点想在台湾发展第二个产业就是干涸\n", + "Detected language: zh\n", + "发展糖业可是发展糖业需要一个农耕技术和农耕的经验\n", + "Detected language: zh\n", + "可是台灣的原住民基本上是比較沒有農耕經驗的所以他們當時就非常希望\n", + "Detected language: zh\n", + "引進很多漢人的移民所以當時就來了一個他的教名叫做尼古拉\n", + "Detected language: zh\n", + "Nikola的會講一點荷蘭文的一個漢人就是鄭志隆鄭ruste公的爸爸\n", + "Detected language: zh\n", + "那麽他就跟荷蘭人打交道所以就把敏就是福建沿海的很多的災民\n", + "Detected language: zh\n", + "可能水灾旱灾的饑荒里面的灾民把他们运到台湾来\n", + "Detected language: zh\n", + "他有一點像人力仲介公司一樣他從軍府那邊拿一點錢就帶了這些人到台灣\n", + "Detected language: zh\n", + "又把這些人賣給荷蘭人所以這些人其實也就是台灣人的老祖先他們就在北港這帶\n", + "Detected language: zh\n", + "开始去农耕慢慢发展起来当然这个力量大了之后郑治龙本身是福建人\n", + "Detected language: zh\n", + "大概早在1930年代就有很有名的史冬寫過範谷傳\n", + "Detected language: zh\n", + "所以他當然可以利用這個力量就把荷蘭人趕走了所以荷蘭人就從台灣退守\n", + "Detected language: zh\n", + "然後也就是政家的天下就是鄭成功管理台灣\n", + "Detected language: zh\n", + "因为跟台湾有一点关系所以我们讲到范谷的所以希望大家了解到范谷好像是一个荷兰的画家\n", + "Detected language: zh\n", + "跟台灣沒有什麼關係可是我想荷蘭很早就跟台灣有關係了所以也許我們可以約略的談一下\n", + "Detected language: zh\n", + "当时荷兰的这些航海的背景,他们的产业的背景,以及他们新教的传统。\n", + "Detected language: zh\n", + "最後在范古身上究竟發生了多大的力量?因為我們在這裡提到說\n", + "Detected language: zh\n", + "1853年3月30號反谷誕生在荷蘭的一個小鎮\n", + "Detected language: zh\n", + "叫做宗达那么为什么他会诞生在这个小小的小镇我们看到是他的父亲\n", + "Detected language: zh\n", + "是這個地方的一個格爾文教派的牧師他爸爸就是牧師\n", + "Detected language: zh\n", + "那么为什么坟谷生下来以后它的名字叫Vansan 文生Vansan\n", + "Detected language: zh\n", + "也由余光中先生翻譯成中文在國內出版\n", + "Detected language: zh\n", + "我想大家知道美國的 Canadians David McLean一個歌手很有名的一首歌\n", + "Detected language: zh\n", + "名字就叫van Catherine其實就是寫給范古的所以我們今天把他的名字去掉了我們只用他的姓,叫van\n", + "Detected language: zh\n", + "其實荷蘭文這話不是高的發音可是英文的發音是g sleeves\n", + "Detected language: zh\n", + "所以大家就翻譯成方高可是方高是他們家的姓就等於說我姓蔣或姓陳\n", + "Detected language: zh\n", + "可是其實不是他的名字他們家族都姓Wen好 番高他的祖父名字就叫汶森\n", + "Detected language: zh\n", + "我們知道,西方人有一個習慣,就是說家裡有一個小孩誕生了,可能會用祖宗的 某一個人的名字來命名。\n", + "Detected language: zh\n", + "如果祖父叫約翰,小孩也叫約翰,祖父叫法蘭克,\n", + "Detected language: zh\n", + "這個小孩叫法蘭克所以他的祖父叫文笙所以這個小孩就叫文森\n", + "Detected language: zh\n", + "还有一个值得一提的就是说他生在1853年其实在1852年时候\n", + "Detected language: zh\n", + "他的媽媽懷孕生了一個小孩子小孩子一生下來就死掉了是一個找妖的儿子\n", + "Detected language: zh\n", + "這裡是IC之音,FM97.5您現在所收聽的是\n", + "Detected language: zh\n", + "影響了很多当时的青少年包括青少年那样的年龄\n", + "Detected language: zh\n", + "当时我们取的名字就是闻生所以我们知道闻生这个名字很有趣在这个家族是祖父的名字\n", + "Detected language: zh\n", + "其實也是他早要的哥哥的名字所以等到這個小孩誕生的時候父母就決定說\n", + "Detected language: zh\n", + "他好像是那個死去的哥哥又被上帝重新賞賜給他們\n", + "Detected language: zh\n", + "所以就繼續叫文生這個名詞所以我們大概簡單的敘述一下\n", + "Detected language: zh\n", + "他誕生時候的家庭的背景我們提到了1853年返古在3月30號誕生\n", + "Detected language: zh\n", + "那麼用了他祖父文森來命名。\n", + "Detected language: zh\n", + "同時文森也是他早一年誕生的一位死去哥哥的名字\n", + "Detected language: zh\n", + "這個地方的一個教區的巫師就在荷蘭獨立建國之後我們的格爾文教派\n", + "Detected language: zh\n", + "就是在每一个社区里面都会有一个负责信仰的一个牧师\n", + "Detected language: zh\n", + "有時候這個小鎮很小可能也只有幾戶人家那他爸爸在的這個榮島\n", + "Detected language: zh\n", + "讀到半谷的故事都會被感動那個時候的感動比如說在 �50 年代 �60 年代的時候\n", + "Detected language: zh\n", + "可能當時一百多人一個小村落他需要有一個牧師\n", + "Detected language: zh\n", + "因為信仰對歐洲是非常重要的東西就是大家在主日就是禮拜天\n", + "Detected language: zh\n", + "可以聚在一起。那么,有一个人可以念符音书给他们听\n", + "Detected language: zh\n", + "可以解读耶稣的道理给他们听所以我想这个角色其实是非常重要的\n", + "Detected language: zh\n", + "所以我们可以讲说大部分河南的地区可能还是工人或农民工人、农民在那个时期教育不普及\n", + "Detected language: zh\n", + "所以大部分是文盲不識字所以他們教區的牧師同時是信仰的中心\n", + "Detected language: zh\n", + "其實也擔負了部分教育的責任所以我特別要解釋一下因為反蛊的家族很重要的一點\n", + "Detected language: zh\n", + "他父亲是教区牧师,他祖父也是教区牧师,所以他们好几代都是格尔闻教派的牧师。\n", + "Detected language: zh\n", + "所以這樣的一個牧師傳統我們絕不能忽略在梵谷身上發生了多麼大的作用\n", + "Detected language: zh\n", + "因為一個有信仰的畫家跟一個沒有信仰的畫家我相信在藝術創作上是非常不一樣的\n", + "Detected language: zh\n", + "我看到的翻译本的范古专不过是一个可能初一那个年龄的学生\n", + "Detected language: zh\n", + "所因此可以看到很多人在敘述返古的故事敘述返古的生平傳記時\n", + "Detected language: zh\n", + "就特別強調他身上所受影響的格爾文教派信仰\n", + "Detected language: zh\n", + "她從小是在這個家庭長大的我們舉很簡單的例子她可能才一歲\n", + "Detected language: zh\n", + "他就會聽到父親在那邊低聲禱告他剛剛董事 坐在餐桌上\n", + "Detected language: zh\n", + "可能還做不穩一餐 餐前它們都要低頭禱告這些祈禱的語言 會變成犯規\n", + "Detected language: zh\n", + "最重要的生命里面的理想而父亲是教区牧师父亲必须 负担其\n", + "Detected language: zh\n", + "所有教区里面这些农民 工人他们生活的困苦所以我想这是我们不太了解\n", + "Detected language: zh\n", + "因為牧師在歐洲所擔負的一個責任角色不只是一個幫你禱告的人\n", + "Detected language: zh\n", + "其實它也是身體力行就是說你有困難的時候你貧貧交迫的時候它來幫助你的人\n", + "Detected language: zh\n", + "所以凡古其實是很了解他自己從祖父到爸爸他們家族裡面的一個傳統\n", + "Detected language: zh\n", + "會被這樣的一個生命所震動那非常的難以釋懷\n", + "Detected language: zh\n", + "因此我們看到凡古在他的生命裡最早最早的志願其實並不是要做畫家\n", + "Detected language: zh\n", + "他是要做教群母師以後我們會提到繁谷生命裡面最大的一個夢想\n", + "Detected language: zh\n", + "不是画家,其实是做牧师这是我们很不容易理解的我们觉得梵谷今天是这么有名的大画家\n", + "Detected language: zh\n", + "簡直是一個大天才可是 他不覺得藝術那麼重要他覺得對他來講 重要的是\n", + "Detected language: zh\n", + "生命應該有信仰那麼我覺得這是凡古後來的話動人的最重要的原因\n", + "Detected language: zh\n", + "也是為什麼我一定要把她的生平背景 跟大家做很具體的敘述\n", + "Detected language: zh\n", + "因為我們看到他從家族裡面得到的這種這麼深刻的幾乎是從小耳濡目染的\n", + "Detected language: zh\n", + "的一个福音书的记忆所有的圣经里面的每一个句子它几乎都熟悉得不得了\n", + "Detected language: zh\n", + "返古一生,永遠不離開手上的就是一盤生機。\n", + "Detected language: zh\n", + "他好幾次才畫畫的過程當中都畫出了那本被翻得破破爛爛的一本福音書一本神經\n", + "Detected language: zh\n", + "就是在讀她的生平故事的時候幾次眼眷而嘆的那個感覺\n", + "Detected language: zh\n", + "可这本生经对他来讲不是一本书,而是一个生命的信仰。里面的每一个句子他都非常熟悉。\n", + "Detected language: zh\n", + "它曾經在英國的一個非常非常窮困的社區做過一個短時間的這種\n", + "Detected language: zh\n", + "不是牧師,因為他還沒有這個資格就是有點像教會派去步道的一個見習生\n", + "Detected language: zh\n", + "然後他曾經寫信給他的弟弟敘述說當他站在一個小小的禮拜堂\n", + "Detected language: zh\n", + "一個聚會所的講壇上去宣講耶穌的道理的時候他覺得他全身都在發亮,都在發光\n", + "Detected language: zh\n", + "所以这个东西是一般人不太了解就是反骨身上有一个非常信仰的狂热\n", + "Detected language: zh\n", + "而這個信仰的狂熱使他的生命一直覺得活著最大的意義\n", + "Detected language: zh\n", + "是用自己的生命去為所有的人做救贖救贖我們知道救贖這個字是\n", + "Detected language: zh\n", + "佛陰書基督教裡面最終要的一個詞基督教裡面闡述耶穌之所以到人間\n", + "Detected language: zh\n", + "是因為它要定死在十字架用它的血來為人間救贖我想這是很多很多甚至基督教的朋友\n", + "Detected language: zh\n", + "到現在都記憶得非常清楚可是當時其實沒有看過反古的話也沒有去過荷蘭\n", + "Detected language: zh\n", + "所有你人都不太理解什么叫救赎的意义就是如果今天作为一个信徒我的生命活着是要救赎他人的\n", + "Detected language: zh\n", + "如果我自己養尊處憂過很好的日子不叫著救贖救贖是說我把我所有生命裡面的都分給別人\n", + "Detected language: zh\n", + "所以我们看到基督教里面很重要的一个图像是耶稣定在十字架上祂在受最大的苦\n", + "Detected language: zh\n", + "因為他的身體要救贖人類所以返古一直用這個東西來作為他一生的\n", + "Detected language: zh\n", + "不敢忘掉的一個最高的信仰的指標而它最後的的確卻身體力行\n", + "Detected language: zh\n", + "她幾乎在她的一生當中不斷地用這樣的方法去做她救贖的工作\n", + "Detected language: zh\n", + "只是我們不知道返古後來的救贖在很多地方被霧襲\n", + "Detected language: zh\n", + "因為大家覺得他是個瘋子怎麼會有一個人用這樣的方法去救贖別人?\n", + "Detected language: zh\n", + "怎麼會有一個人把他的衣服分給窮人\n", + "Detected language: zh\n", + "他的每餐都自己饿得要死没有东西吃他可以把他的食物分给这些矿工怎么会他看到一个街边\n", + "Detected language: zh\n", + "在台灣 還沒有去過伍斯特丹對它的畫作也理解不多\n", + "Detected language: zh\n", + "一個過了氣帶著五個小孩仰不活的一個老妓女她就會讓那個人住到她家裡來\n", + "Detected language: zh\n", + "用他自己的房子那麽結果被鄰居罵得一塌糊塗\n", + "Detected language: zh\n", + "其实我们今天了解到是反古信仰里面的救赎的原则可是,世俗的人是不了解的\n", + "Detected language: zh\n", + "世俗人覺得這個人是一個瘋子所以因此我們陸續要介紹的反顧可能有很多點點滴滴他生平的細節\n", + "Detected language: zh\n", + "也是非常非常動人的如果不了解這個部分其實是無法進入返古的藝術的世界\n", + "Detected language: zh\n", + "對他的感動最早是從人本身從生命本身而不是從藝術\n", + "Detected language: zh\n", + "所以我想這是為什麽我們特別會希望挑選反鼓來作為我們重要的主題來坦\n", + "Detected language: zh\n", + "因爲我想,它牽涉到很多生命裡面非常廣泛的東西譬如說,它明明是一個畫家\n", + "Detected language: zh\n", + "北的城司我是蔣迅跟所有的朋友介紹大家最熟悉\n", + "Detected language: zh\n", + "非常的造要 37 岁他就自杀去世了然后他留下的画\n", + "Detected language: zh\n", + "發作 其實在全世界大概都是最有名的甚至用世俗的角度來看\n", + "Detected language: zh\n", + "在拍賣市場大概都是較價最高的在一九八七年左右\n", + "Detected language: zh\n", + "它的一張向日葵在拍賣市場破了天價當時大概折合成\n", + "Detected language: zh\n", + "置成十億左右的台幣一張作品我想反顧有 GuangWenB spreading他最後的希望就到了我們想了想我們個人的立場也要結束所以我想現在總是內容深的相關\n", + "Detected language: zh\n", + "被當成一個傳奇人物來看待可是不幸的是說這樣一個反骨\n", + "Detected language: zh\n", + "現在這麼有名的梵谷,畫家被吵到這麼高的梵谷,在他活著的時候\n", + "Detected language: zh\n", + "一直走37歲自殺以前他的畫作是完全不被認識的他只賣過他只賣過一張畫\n", + "Detected language: zh\n", + "而且是很低廉的價格賣出去的我們覺得這一個生命是一個一生在非常囧困\n", + "Detected language: zh\n", + "飽受折磨的狀態裡面畫家... 我很好奇\n", + "Detected language: zh\n", + "可能也最喜愛的一位畫家范古我想這個名字許多人\n", + "Detected language: zh\n", + "是什么原因返古的话在他去世之后在全世界发生了这么大的影响力\n", + "Detected language: zh\n", + "所以在談他的畫作之前其實我希望我們可以從他的出生\n", + "Detected language: zh\n", + "他出生的家庭背景他的国家荷兰是一个什么样的国家\n", + "Detected language: zh\n", + "我們都借反鼓來做一個比較全面的回顧跟瀏覽\n", + "Detected language: zh\n", + "我想對於介紹的話講可能是會有比較完整的資料\n", + "Detected language: zh\n", + "我們知道返古我們把定位在荷蘭他是荷蘭化家\n", + "Detected language: zh\n", + "如果我請很多朋友在腦海里搜尋一下就是你腦海里 nine你腦海里記得的河南畫家300 stones\n", + "Detected language: zh\n", + "還有什麼人的話有時大家不容易想起來比如說法國的畫家很多\n", + "Detected language: zh\n", + "摩南,列在诺瓦 Doy 1997.0什么窦嘉好多好多可是荷兰画家其实最有名的\n", + "Detected language: zh\n", + "并不是那么多我要讲到的是返古生在1853年也就是19世纪的中业\n", + "Detected language: zh\n", + "我们都有很多的认识虽然许许多多的朋友\n", + "Detected language: zh\n", + "1853年他生在荷蘭一個小小的地方叫做榮達小鎮\n", + "Detected language: zh\n", + "那么事实上,荷兰在梵谷之前出过了一个很有名的大画家\n", + "Detected language: zh\n", + "就是林布蘭特Rambrant林布蘭特那麼是17世紀荷蘭最有名的畫家\n", + "Detected language: zh\n", + "那麼他不只是荷蘭畫家他也在全世界發生了非常大的影響\n", + "Detected language: zh\n", + "所以我有一点想把历史拉回到17世纪就是比凡古诞生要早\n", + "Detected language: zh\n", + "大約兩百年的這個時間我們知道這個時間今天我們叫做荷蘭的這個地方\n", + "Detected language: zh\n", + "還沒有荷蘭這個名稱它可能被叫做尼德蘭\n", + "Detected language: zh\n", + "可能叫做低帝國,在法文裡有一個字叫bé bar,就是帝是很低的國家的意思。\n", + "Detected language: zh\n", + "低帝国因为我们知道,荷兰是靠海边的一个国家它的领土其实很小\n", + "Detected language: zh\n", + "跟台灣大小差不多可是它很多地方低於海平面的所以我們都知道\n", + "Detected language: zh\n", + "有時候不一定是從事美術的工作不在這個領域可是大概都\n", + "Detected language: zh\n", + "旅航班必须要住很多的堤防来防海患而且它们很有名的故事就是\n", + "Detected language: zh\n", + "他们很勤劳,他们天海造陆,因为他们陆地很少所以他们长期以来\n", + "Detected language: zh\n", + "挖了山的土去填海然後去造陸地去擴大他們的陸地\n", + "Detected language: zh\n", + "所以這些歷史大概都是我們知道的荷蘭在沒有建國之前的一段重要的歷史\n", + "Detected language: zh\n", + "因此我們也知道荷蘭的建國其實時間非常的短那麽到現在\n", + "Detected language: zh\n", + "可能也不過是200多年不到300年的歷史等一下我們會特別跟大家介紹\n", + "Detected language: zh\n", + "荷兰的建国是一个什么样的过程我们在一开始要介绍凡古这位大画家\n", + "Detected language: zh\n", + "我們因此對於荷蘭就是返古它出生的地方\n", + "Detected language: zh\n", + "也许可以多做一些了解刚才提到如果我们回数到17世纪\n", + "Detected language: zh\n", + "荷蘭並不是一個獨立的國家它當時是屬於西班牙的殖民地\n", + "Detected language: zh\n", + "所以因此有時候我會覺得我會把藝術家\n", + "Detected language: zh\n", + "所以我們叫做低帝國,叫做尼德蘭。它指的不是今天的荷蘭。\n", + "Detected language: zh\n", + "而是今天的荷蘭加上它南邊的比利時加上廬深堡這一塊地方叫做尼德蘭區\n", + "Detected language: zh\n", + "就是西班牙統治的尼德蘭區如果大家對地理熟悉\n", + "Detected language: zh\n", + "或者打開地圖你可能會蠻驚訝就是西班牙不是在法國南邊嗎\n", + "Detected language: zh\n", + "那麼他怎麼會去統治法國北邊的比利時?\n", + "Detected language: zh\n", + "或者荷蘭呢?也許大家不容易理解這件事情因為我們知道\n", + "Detected language: zh\n", + "在15世紀和16世紀以後,歐洲就發展出海權。\n", + "Detected language: zh\n", + "就是原来人类是陆权就打仗都在陆地上打仗那么之后航海也发展起来了\n", + "Detected language: zh\n", + "就變成海權的爭霸所以,我們知道世界上最早的海權國家一個是葡萄牙\n", + "Detected language: zh\n", + "第二個就是西班牙西班牙當時變成了非常有名的海上的霸權\n", + "Detected language: zh\n", + "艺术家、画家分成两种很不同的类型。有一类的艺术家、画家大概只有在艺术的领域当中 Anti immigration work又名作 police。\n", + "Detected language: zh\n", + "那我要形容下西班牙當時有多麼強大可能大家聽到會嚇一跳\n", + "Detected language: zh\n", + "就是西班牙的艦隊當時比如像哥倫布這些人他們可以發現美洲的\n", + "Detected language: zh\n", + "他們可以航行於整個的亞洲我們知道西班牙統治了菲律賓\n", + "Detected language: zh\n", + "我們知道西班牙來過台灣我們知道 美國今天大部分西海岸的什麼\n", + "Detected language: zh\n", + "邹金山San Francisco啊San joseri啊這些名字都是西班牙命名的\n", + "Detected language: zh\n", + "然后我们知道整个广大的中南美是西班牙的领土,就是密鲁\n", + "Detected language: zh\n", + "阿根廷智利這些地方幾乎都是西班牙的領土所以大家就可以在地圖上看到\n", + "Detected language: zh\n", + "西班牙本土這麼小可是它藉著它的船隊可以統治亞洲的菲律賓\n", + "Detected language: zh\n", + "南美的秘魯他可以航行於四海擁有這麼大的一個領域\n", + "Detected language: zh\n", + "所以我們知道這就是所謂的海上拔權因此如果這樣來講他的船隊從大西洋\n", + "Detected language: zh\n", + "永昂被讨论,其芯成性的人 울 electricity credits他的画,他的艺术 Only an artistic field那麼只有艺术的领域上 held the highest ==\n", + "Detected language: zh\n", + "沿岸的里斯本這一帶或者西班牙的某些海港往上去統治荷蘭跟比利時\n", + "Detected language: zh\n", + "對他們一點都不困難因為他們本來就有這一些領土特別是他們靠近大西洋岸\n", + "Detected language: zh\n", + "本來就有幾個重要的海港所以他們就可以從這個海港去統治荷蘭跟比利時\n", + "Detected language: zh\n", + "所以荷蘭跟比利時因為是殖民地我們知道殖民地不是國家只是被人家統治的一個地方\n", + "Detected language: zh\n", + "那麼這地方的人民非常非常勤勞前海造陸然後種了很多很多的農作物\n", + "Detected language: zh\n", + "生產了很多的紡織品可是最後全部都提供給殖民的西班牙\n", + "Detected language: zh\n", + "所以這些殖民地的國家它們基本上統治一個地區\n", + "Detected language: zh\n", + "在於它們就是在意我怎麼剝削你我把你的稅收全部收過來變成我的\n", + "Detected language: zh\n", + "所以它不太管,當地老百姓的死活所以河南這個地區的老百姓\n", + "Detected language: zh\n", + "仆時 icing 肯就在種田然後他們慢慢就覺得不對\n", + ">>>> 09-02\n", + "Detected language: zh\n", + "所以我們可以看到 新教的基督教傳統在 梵谷家族上\n", + "Detected language: zh\n", + "他會覺得這一類的藝術作品是仿冒的,不是珍品,然後它裡面有一些很粗燥\n", + "Detected language: zh\n", + "反骨當然有藝術家的敏感那他再賣這個畫賣掉了表示他業績很成功\n", + "Detected language: zh\n", + "可是心裡會不會有不舒服我不知道就像我想舉一個例子今天如果有一個業務員\n", + "Detected language: zh\n", + "他是做房屋仲介然後他這個房子他知道可能是投資戶裝修了一下來騙客戶的\n", + "Detected language: zh\n", + "其實是一個不好的房子裡面有很多問題可他因為裝修好以後煥然一新看起來很漂亮\n", + "Detected language: zh\n", + "那這個業務員如果知道內情他在賣這個房子如果他有很多人的誠懇的話\n", + "Detected language: zh\n", + "他会很不安就是这个房子卖了赚了钱业绩很好被老板夸赞\n", + "Detected language: zh\n", + "可是它內在的世界它會有一種不安的東西所以我用這個東西來解釋\n", + "Detected language: zh\n", + "范古大概从1869年他大概16 17岁的时候他就进到了古比锡艺术经纪公司\n", + "Detected language: zh\n", + "一直到1875年大概有六年時間他都在從事藝術經濟的工作\n", + "Detected language: zh\n", + "發生了非常大的影響力所以翻滑自己身上其實具備了很強的宗教情操\n", + "Detected language: zh\n", + "一直是一个成功的而且被大老板一直称赞的业务员就是她这方面工作做得很好\n", + "Detected language: zh\n", + "可是我一直觉得背后我们绝对可以感觉到一个充满了对人性\n", + "Detected language: zh\n", + "蘊上最大的愛跟熱情的飯肚這個工作對他其實是不適合的所以我在接下來的很多單元裡\n", + "Detected language: zh\n", + "很希望跟大家談到我覺得范谷身上是充滿了很多的矛盾這個矛盾可能後來造成了\n", + "Detected language: zh\n", + "他在精神病的爆發哥爾多住到精神病院去治療可是其實從很年輕的時候\n", + "Detected language: zh\n", + "我就看到梵谷身上同时并存着两种很不同的植树就是一个有能力\n", + "Detected language: zh\n", + "可以長袖善舞可以在交際的社會社交的社會裡面混得很好的業務員\n", + "Detected language: zh\n", + "跟一個很虔誠的、誠懇的、謙卑的教徒這兩種角色在他身上同時都具備\n", + "Detected language: zh\n", + "我們知道如果我們自己身上也同時有這兩個東西我們就等於要換面具的就是他在童年的時候\n", + "Detected language: zh\n", + "跟他的牧師的父親一起從事禱告他讀聖經時 Перceive 所有耶穌的話語\n", + "Detected language: zh\n", + "他一直認為他的生命是要去餵一些窮困的人\n", + "Detected language: zh\n", + "给他的感动跟影响他最早的话有一张很有名的话就是画一本老的圣经的话\n", + "Detected language: zh\n", + "就是那種早期的羊皮封面的聖經然後都翻到舅舅\n", + "Detected language: zh\n", + "你可以看到圣经对范国来讲是他一生永远不断在读的一本书\n", + "Detected language: zh\n", + "他讀這本書不是當成書來讀他覺得聖經裡面在指導他做人的原則\n", + "Detected language: zh\n", + "可是這些所有聖經裡的話語當他到藝術經濟公司去賣一個複製品\n", + "Detected language: zh\n", + "而且可能是仿冒的负制品的时候当然对它产生了道德上的某一种不安\n", + "Detected language: zh\n", + "所以因此等一下我們大家要分析一下這一段時期是范谷大概一生職業上最成功的時期\n", + "Detected language: zh\n", + "可是也可能是他心靈上最焦慮的時期因為他覺得不快樂\n", + "Detected language: zh\n", + "所以大概也影響到後來他又做了其他的選擇就是為什麼他會放棄了\n", + "Detected language: zh\n", + "這麼好的高薪這麼多發財的機會的工作而去選擇後來\n", + "Detected language: zh\n", + "受壓迫的人去做很多救贖的工作所以,因此我們在飯谷的身上\n", + "Detected language: zh\n", + "他进到深学院他想去做牧师我们就看到泛谷家族里面一个走艺术经济的路\n", + "Detected language: zh\n", + "一个走牧师的路又在他身上发生了矛盾我们谈到了范古在十六七岁的时候\n", + "Detected language: zh\n", + "进到了古比西艺术经纪公司那么这里面有一个很重要的阶段他是在伦敦的分公司里面工作\n", + "Detected language: zh\n", + "那麼我們特別提出倫敦是因為梵谷在這一段時期我們看到它從荷蘭的一個小小的\n", + "Detected language: zh\n", + "地方的一個青年慢慢去了巴黎感受到不同的其他國家的文化\n", + "Detected language: zh\n", + "他也到了伦敦所以他的法文跟英文都非常好所以当我们在整理他很多\n", + "Detected language: zh\n", + "特別是給她弟弟的信的時候我們發現他常常有時候用英文\n", + "Detected language: zh\n", + "有时候用荷兰文有时候用法文有这三种语言大概在他十六七岁做艺术经济的时候\n", + "Detected language: zh\n", + "都培養起來這點我們是要特別講因為商業上需要一種靈活所以你在倫敦做業務員\n", + "Detected language: zh\n", + "你當然不能不會英文甚至要會英文,同時也要把英文訓練的蠻好\n", + "Detected language: zh\n", + "看到的所謂藝術家的氣質跟他的宗教的氣質有一點混淆\n", + "Detected language: zh\n", + "这是语文上的东西另外一方面,因为你从事艺术的经济工作所以你必须要有\n", + "Detected language: zh\n", + "很豐富的藝術知識的背景我要講的是說 今天譬如說在我們生活的社會裏\n", + "Detected language: zh\n", + "也有所谓的画廊这个东西画廊其实在某一个程度就是艺术的经纪公司我们去一个画廊看画\n", + "Detected language: zh\n", + "可能就有一個畫廊的工作人員就來跟你搭訕然後它當然是希望賣畫\n", + "Detected language: zh\n", + "因為不賣畫他沒有錢賺那即使我今天可能是偶然到畫廊去看看畫可是他就會展現出他在藝術知識上的\n", + "Detected language: zh\n", + "說服你的能力所以我要先解釋是返古這個時候除了他\n", + "Detected language: zh\n", + "他白天上班做藝術經紀公司的職員之外他必須利用很多的空閒的時間\n", + "Detected language: zh\n", + "可能跑到论敦的国家画廊博物馆,去看很多的名作。\n", + "Detected language: zh\n", + "因為他這個時候他要培養他自己很多藝術上的知識比如說誰是根茲伯羅\n", + "Detected language: zh\n", + "根茲伯羅是英國的一個大畫家很可能他在賣畫的時候要賣一個根茲伯羅的作品\n", + "Detected language: zh\n", + "一般人畫畫是用油畫顏料,是用油彩我們覺得範谷好像不適合\n", + "Detected language: zh\n", + "所以他必須對根茲伯羅的背景做很多的調查那根茲伯羅在當時畫了很多\n", + "Detected language: zh\n", + "又或者英國新興的中產階級或者貴族的肖像\n", + "Detected language: zh\n", + "因为贵族,他们夫妇两个可能带着猎犬出去散步\n", + "Detected language: zh\n", + "去遛狗在他們的莊園裡那麼就會找一個畫家把他們的樣子畫下來掛在他們的家裡\n", + "Detected language: zh\n", + "所以這類的畫作就可能流到藝術經紀公司因為年代久了以後\n", + "Detected language: zh\n", + "然后这一对夫妇可能过世了然后他们的画作就流到艺术经纪公司就变成拍卖那么范古他就必须做很多的功课\n", + "Detected language: zh\n", + "所以这个时候是对他来讲很重要的一点是因为他做了艺术经济的业务员以后\n", + "Detected language: zh\n", + "他豐富了他的藝術的知識因為原來他在家裡他得到的知識大部分是神學的\n", + "Detected language: zh\n", + "因为他爸爸是牧师。所以他对神学、对于基督教传统的思想\n", + "Detected language: zh\n", + "非常非常的熟可是藝術上他是16 7歲以後才慢慢培養起來\n", + "Detected language: zh\n", + "好像是用他自己的血淚他總是看到人在受苦那麼他也願意為這些受苦的人\n", + "Detected language: zh\n", + "特别在伦敦这一段时间因为我们看到这一段时期她开始跟家人写信\n", + "Detected language: zh\n", + "尤其是他感情最好的一個弟弟叫迪奧他就跟迪奧寫了很多的信\n", + "Detected language: zh\n", + "裡面談到他看根茲伯羅的畫它也會發表很多他對根茲伯羅畫的一些看法\n", + "Detected language: zh\n", + "還有像康斯塔伯 就是英國當時因為社會有了很大的改變\n", + "Detected language: zh\n", + "因為工業革命最早在英國發生所以這種有蒸汽機的火車\n", + "Detected language: zh\n", + "在英國開始已經被應用在交通工具上所以很多的貴族或中產階級\n", + "Detected language: zh\n", + "就開始到戶外去遊玩所以他們有很多開始畫戶外風景的畫作出來\n", + "Detected language: zh\n", + "像康斯塔博的作品或者像我要介紹的第三個英國畫家就是\n", + "Detected language: zh\n", + "这是Turner 给我们翻译成Tona但Tona 这个话家非常重要因为他在1840年的时候\n", + "Detected language: zh\n", + "他畫過一張畫,是一大片的霧我們知道倫敦是霧很多的城市\n", + "Detected language: zh\n", + "去做最大的救赎的工作所以其實在泛谷的身上我們大概看到了兩個\n", + "Detected language: zh\n", + "然後在霧當中你遠遠看到有一個東西噴著蒸氣過來就是一輛火車所以他在講速度\n", + "Detected language: zh\n", + "他再讲火车喷出来的农烟跟伦敦的古老文学里的雾的风景\n", + "Detected language: zh\n", + "就合在一起了就是傳統的美跟現代工業革命以後的美\n", + "Detected language: zh\n", + "火車的農煙是工業革命的美學那麼 霧是英國傳統的美學\n", + "Detected language: zh\n", + "把它混合在一起所以tona我一直覺得她其實是最早的一個印象牌\n", + "Detected language: zh\n", + "就是畫出速度感畫出現代工業城市生活的一個大畫家那梵谷當時也很喜歡她的畫\n", + "Detected language: zh\n", + "可是很有趣的,我們是看到翻谷這個時候,是一個這麼敏感的年輕人他在做藝術經濟的公司\n", + "Detected language: zh\n", + "他彈根茲伯羅、彈康斯塔伯、彈這個Tona甚至他是也會彈一彈\n", + "Detected language: zh\n", + "他常常賣的法國畫家安格爾的作品可是這些藝術家\n", + "Detected language: zh\n", + "大家好像都沒有給她很大的感動那我要講的是說我們舉出這幾個畫家\n", + "Detected language: zh\n", + "一直在平行發展而且不斷相互交錯的影響力一個是宗教\n", + "Detected language: zh\n", + "三个英国画家,一个法国画家,都是名家。都不是坏的画家。\n", + "Detected language: zh\n", + "可是我覺得這裡有一個很大的不同是說根茲伯羅的畫是非常貴族氣味的\n", + "Detected language: zh\n", + "安格尔也是非常贵族气味的他们的作品里面从题材到技巧\n", + "Detected language: zh\n", + "都是非常优雅的贵族可是反骨你会发现他这个时候已经关心艺术因为这个时候\n", + "Detected language: zh\n", + "他還沒有拿起筆來畫畫可是他會覺得如果有一天他要拿起筆來畫畫\n", + "Detected language: zh\n", + "他絕對不是花貴族因為很奇怪返古的聲明裡他關心的對象不是養尊處優的人\n", + "Detected language: zh\n", + "他也不见得讨厌这些人可他觉得这些人穿着帘罗绸缎而吃着山珍海味\n", + "Detected language: zh\n", + "他觉得他们不需要被关系可是他会看到街头上的一个流浪汉晚餐都没有着落\n", + "Detected language: zh\n", + "他会想画他们所以我们知道后来他很有名的早期的一个作品就是《吃马铃薯的人》\n", + "Detected language: zh\n", + "他就是看到了有一家矿工在家裡面他們的晚餐什麼都沒有只有馬鈴薯\n", + "Detected language: zh\n", + "一個是藝術那麼這兩個影響力很有趣剛剛好在梵谷的家族裡我們看到了兩種很不同的生涯規劃\n", + "Detected language: zh\n", + "twice反鼓就化了他们所以因此我想在这里我要解释的是说返古虽然接触了一束\n", + "Detected language: zh\n", + "可是他對藝術上有非常強的自我的主見他不喜歡太過華麗的、唯美的藝術\n", + "Detected language: zh\n", + "他不喜欢太过装饰气味的贵族艺术他觉得艺术应该是以关心生命为主\n", + "Detected language: zh\n", + "关心生命里面最受苦的那些人所以他的画其实并不华美\n", + "Detected language: zh\n", + "她的話 讓妳感覺到一個生命真正的誠懇的東西所以這個時候她基督的信仰的部分\n", + "Detected language: zh\n", + "出來影響了他的美學風格剛才提到大概在1869年\n", + "Detected language: zh\n", + "反骨 16歲17歲的時候他就進到了股比錫藝術經紀公司\n", + "Detected language: zh\n", + "在古比西,艺术经纪公司从海亚到伦敦到布鲁塞尔到巴厘\n", + "Detected language: zh\n", + "就幾乎歐洲當時最重要的骨筆系藝術公司的分公司返古全部呆過了\n", + "Detected language: zh\n", + "因为我们知道当时的这种比较连锁的大的跨国公司他也要求他的职员能够有不同的在地经验\n", + "Detected language: zh\n", + "我們說過范谷的父親是閣文教派的牧師范谷的祖父是閣文教派的牧師\n", + "Detected language: zh\n", + "因为布鲁塞尔的经验跟巴黎的经验可能不完全一样巴黎的经验跟伦敦又可能不太一样\n", + "Detected language: zh\n", + "所以这些不同的精力其实也等于培养犯蛊这个年轻的业务员将来有朝一日\n", + "Detected language: zh\n", + "可以做總公司裏面更跨國的策劃因為我們一直要知道藝術其實是有很多環境的特質的\n", + "Detected language: zh\n", + "比如说在台湾喜欢买的话可能跟纽约是很不一样的\n", + "Detected language: zh\n", + "所以这里面的不同如果是一个大的跨国公司它就必须要适应不同的市场\n", + "Detected language: zh\n", + "那麼所以我們看到返顧被掉來掉去其實很明顯是因為公司很重用它希望培養它去經歷不同的經驗\n", + "Detected language: zh\n", + "而她也的確很勝任她幾乎在每一個地方在巴黎、在倫敦\n", + "Detected language: zh\n", + "在布魯塞尔他都能夠做得非常得好而同時也因為這樣的\n", + "Detected language: zh\n", + "他開了他的眼界他對歐洲18、19世紀上半葉所有的這些他的前輩的這些大師的名將\n", + "Detected language: zh\n", + "他幾乎都看到了所以將來對他走向藝術創作這條路來講\n", + "Detected language: zh\n", + "我們幾乎看到的就是梵谷家族有一個很強烈的宗教傳統可是如果我們再放大一點尺度來看\n", + "Detected language: zh\n", + "滴滴確實是一個重要的基礎只是梵谷這個時候大家沒有想到因為他只覺得他只是把這個當一個職業\n", + "Detected language: zh\n", + "把艺术经纪公司当一个职业她没有想到有一天她会变成画家\n", + "Detected language: zh\n", + "而且他会变成比他卖的这些画家更有名的一个画家\n", + "Detected language: zh\n", + "所以這裡面很弔詭我常常覺得一個年輕人是自己從事的行業年輕時候從事的行業\n", + "Detected language: zh\n", + "也不太知道有一天梵谷超越了安革梵谷超越了根茲伯瓏\n", + "Detected language: zh\n", + "范谷超越了康斯塔勃范谷超越了托纳所有她年轻所有的\n", + "Detected language: zh\n", + "金手賣的這些畫家的話其實都沒有他後來的創作力更強可是這個時候\n", + "Detected language: zh\n", + "它等于是我覺得受到藝術最好的一個基礎教育很廣泛的而且沒有偏見的\n", + "Detected language: zh\n", + "去学习的所有每一家的技巧长处有些人是适合表现色彩的\n", + "Detected language: zh\n", + "有些画家适合用线条有些画家的主题不同所以它都在官模 也都在吸收\n", + "Detected language: zh\n", + "范谷家族有幾個叔叔剛好是從事藝術經濟工作的比如他有一個最親的叔叔\n", + "Detected language: zh\n", + "所以這個時候我們看到對范國來講我覺得是他走向藝術的一個最重要的一個課程\n", + "Detected language: zh\n", + "長達六七年的時間在古碧系藝術公司的磨練我相信比我們今天\n", + "Detected language: zh\n", + "任何一个大学四年的美术系的教育还要好因为他看到了很多名座\n", + "Detected language: zh\n", + "他甚至也看到很多臨摹的偽作秉座,偽作他都能夠辨識\n", + "Detected language: zh\n", + "這是最好的眼力,最好的機會我們知道現在很多美術系的學生,因為沒有機會看到原作\n", + "Detected language: zh\n", + "比如說我們在台灣看不到真正的反骨我們看到的都是靈魔所以有一天你不知道真的是靈魔\n", + "Detected language: zh\n", + "這個反骨跟假的反骨到底怎麼去分辨我們叫做演技就藝術裡面其實需要很多的演技\n", + "Detected language: zh\n", + "我記得以前我在臺北故宮上課的時候我們的老師被很喜歡拿作品來給我們看\n", + "Detected language: zh\n", + "说要上手他有一个专有名词 handle就是这个话你在手上经过\n", + "Detected language: zh\n", + "你看過,你就知道不一樣因為藝術是靠眼力\n", + "Detected language: zh\n", + "就是姍叔叔那么这个姍叔叔就是在当时欧洲\n", + "Detected language: zh\n", + "她不是理論有些學生讀了很多理論考試都考了一百分可是最後問她哪一件事\n", + "Detected language: zh\n", + "真憑哪件事假的時候他可能指著假的說這是真的因為沒有眼界就是沒有真正閱歷過\n", + "Detected language: zh\n", + "所以返古這個樂歷是非常可貴對我們也特別強調\n", + "Detected language: zh\n", + "他在古比西藝術公司的這一段的訓練非常非常的難能可貴\n", + "Detected language: zh\n", + "因為培養了一個,他對藝術上最大的這個見賞的能力可是我必須說\n", + "Detected language: zh\n", + "大概到了1875年左右這個在事業上非常成功\n", + "Detected language: zh\n", + "這個在古比西藝術公司裏面幾乎要爬升到最高的位置的\n", + "Detected language: zh\n", + "這樣的一個經理人忽然發生了它的矛盾就是坂谷在巴黎這個時候他調到巴黎去了\n", + "Detected language: zh\n", + "巴黎是一个如此的繁华之都而且我们知道1875年如果熟悉艺术史的朋友知道\n", + "Detected language: zh\n", + "1874年巴黎剛好發生了印象派第一次大展的運動\n", + "Detected language: zh\n", + "最大的一个连锁的艺术经济公司叫做GOOBILE ACGOOBILE AC\n", + "Detected language: zh\n", + "就是墨內這些畫家他們有一個最大的美學革命可是凡古很奇怪凡古好像沒有感受到這個東西\n", + "Detected language: zh\n", + "所以我們覺得滿訝異因為我們讀了很多他的信他寫給爸爸的信寫給弟弟的信\n", + "Detected language: zh\n", + "他在巴黎在干嘛?他一下班他就跑到教堂去了然后他发现 有一个教堂里面\n", + "Detected language: zh\n", + "有一位牧師步道的時候那個內容非常的感人他就長時間跪在那個地方聽牧師步道\n", + "Detected language: zh\n", + "然後他覺得那些步道,那些基督的語言 經過一個這樣的動人的聲音傳達出來\n", + "Detected language: zh\n", + "震撼了她的生命所以我又要再比較一次就是反骨白天上班的那些\n", + "Detected language: zh\n", + "所有的大家认为美的艺术品包围着它可是它对那个东西不屑一顾它觉得那些东西不是它生命要的\n", + "Detected language: zh\n", + "可是當她下了班以後這麼累的身體可是她跪在一個神壇前\n", + "Detected language: zh\n", + "穆斯在步道的時候他聽到那個語言裏面他覺得那是他生命裏面最快樂的時刻\n", + "Detected language: zh\n", + "因為他感受到生命活著的意義跟價值所以這個時候我們就看到反骨一定要改變了\n", + "Detected language: zh\n", + "我把它翻譯成古筆系古筆主題是一個法文它是一間連鎖的藝術經紀公司\n", + "Detected language: zh\n", + "他後來離開了古筆系藝術公司他辭職然後他跟家裏面交代說\n", + "Detected language: zh\n", + "说她不再做这个她要去考神学院要去做牧师她家里吓了一大跳因为我们都觉得说\n", + "Detected language: zh\n", + "这个孩子已经做了六七年的工作做得这么成功都眼看着他要升到总公司的最重要的职位了\n", + "Detected language: zh\n", + "她為什麼又要放棄了要去做牧師當然返古的父親自己本身是牧師他不會反對他的兒子去走牧師這條路\n", + "Detected language: zh\n", + "可是我相信很多人還是會猶豫說為什麼反古放棄了他的藝術經紀公司的工作\n", + "Detected language: zh\n", + "所以後來接續牠的藝術經紀公司的是牠的弟弟迪奧牠弟弟迪奧變成一個\n", + "Detected language: zh\n", + "一個非常非常成功的藝術經紀人而梵谷放棄了他要去做牧師\n", + "Detected language: zh\n", + "他觉得让他生命里面在震动的不是艺术而是神的语言他要去苦读神学要进神学院\n", + "Detected language: zh\n", + "要去為所有受壓迫、窮苦的人做救贖的工作\n", + "Detected language: zh\n", + "美的沉思 我是蔣旭\n", + "Detected language: zh\n", + "我們說連鎖的意思是當時在海牙,在奧斯特丹\n", + "Detected language: zh\n", + "在倫敦 在巴黎都有古比錫這個經紀公司設立的分行\n", + "Detected language: zh\n", + "所以因此我们可以说艺术经济是什么艺术经济就是卖古董或者卖画艺术品\n", + "Detected language: zh\n", + "那麼再早期來講人類的社會裡其實並沒有所謂的藝術經濟公司\n", + "Detected language: zh\n", + "这里是IC之音FM97.5您现在所收听的是美得尘寺\n", + "Detected language: zh\n", + "这样的一个制度可是我们看到到了19世纪因为整个社会的市民阶层的发展\n", + "Detected language: zh\n", + "一般的人民在生活裡面有了藝術的嘗試而且從另外一個角度來講\n", + "Detected language: zh\n", + "藝術可能是美 可藝術的同時也可以是投資\n", + "Detected language: zh\n", + "20世紀70年代在台灣的一些畫家的畫作可能到21世紀這幾年\n", + "Detected language: zh\n", + "可能漲了100倍都不止所以它可能是比房地產股票增值的空間還要大的\n", + "Detected language: zh\n", + "所以因此,我們就知道說今天世界上有名的藝術經紀公司比如說大家可能聽過蘇富比\n", + "Detected language: zh\n", + "或者是其他的一些有名的這些經紀公司他們在世界上拍賣一個畫\n", + "Detected language: zh\n", + "比如说我们知道,很讽刺的,返谷在自己有生之年,一张画都没有卖出去\n", + "Detected language: zh\n", + "可是他在向日葵有一年大概80年代在1987左右的時候\n", + "Detected language: zh\n", + "在世界的拍賣市場賣到了10億台幣所以因此我們就很難理解\n", + "Detected language: zh\n", + "我是蔣蕈我們要在一系列的節目當中為大家介紹荷蘭最重要的一位畫家\n", + "Detected language: zh\n", + "藝術品怎麼會賣到這麼高這個部分我們當然可以知道藝術經紀公司\n", + "Detected language: zh\n", + "经济这两个字有点像仲介我们今天房屋有仲介那么其实股票里面也可能有仲介这种\n", + "Detected language: zh\n", + "就說其實有一個字是很適合用在這裡叫做炒作它是可以炒作的\n", + "Detected language: zh\n", + "他利用很多的商品准备行 count of sound with many methods把一个画家的作品比较良好把 offense of painting\n", + "Detected language: zh\n", + "從很低的價格,炒到很高的價格比如說我們說有一個公司,他可能看準這個年輕人還不錯\n", + "Detected language: zh\n", + "所以我就把它的话全部买下来用很低的价格包下来包下来以后我就开始制造各种新闻\n", + "Detected language: zh\n", + "甚至製造這個畫家的傳奇故事不斷地上媒體最後就可以把他的畫家找到\n", + "Detected language: zh\n", + "百倍甚至1000倍以上那麼事實上我們都知道凡古刺啟作為一個非常優秀的畫家\n", + "Detected language: zh\n", + "他的画后来也真的是被炒作不然我们很难理解小小一张向日葵\n", + "Detected language: zh\n", + "為什麼要賣到十億台幣就是任何人的勞力工作不一定要賣到十億\n", + "Detected language: zh\n", + "我們約略介紹了一下藩古之前建國了200年左右的荷蘭\n", + "Detected language: zh\n", + "所以這裡面就是經濟公司的問題所以販股很有趣的我們看到她十六十七歲的時候\n", + "Detected language: zh\n", + "因為經過他叔叔的介紹他就進了古比西這個最大的藝術競技公司\n", + "Detected language: zh\n", + "可是我觉得这里面很好玩的是帆古来自于非常虔诚的宗教家庭\n", + "Detected language: zh\n", + "我們說她的父親是母食,她的祖父是母食,她們家裏每一餐,餐前都要很虔誠的禱告。\n", + "Detected language: zh\n", + "他自己是一個一直在讀西都教聖經的虔誠的教徒我不知道大家有沒有感覺到這裡面的矛盾\n", + "Detected language: zh\n", + "一个虔诚的教徒当他进到一个最大的欧洲的艺术经济公司的时候\n", + "Detected language: zh\n", + "那個角色其實是蠻錯綜複雜的因為我們知道前塵的教徒\n", + "Detected language: zh\n", + "對我們來說是一個非常謙卑的生活非常樸素的生活\n", + "Detected language: zh\n", + "尤其基督教的原始道理是其實是指責人太奢華。\n", + "Detected language: zh\n", + "我想基督的訓示裡面是不讓人去炒作東西的\n", + "Detected language: zh\n", + "由荷蘭一直到差不多17世紀才脫離了西班牙的殖民地區\n", + "Detected language: zh\n", + "那何況說謊,或者是行銷的手法, 可能都不是基督教的原始信仰\n", + "Detected language: zh\n", + "可以容纳的可是偏偏的还有进到了一个这样的艺术经纪公司当他跟客户去推销一张画的时候\n", + "Detected language: zh\n", + "這個時候的梵谷到底應該要扮演什麼角色其實連我自己在讀她傳記的時候\n", + "Detected language: zh\n", + "我读到他16、7岁去做了一个这样的行业我都觉得非常的有趣\n", + "Detected language: zh\n", + "也可能引發我們非常多的思考我們在介紹反骨的最初的一個階段\n", + "Detected language: zh\n", + "就是她十六七歲剛剛成為一個入社會找工作的青年的時候\n", + "Detected language: zh\n", + "他就到了一个最大的欧洲的古比锡艺术经纪公司\n", + "Detected language: zh\n", + "我剛才已經提出了這樣的一個矛盾來自一個最虔誠的基督教家庭的犯蠱\n", + "Detected language: zh\n", + "他的第一個工作竟然是在一個最大的歐洲的經紀公司裏面去賣藝術品\n", + "Detected language: zh\n", + "那我剛才已經分析了,這兩個角色其實是很不相容的對於梵谷來講\n", + "Detected language: zh\n", + "可以成为一个独立的国家那么我们也特别介绍了荷兰的独立运动跟它的建国\n", + "Detected language: zh\n", + "我們覺得凡古的生命裡面一直有一個為神去服務的最大的熱情\n", + "Detected language: zh\n", + "因此我们看到他在艺术经济公司艺术经济公司表面看起来是在做美的工作\n", + "Detected language: zh\n", + "因為都是藝術品可是事實上不然因為這裡面很多的偽作很多假的作品\n", + "Detected language: zh\n", + "還有,其實范古當時賣的作品大部份是複製品就說,當時最好賣的畫家\n", + "Detected language: zh\n", + "比如说是法国的古典主义的一个画家 pegar安克尔安克尔 sont les potes安克尔是 enkyle红是法国大概在 19世纪初期 Enkyle\n", + "Detected language: zh\n", + "以及新古典主義裏面最紅的畫家因為他畫很美很美的裸女這些裸女很多都是希臘神畫裏的\n", + "Detected language: zh\n", + "这个皮肤都像丝绸一样的亮然后他们常常手上拿一个桃罐然后有水这样流下来\n", + "Detected language: zh\n", + "金色的常髮劈尖我想很多朋友去羅富宮可能都看過安格兒的作品\n", + "Detected language: zh\n", + "其實很少人會不喜歡安格爾因為安格爾他的作品太美了可是安格爾的作品裡面\n", + "Detected language: zh\n", + "它的唯美裡面有一點脫離現實就是你會覺得安格爾的話看多了以後\n", + "Detected language: zh\n", + "是跟当时的新基督教的思想格尔文教派有非常密切的关系。\n", + "Detected language: zh\n", + "你回到現實會發現怎麼現實生活裡沒有一個女人那麼漂亮因為她其實是美化了\n", + "Detected language: zh\n", + "就是你會看到它的世界裡面這些裸女、裸體的女子身體的漂亮\n", + "Detected language: zh\n", + "都到了已经完美到一点瑕疵都没有了\n", + "Detected language: zh\n", + "那当然,这一类的作品对于大众来讲,他们很容易喜欢。\n", + "Detected language: zh\n", + "也很容易我買一張掛在自己的家裡可是安格爾的話,新古典主義的寫詩\n", + "Detected language: zh\n", + "公立非常的高技巧非常好他畫一張畫要畫很久很久所以當然\n", + "Detected language: zh\n", + "他賣的畫也就比較貴我們知道畫家很久才有一件作品出來\n", + "Detected language: zh\n", + "慢工出細活那麼相對的這件作品也就是所謂的真品因為比較少有\n", + "Detected language: zh\n", + "所以價格就高了所以社會上需求安格爾化的人很多\n", + "Detected language: zh\n", + "就是有這個市場可是畫家出貨很少我用商業的語言來這樣解釋的話\n", + "Detected language: zh\n", + "而刚刚好,梵古的父亲、梵古的祖父都是格尔闻教排的牧师\n", + "Detected language: zh\n", + "就有人,用比较粗糙的方法,去陵磨它的话,看起来很像安格尔。\n", + "Detected language: zh\n", + "可是當你行家仔細看就會發現筆觸沒有那麽認真沒有那麽唯美 沒有那麽細\n", + "Detected language: zh\n", + "可是 遠遠看起來還是一個裸女也拿著一個桃罐也在倒水那金色的長髮披肩\n", + "Detected language: zh\n", + "所以就騙過了很多人我們看到反骨最早賣的就是這一類的複製品\n", + "Detected language: zh\n", + "所以我相信反古這個時候的工作他做得非常好,非常認真他剛開始在海牙的分公司\n", + "Detected language: zh\n", + "後來就調到了巴黎的分公司越調越大在他的位階上一直在升等\n", + "Detected language: zh\n", + "那么他就升到了伦敦的这个分公司所以他是一个非常成功的一个业务员\n", + "Detected language: zh\n", + "我们可以这样讲用现在的语言来讲就在经纪公司去卖话这件事它是业绩非常好的\n", + "Detected language: zh\n", + "我可以這樣來講反骨我不知道在記錄上我們看不到反骨\n", + "Detected language: zh\n", + "當時心理的矛盾跟掙扎因為我相信梵谷作為一個虔誠的基督徒以及它對生命的信仰\n", + ">>>> 09-03\n", + "Detected language: zh\n", + "所以他就覺得他要去做救贖的工作是要為這些人來做所以他就好像聽到了一個呼聲\n", + "Detected language: zh\n", + "因為根本食物都吃不飽然後就下去坑洞裡面去了\n", + "Detected language: zh\n", + "去挖煤礦可能14个小时以后才上来那那个时候欧洲没有什么社会福利\n", + "Detected language: zh\n", + "沒有什麼工作8小時 都是工作12小時到14小時那范古就覺得 自己很可恥\n", + "Detected language: zh\n", + "他覺得這個白色的領子一點都不是光榮這個白色的領子其實是一個恥辱\n", + "Detected language: zh\n", + "我們叫做白領階級那如果是勞工叫做藍領階級因為他們衣服髒髒的\n", + "Detected language: zh\n", + "那麼因此,梵谷在禮拜天我們知道禮拜天禮拜是因為要禮拜神的\n", + "Detected language: zh\n", + "那么基督教的信徒叫做主日这是主的日子上主的日子所以这天大家不工作\n", + "Detected language: zh\n", + "然後都到教堂來聽她講話可是範谷帶了一個白色的領圈站在講壇上看著底下\n", + "Detected language: zh\n", + "衣服單薄履爛的礦工的時候它講不出話來它會覺得它很虛偽\n", + "Detected language: zh\n", + "因為他覺得他講的基督的話其實沒有辦法真正幫助這些人所以我們看到梵谷到最後\n", + "Detected language: zh\n", + "他覺得他要去讀審學院我們知道返古從小是在牧師的家庭長大\n", + "Detected language: zh\n", + "他的行為幾乎讓你覺得好像瘋狂一樣我記得我們在青少年的時候\n", + "Detected language: zh\n", + "非常非常被他感動讀到這些片段的時候幾乎都讀不下去他就脫掉了他的慕斯的黑袍\n", + "Detected language: zh\n", + "拿掉了他的白色的領圈他就拿了一把鏟子到礦坑的洞口\n", + "Detected language: zh\n", + "這些礦工都被他嚇壞說牧師你來這邊幹嘛你應該在教堂裡面吃麵包、喝咖啡\n", + "Detected language: zh\n", + "他说我要跟你们一起到矿坑里面去他说我没有下过矿坑我不知道矿坑是什么样子\n", + "Detected language: zh\n", + "所以大家都觉得他疯了从来没有一个牧师一个知识分子会愿意去做这样的事\n", + "Detected language: zh\n", + "他就跟著這些人上了一個煤車因為販股的原因我從歐洲回來的時候\n", + "Detected language: zh\n", + "我就去了瑞芳喉洞我一根朋友嚇到旷坑我覺得我也要體會范谷做過的事情\n", + "Detected language: zh\n", + "我們知道他們那個礦工工作它是一個有點像鐵皮的車子\n", + "Detected language: zh\n", + "每个车子里面大概坐四个人然后就有一个缆车一样的东西吓到地洞去\n", + "Detected language: zh\n", + "他的祖父是牧師,爸爸是牧師他對神學是非常熟的,他那個聖經的語言\n", + "Detected language: zh\n", + "那剛開始你覺得還好因為那個空氣跟地面的空氣沒有差別可是我們知道這個\n", + "Detected language: zh\n", + "省所一直放放放,那個煤車一直下下下到差不多要四百公尺我下的地方都是四百公尺\n", + "Detected language: zh\n", + "可是我在讀專技的時候翻谷下凹的地方是 500 公尺到 600 公尺大家很難想像 500 公尺到 600 公尺\n", + "Detected language: zh\n", + "地底下,多麼熱,空氣有多麼誣捉然後有多麼的苦悶,然後有多麼的恐懼\n", + "Detected language: zh\n", + "因為隨時那個坑道會崩塌所以泛谷是真正去經歷這樣的生命\n", + "Detected language: zh\n", + "这个时候我们感觉到范谷的生命里面非常动人的东西跑出来了我们也知道为什么她不太能够忍受\n", + "Detected language: zh\n", + "在光鮮亮麗的藝術經紀公司裡工作因為它覺得\n", + "Detected language: zh\n", + "它要在這麼黑暗的坑洞裡感覺到人性的價值到底是什麼\n", + "Detected language: zh\n", + "我們提到了20幾歲的范谷在1878年到了比利時的玻里納基\n", + "Detected language: zh\n", + "以及這個礦工驅奪牧師的一段故事那麼這段經驗我想是\n", + "Detected language: zh\n", + "我們看他寫信的時候隨時就可以引用出來他根本就不要去翻聖經\n", + "Detected language: zh\n", + "返古生命里非常重要的部分它不在意薪水它不在意它\n", + "Detected language: zh\n", + "他是不是有正式的牧師身份他在意他是不是一個秤職的神的仆人\n", + "Detected language: zh\n", + "它讀《聖經》它非常喜歡《新約聖經》裡面有一部分叫做\n", + "Detected language: zh\n", + "使徒行傳。就是耶穌在定十字架以後,祂的徒們到四方去傳佈基督的語言。\n", + "Detected language: zh\n", + "他們要受到逮捕、酷刑虐待、尖進、屠殺的\n", + "Detected language: zh\n", + "的、危險去講神的語言。所以那個時候作為一個基督徒,可能不是今天做基督徒那麼容易的。\n", + "Detected language: zh\n", + "你必须要有多么大的信仰你才能够对抗所有环境的危险艰难\n", + "Detected language: zh\n", + "而去说神的语言所以范谷这个时候深刻地感觉到作为一个真正的信徒\n", + "Detected language: zh\n", + "他应该如何来走向他自己应该有的选择教会里面的人绝对不会鼓励他脱掉牧师的袍子\n", + "Detected language: zh\n", + "然后跟这些矿工一起坐煤车下到六七百公尺的\n", + "Detected language: zh\n", + "几乎是整部圣经可以倒背如流我们知道信仰并不等于神学\n", + "Detected language: zh\n", + "去挖煤他後來就變成了一個礦工了他就每天跟著這些礦工一起挖煤\n", + "Detected language: zh\n", + "然後他才知道為什麼他們每天咳嗽因為在那麼高熱的坑道裏面\n", + "Detected language: zh\n", + "那個沒煙沒灰全部布滿在他們的肺裏面然後他們幾乎是沒有什麽食物的\n", + "Detected language: zh\n", + "連水都很少所以,犯古開始知道說禮拜天他在講壇里講的話是多麼空洞\n", + "Detected language: zh\n", + "因為這些話 沒有辦法安慰這些真的在生活裡面受到這麼大壓迫的人然後他開始跟他們一起工作\n", + "Detected language: zh\n", + "變成一個礦工等到晚上他就在他們家裡一起吃飯這些礦工說\n", + "Detected language: zh\n", + "犯古牧師你為什麼不回到你的教堂你教堂裡面有很好的食物因為當時教會會配給牧師\n", + "Detected language: zh\n", + "是很好的食物厚厚的面包 厚厚的奶油可是他说不要我要跟你们一起吃\n", + "Detected language: zh\n", + "他才发现这些人除了马铃薯 和黑咖啡什么都没有他们的食物是这么简单的\n", + "Detected language: zh\n", + "而且吃不飽的所以犯蠱開始真正進到了波里納基以後進到了歐洲當時最窮困的這種社區\n", + "Detected language: zh\n", + "當然我們講神學的時候是說大概在歐洲的基督教的傳統後來把神學變成一個非常繁瑣的一個學問\n", + "Detected language: zh\n", + "我也要特別解釋因為當時歐洲沒有社會福利所以因此勞工沒有受到保障\n", + "Detected language: zh\n", + "那麼這些大的煤礦資本家把煤礦賣出去以後他們只拿一點點的錢來養活這些工人\n", + "Detected language: zh\n", + "所以等於是工人受到了最大的壓迫跟剝削那麼在這樣的一個狀況裡\n", + "Detected language: zh\n", + "我們看到整個的煤礦的礦區的安全設施也可能長期不做更新不做改善\n", + "Detected language: zh\n", + "所以常常發生礦災我們知道地底下六七百公尺的坑道會發生瓦斯爆炸的\n", + "Detected language: zh\n", + "經常發生瓦斯爆炸所以梵谷常常會從他的教堂衝出來然後去救助所有的\n", + "Detected language: zh\n", + "这些矿灾里面受灾的这些工人替他们爆炸因为社区里面竟然没有医生\n", + "Detected language: zh\n", + "所以这个时候我们就看到范古一步一步进到了社区感受到生命受到最大的困境的时候的那种痛苦的感觉\n", + "Detected language: zh\n", + "所以梵谷后来把他的教堂当成是旷灾以后的这些病人的收容室\n", + "Detected language: zh\n", + "因為社區裡根本沒有醫院也沒有護士也沒有醫生\n", + "Detected language: zh\n", + "如果你要做牧师,你要經過一層一層的考試大概比我們現在考公務員的高考\n", + "Detected language: zh\n", + "所以這些可能被壓斷了腿,壓斷了手的礦工范古就把他們抬到教堂\n", + "Detected language: zh\n", + "因為教堂是唯一寬闊的空間它就變成一個臨時的救難所他看到很多的血流不止的病人\n", + "Detected language: zh\n", + "他就把自己的衬衫撕成一條一條的幫他們去包紮然後這個時候他就發現說\n", + "Detected language: zh\n", + "這些礦工的太太們或者是親戚們他們就彼此在幫助然後他們也跟梵谷講說\n", + "Detected language: zh\n", + "牧師你知道 只有窮人幫助窮人他說這樣的災難\n", + "Detected language: zh\n", + "隔一段時間就會發生可是沒有人去改善這個環境\n", + "Detected language: zh\n", + "也沒有人在意他們的受傷或者死亡\n", + "Detected language: zh\n", + "有很多人就是死亡了所以范古在這樣的狀況裡深刻地體會到所謂的信仰的價值是什麼\n", + "Detected language: zh\n", + "也知道说基督当年留下的许许多多的训示真正的原来的意义是什么\n", + "Detected language: zh\n", + "可是很可能已經被教會所改變了我自己跟很多朋友提到\n", + "Detected language: zh\n", + "普考还要困难因为你必须具备什么拉丁文希拉文很多很多繁琐的这一东西\n", + "Detected language: zh\n", + "我當初在讀中學時 讀了\n", + "Detected language: zh\n", + "讀到這段時候 熱淚銀框的記憶就是有一次巨大的曠災之後\n", + "Detected language: zh\n", + "梵谷看到了這麼多的無依無靠的工人他就回到他自己的教堂\n", + "Detected language: zh\n", + "把它僅有的食物、麵包、面粉以及它的衣服,全部拿出來。\n", + "Detected language: zh\n", + "一份一份分給當時受災的這些工人就分到他們家自己一無所有\n", + "Detected language: zh\n", + "就是全部都沒有 所以因此我想這是我們應該要瞭解的反骨\n", + "Detected language: zh\n", + "范古如果后来变成一个了不起的伟大的画家我觉得这个时候我们已经看到她生命里面\n", + "Detected language: zh\n", + "但有非常奇特的別人沒有的一種狂熱的精神只是他現在表現得不是在藝術上\n", + "Detected language: zh\n", + "而是在 宗教上我們談到了1878年梵谷在玻利娜集\n", + "Detected language: zh\n", + "比利時的這個最窮困的礦區自己所歷練出來的一種偉大的生命\n", + "Detected language: zh\n", + "而且你要懂得仪式这些部分因此所以我们也看到凡古又面临到一个矛盾\n", + "Detected language: zh\n", + "我覺得有一段是非常動人的故事就在礦災之後他變成了一個礦工\n", + "Detected language: zh\n", + "他去帮助所有的这些受伤的灾民然后跟他们吃一样的食物\n", + "Detected language: zh\n", + "每天拿着铁铲下到礦坑里去挖煤然后这个时候他做牧师的爸爸来看他了\n", + "Detected language: zh\n", + "從很遠很遠的地方轉了好幾道車因為這個地方太窮了根本沒有什麼交通到這裡來\n", + "Detected language: zh\n", + "他爸爸来了然后爸爸到了教堂到处找他的儿子他爸爸写信给他弟弟迪奥说\n", + "Detected language: zh\n", + "我已经不认得我的儿子了因为他没有办法想象他的儿子做了牧师\n", + "Detected language: zh\n", + "怎么变成一个工人这个时候衣衫蓝绿的反骨这个时候满脸胡子的反骨\n", + "Detected language: zh\n", + "然後臉瘦得不像話地反骨我有一個印象我覺得定在十字加上的基督是這個樣子的\n", + "Detected language: zh\n", + "就是因為他擔負了當時所有人的苦所以他其實不是一個\n", + "Detected language: zh\n", + "光鮮亮麗的牧師的樣子所以我覺得這句話是最動人他爸爸跟別人說\n", + "Detected language: zh\n", + "這個矛盾是說他多麼渴望做一個不道的人因為他曾經在倫敦的時候去做義工\n", + "Detected language: zh\n", + "我竟然找不到我的兒子因為他的兒子其實已經變成了一個礦工\n", + "Detected language: zh\n", + "那么因此我想这个部分我觉得是泛谷最重要的一个喜礼\n", + "Detected language: zh\n", + "我們說她在16、17歲的時候進到古筆戲藝術公司她訓練了藝術上的知識\n", + "Detected language: zh\n", + "可是這一次在伯里納吉的礦工作牧師是真正生命的洗禮如果有一天他要走到藝術創作上\n", + "Detected language: zh\n", + "我們知道藝術創作真正重要的不是技巧是對生命的愛\n", + "Detected language: zh\n", + "在藝術史上所有留下名字的大藝術家都是因為他對生命有超乎常人的愛\n", + "Detected language: zh\n", + "那個燃燒的光亮才會使人動人所以梵谷這個時候 表現的正是一個\n", + "Detected language: zh\n", + "最狂熱的宗教情操牠是身體力行者\n", + "Detected language: zh\n", + "基督的語言所以我常常會覺得以梵谷這樣的例子來看\n", + "Detected language: zh\n", + "一個被神學院排斥在外的年輕人\n", + "Detected language: zh\n", + "这里是IC之音FM97.5您现在所收听的是美的诚司\n", + "Detected language: zh\n", + "到了一個很窮困很窮困的鄉下去做義工然後當時他就臨時代替一個可能\n", + "Detected language: zh\n", + "其實它是真正基督的僕人,看到西方在文學裡\n", + "Detected language: zh\n", + "常常在講這樣的話說我們說21世紀耶穌從來人間了\n", + "Detected language: zh\n", + "然後祂在我們的面前不曉得大家能不能認得出祂所以我的意思是說梵谷非常像耶穌重來人間\n", + "Detected language: zh\n", + "他非常想寄賭重來人間可是他不知道大家覺得他這個瘋子因為當時的人都覺得說\n", + "Detected language: zh\n", + "明明有這麼好的生活可以過明明你可以坐在教堂裡面養尊處优你只要禮拜天講一些美麗的話\n", + "Detected language: zh\n", + "帶大家唱唱盛詩就好了你幹嘛要這麼哭我覺得這裡反而是我們在讀飯谷的專輯的時候\n", + "Detected language: zh\n", + "我覺得最動人的部分因此我們看到范古後來被教會開除了\n", + "Detected language: zh\n", + "這是大家絕對意想不到的結果開除的原因是因為\n", + "Detected language: zh\n", + "太不像一個牧師了因為我們剛才講過教會有它教會的制度\n", + "Detected language: zh\n", + "教會的制度是認為一個牧師是社區裡面的知識分子他有一個典範性的作用\n", + "Detected language: zh\n", + "不在的牧師去佈道他說他一站上講台他看著那底下非常窮苦的一些人\n", + "Detected language: zh\n", + "他必须手指头干干净净然后戴着白色的领圈站在讲台上讲很漂亮的话就好了\n", + "Detected language: zh\n", + "也許范固覺得這樣的牧師只是一個虛偽的角色他覺得牧師是應該\n", + "Detected language: zh\n", + "能夠像基督一樣承擔人間最大的苦難的人所以因此這裡面就發生了一個衝突\n", + "Detected language: zh\n", + "范古後來被教會開除了是他一生最低潮最沮喪的時刻\n", + "Detected language: zh\n", + "那麼在這個之前,我們知道泛谷因為自己跟礦工在一起\n", + "Detected language: zh\n", + "所以它常常述写了很多矿工因为它在艺术经纪公司受到的训练\n", + "Detected language: zh\n", + "他就用碳筆 畫了很多的礦工那這一批作品其實是大家現在\n", + "Detected language: zh\n", + "比較不知道的反顧是他最早期在一些很簡單的\n", + "Detected language: zh\n", + "紙張上畫出來的東西我曾經在甫普斯特丹的反骨博物館\n", + "Detected language: zh\n", + "以及另外一個庫拉姆勒的返古博物館看到這一批作品那麼我覺得是非常動人的作品\n", + "Detected language: zh\n", + "他跟他們在講聖經的道理的時候他覺得他全身都在發光發熱我想這個部分當然也可以從心理學上來講\n", + "Detected language: zh\n", + "因為販股看到這些礦工每天挖煤挖煤以後長期的人在眾勞動當中\n", + "Detected language: zh\n", + "它的肢体会变形指节会变得很大那个手指会变成不像人的手指\n", + "Detected language: zh\n", + "然后因为不断的铲霉然后去扛那个霉所以他们的背全部都是弯的\n", + "Detected language: zh\n", + "都是駝背的然後那個臀部會變得很大然後整個身軀會變形那麼這些畫作\n", + "Detected language: zh\n", + "當時范谷有一次拿給他們家族裏面有一個蠻成名的他的堂哥\n", + "Detected language: zh\n", + "一個藝術家看後來被教會開除以後他就很想走藝術創作的路\n", + "Detected language: zh\n", + "他能不能做一個畫家做畫家雖然不像牧師是他第一選擇可是他覺得至少\n", + "Detected language: zh\n", + "可以用繪畫來表達這些礦工的痛苦所以它就想做畫家\n", + "Detected language: zh\n", + "他就拿他畫的礦工的畫給他的這個堂哥看這個堂哥當時已經小有名氣的畫家了\n", + "Detected language: zh\n", + "這個堂哥看了以後就有點為難地跟他說我覺得你還是不要畫畫,你完全不懂解剖學\n", + "Detected language: zh\n", + "梵谷有一个很奇特的热情这个热情是当她觉得她跟需要她的人去讲话的时候\n", + "Detected language: zh\n", + "解剖学是什么就说今天如果有一个画班美术系 suitable\n", + "Detected language: zh\n", + "然后我们来素描那我们知道通常请的模特都是那种三维很好身材很漂亮的\n", + "Detected language: zh\n", + "所以他講的解剖學就是說他覺得返古劃的很多人體不合那個解剖學的比例\n", + "Detected language: zh\n", + "可是返古回家以後在日記裡面講了一些話我覺得是非常值得我們今天從事美術工作的人參考的\n", + "Detected language: zh\n", + "他說, 雖然我的堂哥這樣子勸誡我、警告我說我不適合做畫家\n", + "Detected language: zh\n", + "可是我想起来我跟这些矿工在一起我自己也亲自挖过霉它们的身体\n", + "Detected language: zh\n", + "的的確確真的是這個樣子的他説他們不可能是那些割星的身體\n", + "Detected language: zh\n", + "它不可能是摩托兒的身體走身載台的身體他們的身體在長期的辛苦的勞動裡面\n", + "Detected language: zh\n", + "已经变形了所以因此我想这个时候我们就看到 为什么返古后来会变成一个好的画家\n", + "Detected language: zh\n", + "而他的堂哥没有变成一个好的画家因为永远在画光鲜亮丽的模特的画家\n", + "Detected language: zh\n", + "他整個人是在非常亢奮的狀態我們幾乎覺得他好像被甚麼東西附身一樣他可以講出最美麗的語言\n", + "Detected language: zh\n", + "不会变成好画家真正面对生活面对人的真实才会变成好的画家\n", + "Detected language: zh\n", + "美得沉思我是蒋训\n", + "Detected language: zh\n", + "那也據說,很多人認為凡古在步道的時候是能夠非常打動底下聽講的這些人的\n", + "Detected language: zh\n", + "因爲他是全心全意在部道是不是我剛剛提到說\n", + "Detected language: zh\n", + "信仰并不一定等于神许小时候可能因为信仰我们会接触到神父 牧师\n", + "Detected language: zh\n", + "甚至佛教的出家人可是有時也會有點失望你會覺得你心裡對那個宗教\n", + "Detected language: zh\n", + "最渴望的一種誠懇跟接觸到神職人員不管任何一個宗教的神職人員\n", + "Detected language: zh\n", + "我是蔣徐我們在談到返古的藝術經濟的部分\n", + "Detected language: zh\n", + "你會覺得他也像一個公務員他就有一點暗部就班在做事所以我記得我小時候去某些教堂做禮拜\n", + "Detected language: zh\n", + "後來大一點受天主教的靈犀有些神父跟牧師也讓我失望就覺得他們好像只是\n", + "Detected language: zh\n", + "把一个事情办完就算了可是我们对信仰的感觉是应该多一点的\n", + "Detected language: zh\n", + "覺得他應該要多一點所以范古那個時候想要進神學院他就很辛苦的去準備幾何學、數學\n", + "Detected language: zh\n", + "代數 各種的課程因為那個考試非常難我們知道西方在長期以來\n", + "Detected language: zh\n", + "建立了一个传统,这个传统就是基督教的牧师在他的社区里面是有很高的地位的\n", + "Detected language: zh\n", + "所以他不只是一個牧師,不只是講基督的語言的人他其實也代表了社區裡面的某一個知識分子的典範\n", + "Detected language: zh\n", + "神学院考试要这么难是因为我们知道考取牧师以后他就有个白色的领子\n", + "Detected language: zh\n", + "這個白領子代表是你是社會的某一個階級你不用勞動 別人要種田\n", + "Detected language: zh\n", + "要去做功你不用,你就是講耶穌的道理就可以了\n", + "Detected language: zh\n", + "特別介紹了泛古家族他們曾經有一個傳統就是做藝術經濟工作\n", + "Detected language: zh\n", + "它也变成一种职业而且基本上也是保障很好的一种职业所以因此我们大概就看到说\n", + "Detected language: zh\n", + "翻古希望做的牧師是一個他心靈裏面像釘在十字架上的基督一樣的那個牧者\n", + "Detected language: zh\n", + "可是神學院訓練的一些學生並不完全是如此所以我覺得這裡面又產生了一個矛盾\n", + "Detected language: zh\n", + "就是反骨這麼用功的為了考神學院去讀各種的書\n", + "Detected language: zh\n", + "可是我们看到范古1878年 他的梦想完全落空\n", + "Detected language: zh\n", + "因為他考阿姆斯特丹神學院 落選我們覺得很有趣就是\n", + "Detected language: zh\n", + "范古這樣的一個人 他當時的畫他作為畫家 他的畫是被別人批評的\n", + "Detected language: zh\n", + "認為他畫畫畫得很差很差然後他想做牧師神學又考不取\n", + "Detected language: zh\n", + "所以我們會覺得這個人在很多地方年輕的時候他嘗試了各種的奇怪的失敗他做藝術經紀公司又做得很成功\n", + "Detected language: zh\n", + "可他又不願意去做那個工作所以因此我們看到返古其實有一個部分是非常\n", + "Detected language: zh\n", + "虽然我们一直强调他其实在艺术经济工作方面做得非常的成功可是有一个声音好像一直在叫他\n", + "Detected language: zh\n", + "誠懇在面對自己不知道那個神學院的考試會不會有時候也像我們今天\n", + "Detected language: zh\n", + "很多制度化的東西我要講的制度化是說一個真正誠懇的人\n", + "Detected language: zh\n", + "一个充满了梦想和狂热的人他其实是没有办法适应制度的\n", + "Detected language: zh\n", + "曾經在台灣有一個離島就是蘭嶼那當我70年代到那邊去\n", + "Detected language: zh\n", + "遊玩的時候 偶然就碰到了一個離島上的志願的醫生\n", + "Detected language: zh\n", + "她是受過醫學訓練然後她說她看到藍芋沒有醫生所以她就志願到那邊去做了醫生\n", + "Detected language: zh\n", + "那麼他感動了我我當時寫了整個的報導就是一個願意在那邊過很苦的日子\n", + "Detected language: zh\n", + "然後為藍羽的達五族人做醫療工作的一個人她其實是香港的喬申\n", + "Detected language: zh\n", + "並不是臺灣人當時想到制度的問題如果我們今天變成一個制度就是我們今天要經過很嚴格的醫學的考試\n", + "Detected language: zh\n", + "一層一層的學位,最後有一個醫生要派到蘭嶼去,可這個醫生可能不願意去蘭嶼。\n", + "Detected language: zh\n", + "我觉得那个声音是他童年开始听他的父亲步道的基督教的声音\n", + "Detected language: zh\n", + "他派去他有取得了這個資格他到蘭嶼後他覺得很倒霉我為什麼要到蘭嶼去做醫生\n", + "Detected language: zh\n", + "所以他大概从头到尾也不认真因为心不甘情不怨所以这里面我们就看到一个有趣的东西\n", + "Detected language: zh\n", + "就是说范古如此想要去做牧师去服务于最穷苦的人可是他考不起三学院\n", + "Detected language: zh\n", + "所以這樣的問題,我們接下來會討論到梵谷最後怎麼去\n", + "Detected language: zh\n", + "毅然决然走向他自己步道的这条路其实我自己在青少年的时候\n", + "Detected language: zh\n", + "我讀犯古傳大概讀到最動人的部分也就是1878年\n", + "Detected language: zh\n", + "沩潦翻古神學院摩臘一個失敗的階段我們看到一個充滿了宗教狂熱的生命\n", + "Detected language: zh\n", + "這麼想要去最窮困的社區去為人福因為它絕對是最有價值的工作\n", + "Detected language: zh\n", + "可是結果他考不起神學院范谷這樣的人他並沒有放棄他就開始寫信給他所有認識的社群牧師\n", + "Detected language: zh\n", + "因为她父亲是社区牧师所以他有很多的管道可以认识这些人他就不断写信给他们\n", + "Detected language: zh\n", + "基督的声音所以他决他要去做神学他在艺术经纪公司里看到了最华丽的艺术品\n", + "Detected language: zh\n", + "希望這些人可以幫助他所以這些人也就跟他做了一些介紹\n", + "Detected language: zh\n", + "有些是因為他父親的關係有些是因為被他的性感動了覺得這個年輕人是真的要為神服務的人\n", + "Detected language: zh\n", + "而不是只是把神职当成职业的人我想这两个差距很大所以他们就介绍它去了一些很穷困的地方\n", + "Detected language: zh\n", + "比如說如果在倫敦、巴黎、亞姆斯特丹這種大城市當然牠們要有很好的資格的牧師\n", + "Detected language: zh\n", + "我的意思是說,就像我剛剛舉的例子今天你取得了最好的醫學上的資歷\n", + "Detected language: zh\n", + "你可能就派到最好的大醫院服務可是我們看到最窮困的偏遠地區\n", + "Detected language: zh\n", + "可能就是資歷比較弱的人所以范古當時想要去布道可是他沒有取得資格\n", + "Detected language: zh\n", + "因為他神學院都沒有考取所以他只能去那種最邊緣就是沒有人要去的\n", + "Detected language: zh\n", + "神職人員都不要去的地方所以他就短期去了倫敦郊外的愛爾瓦茨\n", + "Detected language: zh\n", + "在阿爾华茨那邊他做了一些步道那麼後來有一個很特別的機會\n", + "Detected language: zh\n", + "然後來買畫的人,都是穿著非常好的有錢人番蒲在下了班以後\n", + "Detected language: zh\n", + "他就到了比利時我想比利時大家聽到的名字可能是布魯塞爾\n", + "Detected language: zh\n", + "這種大城市可是她去的不是布魯塞爾她去了一個我相信在東方很少人聽過的一個地方\n", + "Detected language: zh\n", + "這個地方我去過\n", + "Detected language: zh\n", + "它其實很像台灣的...瑞芳我不知道大家有沒有印象...\n", + "Detected language: zh\n", + "早期台灣的瑞芳就是煤礦區或者比瑞芳還要小的我自己去過的喉洞\n", + "Detected language: zh\n", + "就是在基隆河谷的喉咚那么這種煤礦區都是最窮困的\n", + "Detected language: zh\n", + "礦工住的地方那凡古當時就去了玻利那杞去了以後 他是牧師\n", + "Detected language: zh\n", + "他沒有牧師的資格因為他沒有取得神學院的入學資格甚至也沒有畢業的資格\n", + "Detected language: zh\n", + "所以它等於只是一個代理牧師可是因為這種礦工的地方太窮了所以沒有牧師要去\n", + "Detected language: zh\n", + "所以就讓這種沒有資格的人去做了代理牧師可是他還是代表教會因此他就穿著牧師的黑袍\n", + "Detected language: zh\n", + "我還是會看到街頭有很多窮困的人窮苦的人這些在大城市裡面三餐無以為繼的這些人民\n", + "Detected language: zh\n", + "有一个白色的领圈然后当然一个小小的矿工社区\n", + "Detected language: zh\n", + "會有一個教堂一個高高的尖頂去過歐洲人都知道任何一個小鎮村落\n", + "Detected language: zh\n", + "你抬頭就會看到有個十字架的一個教堂那其它的房子又低又矮\n", + "Detected language: zh\n", + "里面揭满了穷苦的矿工翻股走进去觉得都发臭的那个感觉\n", + "Detected language: zh\n", + "只有她自己住的教堂就是漂亮的白色的房子因為教會代表了一個最高的地位\n", + "Detected language: zh\n", + "可是梵谷就开始觉得不对了因为他比谁都守堵圣经他知道圣经基督的语言是说\n", + "Detected language: zh\n", + "如果你是一个部道者,你是要担负所有人的最大的苦的。\n", + "Detected language: zh\n", + "這個被稱為基督的生命他是讓自己的身體釘在十指甲上的\n", + "Detected language: zh\n", + "它受了比所有人受得更多的苦那麼這個時候樊古就會懷疑說我如果是個牧師\n", + "Detected language: zh\n", + "我每天看到这些矿工大早就拿着一个铲子整个脸上一点精神都没有\n", + ">>>> 09-04\n", + "Detected language: zh\n", + "談到很多的畫家比如說凱文西及米克蘭基羅\n", + "Detected language: zh\n", + "你可以幫大家解決很多知識的困惑你可以幫大家解決很多生活的困難\n", + "Detected language: zh\n", + "大家自然就尊敬你那麼尊敬你他就很容易來信教所以我們就可以瞭解到\n", + "Detected language: zh\n", + "大概在歐洲的社區的牧師都具備這樣的一個角色其實到現在\n", + "Detected language: zh\n", + "有時候我在歐洲的很多小鎮、鄉村你還是可以看到這種狀況\n", + "Detected language: zh\n", + "就是社會上有地位的德高望重的紳士階級\n", + "Detected language: zh\n", + "基本上常常是牧師他要扮演社區裡面\n", + "Detected language: zh\n", + "這種有點像中國古代的那種紳士階級的這種身份所以梵谷當時\n", + "Detected language: zh\n", + "苦讀要考神學院,對他來講是一個很大很大的折磨\n", + "Detected language: zh\n", + "因為這個人充滿了熱情可是他在知識性的追求上恐怕並不是一般的學院裡面\n", + "Detected language: zh\n", + "很好的一個典範我們可以看他從小讀書讀的都不是很出色\n", + "Detected language: zh\n", + "我們發現他們都是意大利人也就是說在文艺復興的時候有一個開始慢慢反基督教的傳統\n", + "Detected language: zh\n", + "如果在今天我相信她也很可能是大專聯考都考不取的這樣的人\n", + "Detected language: zh\n", + "就是他會覺得如果是一個只是為了拿學位為了考試 為了分數\n", + "Detected language: zh\n", + "他覺得沒有意義他基本上很喜歡讀聖經是因為他覺得聖經能夠幫助他去救人\n", + "Detected language: zh\n", + "去幫助窮人所以他是一個在情感上很務實的一個人\n", + "Detected language: zh\n", + "我們可以說這樣的典範是說它寧可相信知識是一個信仰的力量\n", + "Detected language: zh\n", + "我們今天也看到社會上很多知識分子把知識當成學問\n", + "Detected language: zh\n", + "當成學位或者是分數那麼其實跟他的行為中間\n", + "Detected language: zh\n", + "會有一個脫離的狀況所以因此古代的時候我們常常覺得他這個人他是一個知識分子\n", + "Detected language: zh\n", + "那麼同時表示他的道德一定有一個高標準可是今天常常會覺得這兩個東西是分開的\n", + "Detected language: zh\n", + "他可能是拿了很高的學歷、學位可是在道德行為上可能有很大的落差\n", + "Detected language: zh\n", + "我們叫做文藝復興而這裡面誕生的畫家大部分都在南方的意大利\n", + "Detected language: zh\n", + "那范古当然很不能忍受这种知与行之间的落差\n", + "Detected language: zh\n", + "整個準備知識的這個考試的過程當中失敗了那麼也被神學院\n", + "Detected language: zh\n", + "排斥在入学系统之外那么也表示说它不可能做一个\n", + "Detected language: zh\n", + "有資格的牧師因為他沒有取得這個資格因此他才在1878年的冬天\n", + "Detected language: zh\n", + "去做了一個有點像帶離牧師這樣的身份到比利時的礦工的區域去\n", + "Detected language: zh\n", + "所以我想这些部分也是我们知道范谷在当时 后来终于拿起了\n", + "Detected language: zh\n", + "谈笔拿起了鉛筆画还是不是为了做画家他只是觉得他眼前的矿工\n", + "Detected language: zh\n", + "生活簡直連牛馬都不如他覺得要做歷史的見證他想要記錄起\n", + "Detected language: zh\n", + "他们生活的一些状况那么用这样的角度去画画\n", + "Detected language: zh\n", + "我今天說有一個人很喜歡畫畫去讀了美術系畫畫我想動機\n", + "Detected language: zh\n", + "後來可能影響到西班牙,影響到法國可是有一個屬於我們叫做北方畫派的\n", + "Detected language: zh\n", + "就開始就是不一樣為什麼番古的話動人我覺得裡面有一種對人的關係\n", + "Detected language: zh\n", + "所以因此我们常说今天很多人在学美术可是为什么他们的话没有感动我因为那些话里面\n", + "Detected language: zh\n", + "可能沒有對人的關系我想也許大家可以在這裏去分辨一下\n", + "Detected language: zh\n", + "梵谷跟一般画家的差别到底在哪里我们谈到了1878年\n", + "Detected language: zh\n", + "初冬的时候范古到了比利时的波里纳基\n", + "Detected language: zh\n", + "非常穷困的礦工區那麼這個礦工區\n", + "Detected language: zh\n", + "因為窮困到連飯糊他都覺得他自己很陌生\n", + "Detected language: zh\n", + "因爲犯古至少從小在一個牧師家庭長大大概溫飽不成問題\n", + "Detected language: zh\n", + "就是從小長大他也不是富有的家庭可是大概總是有食物吃也總有\n", + "Detected language: zh\n", + "而且我們知道在歐洲因為牧師的地位是被尊敬的\n", + "Detected language: zh\n", + "北方是現在熱爾曼、德國、荷蘭、比利時\n", + "Detected language: zh\n", + "所以如果在一個鄉村裡面有一個牧師那麼這些農民不管自己生活再苦\n", + "Detected language: zh\n", + "他們一定會把固定的一些食物 跟固定的這些衣服\n", + "Detected language: zh\n", + "買了什麼服務拿來給牧師的所以牧師等於是受供養的人就是因為他是在傳教是....\n", + "Detected language: zh\n", + "所以老百姓会不断地给他们比较好的物质上的保障\n", + "Detected language: zh\n", + "我也可以说泛谷其实是在一个物质比较不缺乏的状况里长大的可是到了\n", + "Detected language: zh\n", + "而布里納基以後恐怕是她第一次看到歐洲這麼悲慘的 礦區\n", + "Detected language: zh\n", + "人可以生活在這麼瓶並交迫的狀況,這樣子沒人照顧。\n", + "Detected language: zh\n", + "人可以這樣子的長期的勞動勞動到最後整個肺部都發生問題\n", + "Detected language: zh\n", + "所以返古那个时候,他所记录下的日记以及他\n", + "Detected language: zh\n", + "我給弟弟迪奧的信上所做的非常詳細的描述我覺得是\n", + "Detected language: zh\n", + "當時可能連這些國家的名字都還沒有這個隆統的廣義的所謂的北方化派\n", + "Detected language: zh\n", + "在十九世紀歐洲最了不起的社會史的一個見證因為我們幾乎都\n", + "Detected language: zh\n", + "不知道有人曾經這樣子被剝削就是工作可以到19碼\n", + "Detected language: zh\n", + "甚至16小時還餵不飽自己所以因此他的那個描述說他早上\n", + "Detected language: zh\n", + "常常很好奇的站在礦坑的洞口看到那些礦工\n", + "Detected language: zh\n", + "他覺得這礦工很奇怪,怎麼年紀都還不大看起來就已經是\n", + "Detected language: zh\n", + "非常衰老的樣子他也覺得好奇為什麼這些礦工這麼瘦\n", + "Detected language: zh\n", + "然后面孔都是发青的然后整个背是弯折\n", + "Detected language: zh\n", + "因為他們長期在礦洞裡面根本是站不直腰的\n", + "Detected language: zh\n", + "都非常的低矮然后闷在里面所以整天腰是弯折如果十几个小时在那边铲眉的话\n", + "Detected language: zh\n", + "那個身體的形狀都改變了所以范古這個時候用文字做的非常非常\n", + "Detected language: zh\n", + "那麼指的是說,一直到了14世紀、15世紀、16世紀\n", + "Detected language: zh\n", + "詳細的記錄可是他覺得文字不夠他希望能夠用視覺上\n", + "Detected language: zh\n", + "很強的方法捕捉著這些人的一種非人的生活的面貌\n", + "Detected language: zh\n", + "所以這個時候他想到畫畫了他用鉛筆、用碳筆、用最簡單的材料\n", + "Detected language: zh\n", + "因為我們知道他那個時候也沒有能力去買什麽漂亮的畫布 油畫顏料\n", + "Detected language: zh\n", + "這種比較貴的材料它就用最簡單的碳筆我們知道什麼叫碳筆\n", + "Detected language: zh\n", + "碳筆就是用煤炭的碳做成的繪畫工具我相信我看到范國文\n", + "Detected language: zh\n", + "這個時期用碳筆做的素描有一種很大的感動因為他畫的主題\n", + "Detected language: zh\n", + "人物 全部是礦工而且礦工就是在挖煤的他們把地底下\n", + "Detected language: zh\n", + "這些積壓出來的一種樹木的遺留下來的化石挖出來\n", + "Detected language: zh\n", + "然後給予人間很多的溫暖那翻谷這個時候也感覺到沒太多的溫暖\n", + "Detected language: zh\n", + "在意大利在南方已經發展出了文藝復興已經開始對中古世紀這種很傳統的\n", + "Detected language: zh\n", + "這個東西變成了一個有趣的象征它說煤,炭這麼黑,這麼醜陋的一種物質\n", + "Detected language: zh\n", + "可是卻帶給人們光明 帶給人溫暖冬天的時候帶給人熊熊的火光\n", + "Detected language: zh\n", + "可他同時又講說,這些礦工長的就像煤炭一樣,黑黑的....\n", + "Detected language: zh\n", + "髒髒的、醜醜的可是他們長時間的挖煤把煤挖出來\n", + "Detected language: zh\n", + "以後提供給城市裡面的有錢的人買去以後作為冬天\n", + "Detected language: zh\n", + "取暖的燃料可是它們自己冬天是冷得不得了是沒有火光的\n", + "Detected language: zh\n", + "在一個寒冷的房子裏根本沒有溫暖他們的東西\n", + "Detected language: zh\n", + "这个时候开始拿起笔来画这些矿工的时候我觉得里面这个动机\n", + "Detected language: zh\n", + "非常值得我們思考我們一再強調許多喜歡美術的朋友\n", + "Detected language: zh\n", + "是因為美而開始畫畫的可是泛古也許不是是因為他看到了生命裡面\n", + "Detected language: zh\n", + "很保守的基督教信仰开始有怀疑的时候\n", + "Detected language: zh\n", + "最悲哀的、最痛苦的畫面它想做一個記錄想做一個歷史上的見證\n", + "Detected language: zh\n", + "那么究竟要见证什么他自己也可能讲不清楚他只觉得这样的生命\n", + "Detected language: zh\n", + "給予他很大的感動這樣的一種沈重的勞動這樣的一種\n", + "Detected language: zh\n", + "一些這種沉重的勞動裡面的沉默沒有怨言從來不去抱怨薪水太少\n", + "Detected language: zh\n", + "從來不會想到要抗爭就是去一肩擔負起所有工作裡面\n", + "Detected language: zh\n", + "最辛苦的勞動而同時又把這些東西用來養活\n", + "Detected language: zh\n", + "一大家子的人照顾他们的妻子父母儿女\n", + "Detected language: zh\n", + "牧師可能躲在窗口看到屋子裡面一家人\n", + "Detected language: zh\n", + "在吃著非常少的一點點食物然後身上沒有足夠的溫暖的衣服\n", + "Detected language: zh\n", + "寒风里面在发抖的样子而他们的房子可能就是简单的几个\n", + "Detected language: zh\n", + "很奇特的是在北方画派这些画家当中他们还坚信不疑基督教的信仰\n", + "Detected language: zh\n", + "木板定出來的一個簡陋的房子根本連冬天的寒風都擋不住的\n", + "Detected language: zh\n", + "這個時候他會覺得為什麼有一群人是過這樣的生活的而這一群人\n", + "Detected language: zh\n", + "不就是聖經裡面講的所謂窮人嗎?那作為一個基督徒,不正是應該去\n", + "Detected language: zh\n", + "幫助這一類的窮人 去救助這一類的窮人嗎如此他回到了自己的教堂\n", + "Detected language: zh\n", + "裡面有著很豐盛的食物麵包裡面有著很溫暖的暖氣\n", + "Detected language: zh\n", + "他覺得不安 因為他覺得 他好像不是一個真正的\n", + "Detected language: zh\n", + "很層次的牧師,不是一個真正有信仰的基督徒,因為有信仰的基督徒不應\n", + "Detected language: zh\n", + "現在應該看到這樣的悲慘畫面而自己不做任何的幫助\n", + "Detected language: zh\n", + "這個時候他要去畫這些礦工的時候我覺得是他自己內在的道德裡\n", + "Detected language: zh\n", + "巨大的靈魂的呼喚使他要做很深的反省他要反省他自己\n", + "Detected language: zh\n", + "這裡是IC之音FM97.5您現在所收聽的是美等沉思\n", + "Detected language: zh\n", + "所以我想這一點可能是一般朋友比較不容易理解的\n", + "Detected language: zh\n", + "究竟怎么去面对这一群人所以我觉得反古化旷公\n", + "Detected language: zh\n", + "關於風化窮人的這一批的素描一直是我非常感動的作品\n", + "Detected language: zh\n", + "跟學院繪畫完全不同的一種表現方法他不在意技巧\n", + "Detected language: zh\n", + "他在意如何誠實地畫下他所看到的人的生活面貌\n", + "Detected language: zh\n", + "我們特別把泛谷在比利時的柏里那區做礦工牧師這個階段\n", + "Detected language: zh\n", + "全世界我們從祂的信仰到祂的混亂 做較多的陳述\n", + "Detected language: zh\n", + "让他在玻利纳基待的时间并不长1878年的初冬他到这个地方\n", + "Detected language: zh\n", + "他當做礦工母師1879年7月他的聘書就滿了\n", + "Detected language: zh\n", + "因为他当时只是一个代理的身份所以他并不是正式牧师这个教会就跟他签了一个约会\n", + "Detected language: zh\n", + "這個約大概接近...不到一年所以七月就是約嘛那我們知道...\n", + "Detected language: zh\n", + "比如說我們聽到了格爾文教派我們特別提到格爾文教派在當時\n", + "Detected language: zh\n", + "知道冤满就应该要续聘就是你继续做牧师而且帆古大概也觉得它自己做得很好\n", + "Detected language: zh\n", + "他在做牧師的過程當中他把教堂椅子都拆掉\n", + "Detected language: zh\n", + "有礦災的時候受傷的工人能夠搬到教堂變成一個臨時的醫院\n", + "Detected language: zh\n", + "就趁這個全部撕成一條一條幫他們去包紮傷口幫他們止血\n", + "Detected language: zh\n", + "把自己的食物全部就分給這些礦工來吃所以他大概覺得他自己是很稱職的牧師\n", + "Detected language: zh\n", + "它做了一個最好的基督徒的榜樣可是沒有想到1879年\n", + "Detected language: zh\n", + "7月我想是對范谷一生最大的打擊因為教會竟然不跟她續約\n", + "Detected language: zh\n", + "那麼這個不續約的理由他當然要追問他覺得為什麼我希望在這裡繼續待下去\n", + "Detected language: zh\n", + "一般的牧師到這種玻里納吉這個地方做牧師大概覺得倒楣死了希望趕快能夠\n", + "Detected language: zh\n", + "掉到別的地方就像我們覺得有時候我們的一個工作掉到了偏遠地方\n", + "Detected language: zh\n", + "它主要的傳教範圍以及主要信仰格爾文教派的信徒居住範圍\n", + "Detected language: zh\n", + "做老師做警察就覺得趕快要調離然後到一個繁華的大城市去\n", + "Detected language: zh\n", + "可是泛谷不是他反而覺得乾枝如蟻他要跟這些最窮苦的礦工生活在一起\n", + "Detected language: zh\n", + "所以他很希望他的約滿之後 能夠續約他繼續在玻里娜局幫助這些\n", + "Detected language: zh\n", + "可是他萬萬想不到教會竟然不跟他許約\n", + "Detected language: zh\n", + "換一個話來講,就是開除了因為教會覺得他不稱職教會覺得他不夠\n", + "Detected language: zh\n", + "維持著教會的尊嚴因為教會的尊嚴 是要一個牧師永遠帶著白色的領圈\n", + "Detected language: zh\n", + "站在講壇上講非常冠冕堂皇的步道的美麗語言\n", + "Detected language: zh\n", + "可是范古不是范古覺得它要真正變成一個礦工它覺得你不變成一個礦工\n", + "Detected language: zh\n", + "你無法了解礦工所以因此你跟他們傳道也只是一些虛偽偽善的語言\n", + "Detected language: zh\n", + "所以在這裡面,一種認知上的落差,造成了 犯古非常\n", + "Detected language: zh\n", + "其实主要是在今日的比利时荷兰那么也就是说他们跟南方的\n", + "Detected language: zh\n", + "非常大的沮喪所以她打點了一些行囊離開了這個玻利納基\n", + "Detected language: zh\n", + "然後流浪在荷蘭的一些小村鎮他就覺得他簡直無面目見他的父親\n", + "Detected language: zh\n", + "因為他父親是一個很稱職的牧師他會覺得說家裡一定不瞭解說\n", + "Detected language: zh\n", + "這個兒子到底怎麽回事在這麽窮困的小礦區做牧師都做不好所以這段時間\n", + "Detected language: zh\n", + "也是他最沮喪最低潮最痛苦的時候也在這段時期他滑了\n", + "Detected language: zh\n", + "最好的早期的作品就是用碳筆憑著記憶畫下了\n", + "Detected language: zh\n", + "所有他跟礦工的接觸。他有一張在1882年左右畫的畫。\n", + "Detected language: zh\n", + "那么现在成为非常有名的一件作品是画一个老人坐在一个\n", + "Detected language: zh\n", + "在庇盧前面可是庇盧絕對不是我們想像的現在很豪華的庇盧事實上就是\n", + "Detected language: zh\n", + "窮人家裡面很簡單架了幾個木材上面用鋊鏈吊了一個\n", + "Detected language: zh\n", + "比如說意大利的梵蒂岡的教皇其實是形成一種衝突的這是我想不是歐洲人比較不容易理解\n", + "Detected language: zh\n", + "的烧热水的壶然后家里面家徒是比什么都没有那么这个老人头发\n", + "Detected language: zh\n", + "他手腕好好伸直他頭髮幾乎都已經突了大概只有耳朵跟後面有一點點 lighting頭髮然後我們看不到他的臉\n", + "Detected language: zh\n", + "因為她坐在椅子上,她的兩個手蒙著她的臉,低垂著。\n", + "Detected language: zh\n", + "這個臉完全埋在他這兩隻手當中范古在底下寫了一個字叫做絕望\n", + "Detected language: zh\n", + "那麼意思是說,這個老人,他是一個老礦工他可能工作了一年\n", + "Detected language: zh\n", + "一辈子 可是到最后他身上穿着单薄的衣服在冬天是没有办法抵挡寒冷的\n", + "Detected language: zh\n", + "它没有食物,然后它的壁炉里没有燃料可以生火\n", + "Detected language: zh\n", + "所以在这样贫病交迫的种困当中生活陷在一种困境里\n", + "Detected language: zh\n", + "所以這個時候不是一種精神上的痛苦其實是一種生活上的痛苦\n", + "Detected language: zh\n", + "因為這個生活窮到過不下去了所以他寫了絕望這樣的字\n", + "Detected language: zh\n", + "因为我们常常讲基督教、基督教可是基督教在天主教的部分就是属于今天梵蒂冈有教皇的部分\n", + "Detected language: zh\n", + "有很多的作品會在畫面上很簡單的寫幾個字有時候是英文有時候法文\n", + "Detected language: zh\n", + "有時候是荷蘭文好像它怕大家不懂它要傳達什麼因為我們一再強調\n", + "Detected language: zh\n", + "如果我今天拿起笔来画画是因为我看到了一个美丽的东西可是犯古不是\n", + "Detected language: zh\n", + "仿古斯看到了人的绝望可是他问所有看话的人说事实上我们的生活里\n", + "Detected language: zh\n", + "也是有絕望的部分我們要不要表現絕望我們看到了絕望我們要不要去面對它\n", + "Detected language: zh\n", + "我們能不能去承擔另外一個人,生活這麼絕望的痛苦我一再要強調說\n", + "Detected language: zh\n", + "帆古這個時候畫畫的動機都跟今天學院裡面學美術的人動機是不一樣的\n", + "Detected language: zh\n", + "他希望能夠把他看到的生活裡的沉重、憂鬱、痛苦\n", + "Detected language: zh\n", + "拿出來讓大家面對因為她是一個基督徒她是一個格爾文巧白的信教信仰者\n", + "Detected language: zh\n", + "他覺得一個基督徒是應該看到人世間的苦難看到之後能夠去承擔它\n", + "Detected language: zh\n", + "我們通常也叫做舊教它是中世紀傳言下來舊的信仰\n", + "Detected language: zh\n", + "這才叫做救贖耶穌不是因為救贖而來人間的嗎?耶穌不是因為救贖而來人間的嗎?耶穌不是因為救贖而來人間的嗎?\n", + "Detected language: zh\n", + "毒偽定死在十字架上的如果我們看不到這個生命裡面救贖的部分\n", + "Detected language: zh\n", + "基督信仰存在的意義又是什麼呢所以我們看到他這個時候\n", + "Detected language: zh\n", + "用了非常簡單的素描、貪筆、鉛筆甚至有時候是那種鵝毛沾水筆\n", + "Detected language: zh\n", + "画了一些简单的画面大概题材都跟我所描述的绝望非常的类似\n", + "Detected language: zh\n", + "那麼有的時候是身體上身跟下半身 乘90度角上半身根本是\n", + "Detected language: zh\n", + "舉不起來的然後背著一大袋的煤壓到上半身根本完全無法挺直起來的礦工\n", + "Detected language: zh\n", + "這類作品 當我自己二十幾歲在奧莫斯特丹的番古博物館看到這批資料時候\n", + "Detected language: zh\n", + "我们看到的《返古的话》都是他后期的作品\n", + "Detected language: zh\n", + "我們沒有看到他做礦工牧師這個時期的作品這幾年 慢慢大家開始\n", + "Detected language: zh\n", + "同時基督教的另一個比較革命的就是格二文教派, 他們比較攻擊教會。\n", + "Detected language: zh\n", + "特別介紹反顧早期的畫作因為這些畫作裡面有最深層的人道的關懷\n", + "Detected language: zh\n", + "有最深沉的社會的一種福利的呼籲呼籲大家去關心這種\n", + "Detected language: zh\n", + "最受苦的人因此它也變成了藝術時尚,最了不起的傑作\n", + "Detected language: zh\n", + "美的沉思我是蔣旭\n", + "Detected language: zh\n", + "就是當時的梵蒂岡教會他們認為教皇,神父\n", + "Detected language: zh\n", + "他們所擁有的權利、財富非常的多而他們並不關心到被壓迫的人或者窮人\n", + "Detected language: zh\n", + "我是蒋讯我们在一系列对荷兰大画家贩蛊的介绍里\n", + "Detected language: zh\n", + "所以他們講的聖經常常是一個假的東西是一個虛偽的狀態\n", + "Detected language: zh\n", + "那么格尔文教派他们就希望能够回到福音书回到耶稣当年传教的真正的一个实践的理想\n", + "Detected language: zh\n", + "就是你不能說你一直同情窮人可是最後擁有很多的財富可是都不願意去幫助別人\n", + "Detected language: zh\n", + "就是變成了一個唯父不仁的教徒那麼因此格爾文教派我們今天看起來可以說\n", + "Detected language: zh\n", + "當時是一個非常革命性的主張所以這個部分對於所謂的北方化派影響非常大\n", + "Detected language: zh\n", + "那我們可以舉很簡單的例子大家可能也有印象如果我們在達溫西的話裡\n", + "Detected language: zh\n", + "或者米開朗基羅的話裡我們看到聖母瑪麗亞我們看到耶穌\n", + "Detected language: zh\n", + "甚至耶稣定在十字架上你会发现他们都非常的漂亮就是意大利画派\n", + "Detected language: zh\n", + "這個文藝復興的畫派他們通常已經把聖經的主題變成一個視覺上很享樂的東西\n", + "Detected language: zh\n", + "那麼當然,我想大家能夠理解我的意思,就是耶穌定十字架的時候\n", + "Detected language: zh\n", + "能夠借它,連接到不同的一些歷史的因素\n", + "Detected language: zh\n", + "其實是一個酷刑是一個非常慘痛的畫面血流下來\n", + "Detected language: zh\n", + "叮嚀打進肉裡面去這是一個非常傷痛的簡直像我們今天在醫院的急診室\n", + "Detected language: zh\n", + "看到的那種重病的狀況可是意大利的畫派基本上把它沒畫了\n", + "Detected language: zh\n", + "因為美化,我們可以了解到當時的信徒即使跪在地底…\n", + "Detected language: zh\n", + "仰望這些神 他會覺得這些神是美麗的然後他們是優雅的\n", + "Detected language: zh\n", + "甚至聖母身上穿着太美的袍子,上面繼绊了很多的花\n", + "Detected language: zh\n", + "他們是貴族,他們是富有的可是如果有機會,大家看一下北方的花牌\n", + "Detected language: zh\n", + "許多畫家在當時沒有像意大利的達文西米加勒\n", + "Detected language: zh\n", + "像基羅這麼有名的北方的這些畫家他們在畫聖母 畫耶穌的時候\n", + "Detected language: zh\n", + "他們畫得非常接近生活畫蔼的人我想這一點她處理的美學態度\n", + "Detected language: zh\n", + "例如我們前面介紹過荷蘭的建國荷蘭建國跟格爾文教派的關係\n", + "Detected language: zh\n", + "就跟南方非常的不一樣特別是耶穌釘十字架的這樣的一個畫面\n", + "Detected language: zh\n", + "我們看到有一些北方畫派的畫家畫出來耶穌定在十字架上的這個圖像\n", + "Detected language: zh\n", + "我們到今天,都不忍心看因為它會讓你看到耶穌在訂十字架\n", + "Detected language: zh\n", + "之前如何被鞭打過而那個鞭打的刑具是一種經濟\n", + "Detected language: zh\n", + "就是有很多像玫瑰的刺一樣的植物用這樣的東西鞭打所以那些刺全部刺在他的肉裡\n", + "Detected language: zh\n", + "所以你可以看到,他们画了一张耶稣钉,在十字架上,身上遍体鳞上\n", + "Detected language: zh\n", + "我用零傷字,真的是碎肉一樣,全部都是刺\n", + "Detected language: zh\n", + "小刺刺在裡面她其實很希望看這張畫的人感同身受\n", + "Detected language: zh\n", + "耶稣當年所受到的這種辛苦因為祂是為人類救贖而來的\n", + "Detected language: zh\n", + "所以它的苦就相對的有著崇高的意義\n", + "Detected language: zh\n", + "那麼特別是帆古的父親祖父都是格爾文教派的牧師\n", + "Detected language: zh\n", + "但是我们要特别讲到为什么范古会从这个系统 guides 出来的画家也为什么他在早期的画作里\n", + "Detected language: zh\n", + "充滿了對礦工的生活這麼沉重的描述事實上還是有\n", + "Detected language: zh\n", + "北方劃派的信仰的傳統在裡面我們再談到范谷\n", + "Detected language: zh\n", + "格尔文教派的新教传统的同时其实不只是关心他个人的信仰\n", + "Detected language: zh\n", + "最主要是我們希望用這個背景來解讀犯古在早期的畫作\n", + "Detected language: zh\n", + "我说的早期 gaugery 的画作大概是围绕在 1880 年前后。\n", + "Detected language: zh\n", + "是我們現在看到的油畫像向日葵啊 或者是他的字畫\n", + "Detected language: zh\n", + "化相阿,顔色很亮麗的大概都是在1886年之後就是1886年\n", + "Detected language: zh\n", + "法古去了,所以他受到了一個很不同的影響,就是巴黎的印象派的影響\n", + "Detected language: zh\n", + "所以它整個畫面忽然色彩豐富起來也亮起來可在1886年之前\n", + "Detected language: zh\n", + "所以我們也可以說《基督教的聖經》這本書其實對范谷發生了非常決定性的影響\n", + "Detected language: zh\n", + "我们看到范谷最早,绘画对她来讲,并不是她最主要的工作\n", + "Detected language: zh\n", + "之前我們介紹過泛谷大概在17歲的時候他就曾經因為他叔叔的介紹\n", + "Detected language: zh\n", + "到古比西的藝術經紀公司裡面去做電源\n", + "Detected language: zh\n", + "所以他有機會接觸到很多買賣的藝術品包括真跡也包括很多的複製品\n", + "Detected language: zh\n", + "所以他跟藝術有了一些接觸可是我们也一再强调贩雇最早的职员\n", + "Detected language: zh\n", + "絕對不是做一個畫家就他有這麼好的機會在一個藝術經紀公司裡面工作\n", + "Detected language: zh\n", + "他也很有机会自己去创作可是那个时候他好像壓根没有想到他要做画家\n", + "Detected language: zh\n", + "因為他一心一意有一個為窮人去服務的這個理念是受他父親跟祖父影響的\n", + "Detected language: zh\n", + "因为他们家两代都是牧师所以他觉得他一直要做牧师牧师才是他生命里面\n", + "Detected language: zh\n", + "真正的志向所在其实不是画家这是一般人很不了解\n", + "Detected language: zh\n", + "這個影響不僅在犯古一個個人的身上,同時也是荷蘭當時普遍心教的一個理想。\n", + "Detected language: zh\n", + "所以很多今天在藝術界上有時候可能對梵谷的傳奇不了解的朋友\n", + "Detected language: zh\n", + "會誇張說范谷這麼愛藝術多麼全心投注於藝術\n", + "Detected language: zh\n", + "其實我想這個只能說是他1886年以後的反骨那1890年他就自殺了\n", + "Detected language: zh\n", + "所以事實上他真正作為畫家的這個部分比較重要是1886-1890\n", + "Detected language: zh\n", + "只有四年的工作 四年的工夫那麼之前他其實一直是想要做牧師\n", + "Detected language: zh\n", + "我們在上一個單元裡面特別締造了1878年東天\n", + "Detected language: zh\n", + "她那个时候非常想要做牧师,可是很不幸,她准备了很久很久的牧师的考试。\n", + "Detected language: zh\n", + "我們也解釋過歐洲這種牧師的資格鑑定考試非常的不容易\n", + "Detected language: zh\n", + "因為他有點像我們的什麼高考啊什麼之類 就是檢定你語文能力\n", + "Detected language: zh\n", + "在所有的知識能力上要達到可以做為社區裡面的\n", + "Detected language: zh\n", + "在歷史上追得更早一點,我們也可以了解到大部分我們在講到中古世紀《文藝復興》的時候\n", + "Detected language: zh\n", + "步道者這個身份它是非常嚴格的我想也許我們不太瞭解就是在過去\n", + "Detected language: zh\n", + "尤其像荷兰比利时这种社会里面每一个社区大部分是文马\n", + "Detected language: zh\n", + "可能都是農民或工人所以要有一兩個知識分子他就是教會派來的\n", + "Detected language: zh\n", + "所以這個教會派來的人他雖然主要的責任是做牧師來不道\n", + "Detected language: zh\n", + "來傳耶穌的基督信仰的可是他同時又兼具著教大家語言\n", + "Detected language: zh\n", + "人呢文學,你作文不好他幫你修改啊或者幫人家寫信啊甚至有法律訴訟的時候\n", + "Detected language: zh\n", + "他要有一點法律的知識其實我們就會不太了解為什麽范古當時準備考神學院\n", + "Detected language: zh\n", + "他要讀希臘文 幾何 數學 法律什麼都要讀因為這個資格\n", + "Detected language: zh\n", + "這個鑑定的考試是鑑定它將來在這個社區當中能夠成為一個得高望重\n", + "Detected language: zh\n", + "受百姓爱戴的一个牧师因为你的工作\n", + ">>>> 09-05\n", + "Detected language: zh\n", + "也许对范古来说,他并不把他当艺术作品来看待,而只是作为他关心这些矿工。\n", + "Detected language: zh\n", + "那模特兒通常就是請一個身材很標準的一個男性或女性坐在那邊\n", + "Detected language: zh\n", + "然後你畫他的裸體可是我們知道范古當時畫了很多的礦工\n", + "Detected language: zh\n", + "那個身體是變形的我記得我第一次在阿姆斯特丹博物館看到這些礦工的作品\n", + "Detected language: zh\n", + "非常震撼我們知道一個人在長期的非常辛苦的重勞動裡面\n", + "Detected language: zh\n", + "我们一再强调这些矿工挖煤每天可能要挖到12个小时14个小时\n", + "Detected language: zh\n", + "所以她身体变形了我想我们今天在我们的生活里不太有机会看到这种重劳动的人\n", + "Detected language: zh\n", + "就是他每天扛著眉從地底下這樣爬上來他的腰最後都有一點直不起來\n", + "Detected language: zh\n", + "很年轻就坨了背,因为泛古在他很多的日记跟书信里\n", + "Detected language: zh\n", + "有過非常詳細的記錄她覺得很訝異跟這些換工聊天這麼年輕怎麼身體就已經占不值了\n", + "Detected language: zh\n", + "因此他就用素描去画他们所以他画下来的这些矿工\n", + "Detected language: zh\n", + "或者关心这些穷苦里的人们他们生活的一个记录吧\n", + "Detected language: zh\n", + "从今天我们看起来其实是非常非常感人的作品可是我们可以想象得到\n", + "Detected language: zh\n", + "他當時拿去給莫福看莫福是一個有名的畫家那麼一般有名的畫家\n", + "Detected language: zh\n", + "它的衡量劃好不好的標準是漂不漂亮我想我們今天也還是如此\n", + "Detected language: zh\n", + "我們看一個人畫的畫,我們覺得, 誒,...漂亮不漂亮,掛在客廳大家會不會覺得,好像真的美女一樣\n", + "Detected language: zh\n", + "可是梵谷画的不是美女她画的是一些非常辛苦的穷困的\n", + "Detected language: zh\n", + "甚至绝望的人他画一个在火炉旁边连饭都没有的吃的一个秃头的一个老人\n", + "Detected language: zh\n", + "痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛痛\n", + "Detected language: zh\n", + "并不是为了讨好别人的,应该是很诚实地画自己看到的东西。\n", + "Detected language: zh\n", + "所以因此我們看到范古作為牧師他牧師的身份跟別人的解讀有了落差\n", + "Detected language: zh\n", + "现在他做画家他的绘画的解读又跟别人有了落差因为他的堂哥无法了解\n", + "Detected language: zh\n", + "一直到1879年7月我們看到梵谷當時在\n", + "Detected language: zh\n", + "你為什麼要去畫礦工畫那麼難看的東西髒髒的誰會去買這樣的畫\n", + "Detected language: zh\n", + "挂在家里因为一般人会觉得我们做画家当然是说画要买得很好\n", + "Detected language: zh\n", + "賣掉以後這個畫還可以被人家掛在很漂亮的博物館 畫廊或者家裡可以展示的\n", + "Detected language: zh\n", + "因此梵谷的藝术作品是有生之年並沒有受到任何人的重視\n", + "Detected language: zh\n", + "我想是因为他一直在画我们社会里面大家最不愿意看的角落\n", + "Detected language: zh\n", + "我們試試看如果我們今天在一個城市我想我們的城市可能有油米如果冬天很冷的時候\n", + "Detected language: zh\n", + "你走過一些地下道你會看到一個頭上套了一個紙箱的一個老頭子\n", + "Detected language: zh\n", + "可能無家可歸就睡在那個地方可是有沒有發現在我們社會的畫家的作品裡很少看到有人畫他\n", + "Detected language: zh\n", + "或者是一个乞丐,穷得不得了我没有人去画他我想什么原因\n", + "Detected language: zh\n", + "因為這種話不好賣所以我想這裡就牽涉到我們下面要解釋范果\n", + "Detected language: zh\n", + "比利時波里納吉礦區牧師他簽了一年的合同\n", + "Detected language: zh\n", + "這個時候他起步畫畫了那他畫畫的動機是什麼他畫對他生命的意義又是什麼\n", + "Detected language: zh\n", + "那为什么很用功画画的反骨始终没有人重视他的绘画?\n", + "Detected language: zh\n", + "现在我们要谈到范古一个比较重要的经历因为他有一类的作品大概在1883年左右出现\n", + "Detected language: zh\n", + "那還是素描因為這個時候比較昂貴的油畫顏料他買不起\n", + "Detected language: zh\n", + "油畫技巧上比較複雜所以他常常用鉛筆,用碳筆\n", + "Detected language: zh\n", + "来做一些很简单的素描我们看他留下了一件很重要的素描\n", + "Detected language: zh\n", + "這張素描是一個五歲左右的小女孩然後她跪在一個搖籃前面\n", + "Detected language: zh\n", + "搖籃里面躺的一个刚刚出生的婴儿很多人都喜欢这件作品也都觉得这件作品里面有一个\n", + "Detected language: zh\n", + "说不出来的感动有时候我们看一张画我们不知道背景我们只是看画\n", + "Detected language: zh\n", + "本身我們會覺得,怎麼會有個五歲的小女孩看著搖籃裡面的嬰兒\n", + "Detected language: zh\n", + "那麼這個合同 聘約已經期滿那麽他滿心歡喜認為說\n", + "Detected language: zh\n", + "那麼這個嬰兒是不是她的弟弟呢?好像她們的生活也很窮困因為這個五歲的小女孩\n", + "Detected language: zh\n", + "頭髮也都沒有梳得很好亂七八糟髒髒的然後家裡也非常的簡陋好,這張素描\n", + "Detected language: zh\n", + "如果你看到了如果你感动了你可能才会去找资料知道说\n", + "Detected language: zh\n", + "咦 為什麼一張畫會感動我我們知道大概在1882年左右的時候飯谷在海涼\n", + "Detected language: zh\n", + "她认识了一个妓女这个妓女的名字叫 Planicela judgmental\n", + "Detected language: zh\n", + "因為他們後來變成很熟的朋友所以就叫他CM翻譯成西燕\n", + "Detected language: zh\n", + "西方的西燕是女字旁一個燕子的西燕當然是一個發音的翻譯\n", + "Detected language: zh\n", + "我提到了ijk這個名稱楊姬我想一般朋友大概會覺得蠻奇怪范古出生一個牧師的家庭\n", + "Detected language: zh\n", + "自己也是一个做过牧师的人然后也是一个知识分子怎么会跟境遇来往\n", + "Detected language: zh\n", + "我們自己也許想一想說唉,我的身邊有沒有一個朋友是妓女或者說如果今天在家裡開party\n", + "Detected language: zh\n", + "教会一定认为他是一个好的牧师他如此的进子应该会跟他续约\n", + "Detected language: zh\n", + "我會不會介紹說有一個朋友是姬女魏請他來\n", + "Detected language: zh\n", + "我的意思說也許妓女或娼妓她是社會裡面的一種行業\n", + "Detected language: zh\n", + "可是基本上在道德上我們很自然就把它貶低了我們也輕視這樣的人\n", + "Detected language: zh\n", + "我們也自動的忽略這樣的人我們也覺得我們的生活裡不會跟這樣的人來往\n", + "Detected language: zh\n", + "可是我們看到范古非常特別范古作為一個牧師我們覺得牧師是信基督教\n", + "Detected language: zh\n", + "应该充满了道德感那她更不应该跟妓女这种人来往可是刚好相反我们看到她在街头上看到了一个妓女\n", + "Detected language: zh\n", + "这个妓女当时32岁,比范古大范古大概当时才29岁30岁左右\n", + "Detected language: zh\n", + "然後范古在寫給朋友的信跟日期上描述過\n", + "Detected language: zh\n", + "所以這個妓女大概有點窮所以在街上拉客人\n", + "Detected language: zh\n", + "有一點像一個思倉當然在社區裏面一定是被大家看不起甚至別人會\n", + "Detected language: zh\n", + "沒有想到,教會對他的態度,反而是比較批判的。\n", + "Detected language: zh\n", + "拿石頭丟她的那種女人那范古就對這樣的人發生了好奇他覺得這個女的他的描述的過程\n", + "Detected language: zh\n", + "说他看起来比他年龄老很多因为他后来知道他的年龄说他脸上有蚂子\n", + "Detected language: zh\n", + "大概得过添花然后有时候身边会拉着几个小孩这些叙述慢慢地\n", + "Detected language: zh\n", + "我們就兜起來了我們看到番穀開始跟這個妓女變成了好朋友這個叫做西燕的這個女人\n", + "Detected language: zh\n", + "她發現這個女人她的母親就是姬女所以我們就觸碰到一個問題\n", + "Detected language: zh\n", + "就是一個社會裡可能有一些窮苦的人他們要用出賣自己的身體來養活自己\n", + "Detected language: zh\n", + "如果我們用道德的批判說你怎麼不做別的工作要來做這樣的工作而對這樣的女人齒之以鼻的話\n", + "Detected language: zh\n", + "我們也知道他可能最方便養活他自己跟孩子的方法現在有人叫做性產業這樣的一個工作\n", + "Detected language: zh\n", + "那她已經有5個小孩這5個小孩她都不知道爸爸是誰我想在那個年代可能避孕各方面的\n", + "Detected language: zh\n", + "他他就抱着一个南 podemos type と一个南所以就带着一群的这个小孩子那么翻古认识他的时候\n", + "Detected language: zh\n", + "他們認為番谷在這個礦區裡跟著礦工一起下到坑洞裡去挖煤礦\n", + "Detected language: zh\n", + "她有四個小孩肚子裡面懷了一個小孩那范古就很同情這個妓女覺得已經懷了一個孩子了\n", + "Detected language: zh\n", + "應該要在家裡待產還跑到街上來因為如果她不去拉客人他等於晚餐都沒有的吃\n", + "Detected language: zh\n", + "他没有办法养活他的孩子很多的书里把这一段故事描述成一个浪漫的爱情\n", + "Detected language: zh\n", + "因為范國後來要跟他結婚他的父母都快瘋掉了他的弟弟也快瘋掉都趕來阻止這件事情\n", + "Detected language: zh\n", + "覺得凡股簡直是發瘋了怎麼會想到要娶一個妓女比他年紀大還有一大堆的小孩\n", + "Detected language: zh\n", + "那麽還有一個媽媽要養那麽可是我讀到這段故事的時候我覺得 這裡面一點浪漫愛情的成分都沒有\n", + "Detected language: zh\n", + "我們完全知道范谷其實在從事一個救贖的工作她在日記裡面說\n", + "Detected language: zh\n", + "這個妓女跟她壹樣遭受了生命裏面最大的挫折跟傷害\n", + "Detected language: zh\n", + "所以她很想去帮助这个妓女所以她有一段时间就让这个妓女住到她的画室来\n", + "Detected language: zh\n", + "然後他拿他自己那麼少一點點的食物那麼一點點的生活費\n", + "Detected language: zh\n", + "跟他们一起过最苦的日子,其实违反了教会的规则。\n", + "Detected language: zh\n", + "來養這個妓女的四個小孩然後讓她把第五個小孩生下來\n", + "Detected language: zh\n", + "帝国小孩生下来的时候小孩在摇篮 vite然后5岁的姐姐就跪在摇篮旁边看着弟弟\n", + "Detected language: zh\n", + "妈妈又跑出去接客了因为必须要赚钱来养活这些孩子这个时候范古画下了这一张素描\n", + "Detected language: zh\n", + "有时候,我跟朋友提到说这张素描现在变成返古,早期非常重要的作品\n", + "Detected language: zh\n", + "因為他不是在畫畫如果我們今天面對一個生活裡這麼痛苦的景象\n", + "Detected language: zh\n", + "我想 我們不會在意說我的筆觸好不好我的技巧好不好我能不能把這個女孩畫得美一點\n", + "Detected language: zh\n", + "因為其實他面對的是人生非常悲慘的一個狀態所以因此在牧師的身份\n", + "Detected language: zh\n", + "剛剛被開除解聘的飯鼓這個時候他其實更用一種深層的愛\n", + "Detected language: zh\n", + "在關懷他身邊的人所以這一段故事我常常會覺得被誤解了\n", + "Detected language: zh\n", + "大家都以为他爱上了妻女是一个爱情我觉得不是我觉得是一种人对人的某一种关系\n", + "Detected language: zh\n", + "這個也許一般朋友會有點不容易理解就是我們總覺得泛蠱在人道的關懷上\n", + "Detected language: zh\n", + "可是,我們在這裡看到了 范古最動人的部分其實,我每次讀到這裡\n", + "Detected language: zh\n", + "我也覺得 我比不上梵谷因為我覺得 我做不到這個部分在現實生活裡\n", + "Detected language: zh\n", + "我相信絕對像CNN這樣的女人需要別人幫助可是也許我們常常會覺得害怕\n", + "Detected language: zh\n", + "因為你會害怕這樣的行為被別人解讀成不正當的或者骯髒的行為\n", + "Detected language: zh\n", + "我們自動就逃開了所以有時候我會很慚愧我的潔癖\n", + "Detected language: zh\n", + "就是凡谷没有洁癖凡谷为了帮助别人的时候他反而不在意别人怎么看他整个社区都认为说\n", + "Detected language: zh\n", + "這個畫家真是一個最不道德的畫家那麼這個人還做過牧師竟然跟一個妓女同居一大堆的小孩\n", + "Detected language: zh\n", + "把自己生活搞得乱七八糟連他父母都這樣看待他所以他中間曾經重病過一次\n", + "Detected language: zh\n", + "坐到醫院住了將近一個月繁谷自己也快崩潰了因為他覺得怎麼會把自己放到\n", + "Detected language: zh\n", + "這麼荒謬的一個處境上可是她就很衝動她覺得他要幫助這個女人幫助西嫣\n", + "Detected language: zh\n", + "您現在所收聽的是《美得沉思》我是江薰\n", + "Detected language: zh\n", + "做了一個最好的牧師可是教會在很多的國家其實是一種特殊的社會地位\n", + "Detected language: zh\n", + "他也要試試看能不能給他一些支持讓他脫離這種靠賣身體維生的\n", + "Detected language: zh\n", + "而給予他一個比較好的另外改善自己生活的可能\n", + "Detected language: zh\n", + "梵谷在跟西燕的故事裡 大概從1882年開始\n", + "Detected language: zh\n", + "那麼 主要他們生活在一起 是一八八三到一八八四這一段時間 我們也看到\n", + "Detected language: zh\n", + "范蠱激动到他就是要跟她正式结婚其实连西燕这个妓女\n", + "Detected language: zh\n", + "自己都嚇了一大跳因為他覺得他碰到了一個好心的人這個人怎麼可能跟他一起生活\n", + "Detected language: zh\n", + "她自己滿臉麻自 用老然後帶著一大堆的孩子妳娶了她等於要養活命\n", + "Detected language: zh\n", + "这五个孩子而且要负担其他妈妈的生活费那么因此这个夕宴也有点嘲笑反览\n", + "Detected language: zh\n", + "說你幹嘛要惹這種麻煩你幹嘛要跟我結婚所以他們兩個的關係非常非常的複雜\n", + "Detected language: zh\n", + "一般人都很難理解因為我們知道他們同居了一段時間其實等於有一點像正式的夫妻\n", + "Detected language: zh\n", + "他是一個白領階級他是一個知識份子在某一個程度上也在社區裡是有一點高高在上\n", + "Detected language: zh\n", + "生活在一起可是最後西晏又跑到街上去接客了那麼很多人都認為泛古\n", + "Detected language: zh\n", + "得不償失就說你好像要救這個息焰最後息焰並沒有被你救贖\n", + "Detected language: zh\n", + "可是,我自己不這樣看,我覺得這個事情的複雜是在於\n", + "Detected language: zh\n", + "范古是不是在他救贖的生命里太过一厢情愿他充满了宗教的狂热\n", + "Detected language: zh\n", + "這個宗教的狂熱是因為他太相信基督教的聖經裡面對人的這種幫助\n", + "Detected language: zh\n", + "无私的爱 无私的奉献我们口头上讲无私的爱无私的奉献非常的容易\n", + "Detected language: zh\n", + "可生活上,其实看不到一两个人可以真正做到无思的爱,无思的奉献。\n", + "Detected language: zh\n", + "可反骨真的错了那么因此整个社区的人排斥她他的父母排斥她\n", + "Detected language: zh\n", + "甚至最爱他的弟弟迪奥迪奥是最支持他的那个时候迪奥已经去古比西这艺术经纪公司\n", + "Detected language: zh\n", + "就是接了反骨的工作所以他有收入了他每個月都定期寄錢給哥哥\n", + "Detected language: zh\n", + "因此我想这里面只能说范古心目中对牧师这个身份的理解。\n", + "Detected language: zh\n", + "讓反骨有一些收入是他都趕來阻止說你不可以跟這個女人結婚因為他覺得\n", + "Detected language: zh\n", + "你这样太麻烦这个是没完没了的事就是这个女人已经三十几岁了\n", + "Detected language: zh\n", + "剛剛生下來這些孩子你難道要養他們一輩子那當然家人也知道販股本身沒有這些能力\n", + "Detected language: zh\n", + "他有巨大的狂熱可他生活的現實當中謀生的能力根本是不夠的\n", + "Detected language: zh\n", + "所以我不晓得应该怎么去谈这一段就说范谷她所有的热情\n", + "Detected language: zh\n", + "如此感動我們可是我們也知道其實飯股市沒有理性思考的能力\n", + "Detected language: zh\n", + "因此他常常最後走向毀滅的這條路是因為那個巨大的熱情好像要把它燒死一樣\n", + "Detected language: zh\n", + "可是她每次面对着熄艳的痛苦的生活她面对着这个妓女的绝望的身体的时候\n", + "Detected language: zh\n", + "他又忍不住要去幫忙這個時候我們看到凡古畫了一張非常驚人的素描\n", + "Detected language: zh\n", + "這張素描也製作過石板畫大概是梵谷早期作品裡面的\n", + "Detected language: zh\n", + "和当时的欧洲教会里面对牧师这个身份的理解有了巨大的落差\n", + "Detected language: zh\n", + "流傳最廣的一件做品如果我描述我想很多朋友可能在很多畫冊裏\n", + "Detected language: zh\n", + "都有看過這張畫的印象這張畫是一個側面的一個女人\n", + "Detected language: zh\n", + "全身裸体没有穿衣服,一丝不挂。我们通常强到裸体,一丝不挂。\n", + "Detected language: zh\n", + "我們大概想到的是一個好像很寢欲的作品可是完全不是因為我們看到這個女人\n", + "Detected language: zh\n", + "长长的头发披在他的背上他的头整个埋在他的两个手背当中\n", + "Detected language: zh\n", + "就是他做在那个地方手被放在他的两个膝盖上他整个脸是埋在他的\n", + "Detected language: zh\n", + "我想這個姿勢所有的人看到都會知道這是一個絕望的姿勢\n", + "Detected language: zh\n", + "或者說這是一個羞恥的姿勢因為他覺得他沒有臉見別人他走出去就是被別人指指點點\n", + "Detected language: zh\n", + "認為他是一個淫蕩的不道德的女人整個社區裡面都在罵他然後他又不知道\n", + "Detected language: zh\n", + "眾多人知道除了做妓女以外他有什麼方法可以謀生養活這五個孩子所以因此 他回到家的時候\n", + "Detected language: zh\n", + "范古心目中覺得一個牧師就是好好的去實踐耶穌的訓示\n", + "Detected language: zh\n", + "脫掉了衣服 她坐在那邊的時候她整個人是完全沮喪 完全絕望的狀況\n", + "Detected language: zh\n", + "然後我們看到他的胸部整個下垂其實不是一個飽滿的美麗的\n", + "Detected language: zh\n", + "一個身體然後那個腹部大概也剛生完孩子非常松弛的一個腹部大大的一個肚子\n", + "Detected language: zh\n", + "所以我覺得很多人都認為裸女化是有情慾成分在裡面的\n", + "Detected language: zh\n", + "如果有朋友還有這樣的觀點我就會請你看范古這一章《羅女花》\n", + "Detected language: zh\n", + "她是裸體的女人,不錯可是她沒有任何一點點情慾的成分在內\n", + "Detected language: zh\n", + "他相反的让你看到一个赤裸裸的女人的無奈、沮喪、灰心。\n", + "Detected language: zh\n", + "它讓你看到生命徹底挫敗的一個感覺那麼這件作品\n", + "Detected language: zh\n", + "因為他畫過以後他就把它做成了石板畫我們知道石板畫就是可以複製的\n", + "Detected language: zh\n", + "可以印刷的所以他在上面也寫了一個英文字叫作sorrow就是憂愁憂愁\n", + "Detected language: zh\n", + "是耶稣留下来的一种为穷人为受压迫的人去谋福利的这样的一个训示\n", + "Detected language: zh\n", + "他會覺得他看到的夕焰這個妓女是巨大的一種哀傷\n", + "Detected language: zh\n", + "痛苦的一种表情跟一种感觉所以这个时候我们已经看到梵谷的绘画\n", + "Detected language: zh\n", + "其实有了它自己非常独特的美学的内容如果我们今天拿\n", + "Detected language: zh\n", + "他這段時期的作品跟他當時想要請教的那位有名的話\n", + "Detected language: zh\n", + "莫芙的作品來比較莫芙的作品其實是沒有個性的可是莫芙當時\n", + "Detected language: zh\n", + "是很有名 畫也賣的很好可是范谷當時從來沒有人覺得他是畫家\n", + "Detected language: zh\n", + "所以大家看到他的畫也覺得幹嘛畫這麽難看的東西可是生命的痛苦\n", + "Detected language: zh\n", + "值不值得化生命的絕望值不值得化生命里面许多的忧伤\n", + "Detected language: zh\n", + "值不值得经由画家的画笔留下来让人类\n", + "Detected language: zh\n", + "面对他的时候, 有更多的悲悯, 有更多的同情因此我想范古今天在\n", + "Detected language: zh\n", + "如果能夠在生活裡完成就是一個好的牧師可是教會不是教會認為一個牧師是一個社區裡\n", + "Detected language: zh\n", + "所有的繪畫史上藝術史上變成一個這麼重要的創作者\n", + "Detected language: zh\n", + "是因為他不只是畫畫主要是他的畫畫裡有一種真正的\n", + "Detected language: zh\n", + "人的關心,有對生命的最大的關心在裡面。\n", + "Detected language: zh\n", + "我们可以了解到如果我们今天被犯古的话感动也可以说是透过了他的 Untamed 快发嗡\n", + "Detected language: zh\n", + "對於一個非常深層的生命所感動因此\n", + "Detected language: zh\n", + "我想这个部分 是我们谈到它在海牙这一段时期大概1885年之前\n", + "Detected language: zh\n", + "她最絕望的時候,她所創作的一些藝術作品的經驗。\n", + "Detected language: zh\n", + "美的沉思我是蔣旭德\n", + "Detected language: zh\n", + "有神望有地位的那個人叫做母師所以因此在1879年\n", + "Detected language: zh\n", + "我們看到這個夏天這個夏天可以說是范谷醫生受到最大的一次打擊\n", + "Detected language: zh\n", + "因為教會沒有跟他續約教會沒有跟他續約他重新落入到一個失業的狀況\n", + "Detected language: zh\n", + "我們在一系列對於畫家梵谷的介紹裏可能一直到目前\n", + "Detected language: zh\n", + "我想生活上 飯谷其實回到她自己爸爸媽媽的家裡她的吃住也不會有太大的問題\n", + "Detected language: zh\n", + "更大的打擊其實是心靈上的精神上的因為梵谷一心一意\n", + "Detected language: zh\n", + "要做一個非常非常好的牧師那麼這一次在比利時的這麼窮困的礦區裡\n", + "Detected language: zh\n", + "这么艰苦的一年的牧师的工作他自认为他实践了神给予他的使命\n", + "Detected language: zh\n", + "可是他沒有想到最後的終結竟然是一個、類似於被開除的這個身份\n", + "Detected language: zh\n", + "所以我們大概可以想像在1879年之後大概到1880年到 18818\n", + "Detected language: zh\n", + "這兩三年當中大概是范古最痛苦的年代因為他一心一意要做牧師\n", + "Detected language: zh\n", + "可是这个时候他忽然有一种彷徨他不知道何去何从如果牧师做不成他要做什么呢\n", + "Detected language: zh\n", + "其實他自己很茫然因為他那個要為人類救贖想要去幫助所有的人\n", + "Detected language: zh\n", + "受壓迫的 窮困的人的或者痛苦的人的那個心願這麼高在現實生活裡\n", + "Detected language: zh\n", + "大家都發現 梵谷雖然目前在歷史上是以畫家聞名\n", + "Detected language: zh\n", + "它其實很難去做一般性的事務性的這種工作所以我們看到回到自己的家鄉\n", + "Detected language: zh\n", + "非常苦悶那麼也不太願意見人這個時候其實非常有趣\n", + "Detected language: zh\n", + "我們發現 當他在宗教在牧師的這個職業上受到了最大的挫傷的時候\n", + "Detected language: zh\n", + "拯救它的竟然是藝術所以我們很難理解畫畫這件事\n", + "Detected language: zh\n", + "我們平常覺得一個人畫畫好像是一個很開心的事可是有時候我們會發現一個陷入\n", + "Detected language: zh\n", + "在精神状況非常徬徨空虛絕望的人。\n", + "Detected language: zh\n", + "繪畫或者藝術的創作有時候會把一個人從苦悶當中拯救出來\n", + "Detected language: zh\n", + "所以我們都知道,不管從事於繪畫的創作,或者音樂的創作\n", + "Detected language: zh\n", + "比如說你喜歡演奏樂器或是唱歌它可以紓解很多情緒所以這個時候当放鼓\n", + "Detected language: zh\n", + "幾乎沒有朋友的這個狀態那麼它就把繪畫當它最好的朋友\n", + "Detected language: zh\n", + "可是好像一直到他接近30歲,他其實還很少動筆畫畫。\n", + "Detected language: zh\n", + "它开始很认真地画画,很长时间地画画。基本上我们了解到\n", + "Detected language: zh\n", + "范古 其實他的生命非常短他到1890年就自殺了\n", + "Detected language: zh\n", + "持活了37岁可是这个时候它已经30岁了我们会看到接近30岁的饭骨\n", + "Detected language: zh\n", + "他接下的生命只有七年事實上也就是說范古這個時候才起步畫畫的畫\n", + "Detected language: zh\n", + "他繪畫的歷史也只有7年這麼長我們有時候覺得很不可思議\n", + "Detected language: zh\n", + "因為常常看到一個可能從小喜歡畫畫一直在美術學院主流當中\n", + "Detected language: zh\n", + "虽朂种出来shi花几十年可能成绩都没有范古七年那么好\n", + "Detected language: zh\n", + "所以我自己的解释是这样其实一个画家有两种不同的功课要做\n", + "Detected language: zh\n", + "一个功课是说它必须学会技巧我要学油画怎么画\n", + "Detected language: zh\n", + "然后水墨怎么画那么这是技巧的部分其实我自己的观察我一直觉得技巧的部分\n", + "Detected language: zh\n", + "或者我們也提到一點點就是他在做礦工牧師的時候其實是因為他對於工人的一種愛\n", + "Detected language: zh\n", + "學習的時間並不需要太長可是畫家最重要的功課其實是人生的功課\n", + "Detected language: zh\n", + "是生命的功課它在面對畫僕的時候它會不知道要畫什麼\n", + "Detected language: zh\n", + "不知道要画什么表示说生命里面到底有什么东西 是你关心的\n", + "Detected language: zh\n", + "引起你的熱情的所以我想這個部分可能才是我們關切的重點\n", + "Detected language: zh\n", + "那么范古因为他自己一直有一个很强的关切对象他对于社会里面\n", + "Detected language: zh\n", + "養尊處佑的,很富有的,有權力的,政客,或者是身世淑女\n", + "Detected language: zh\n", + "他其實沒有興趣那我們知道這些人在其他的畫家比如說\n", + "Detected language: zh\n", + "《雷諾瓦》或者《莫內的畫》常常出現可是梵古不太喜歡畫這種人\n", + "Detected language: zh\n", + "如果她喜歡畫那種臉黑黑的然後衣服髒髒的一身臭汗\n", + "Detected language: zh\n", + "就在勞動裡面的人所以我們可以說每個畫家都有他關切的主題\n", + "Detected language: zh\n", + "對於他們的同情,他希望留下他們非常辛苦的工作的樣子。\n", + "Detected language: zh\n", + "那么因为他自己在生活里受到了巨大的措伤所以这个时候\n", + "Detected language: zh\n", + "畫畫就變成了他巨大的拯救就開始真正走上了畫畫這一條路\n", + "Detected language: zh\n", + "我們談到了大概1880年前後的範古因為它在1879年的七月的時候\n", + "Detected language: zh\n", + "他從比利時牧師身份被解聘所以808182\n", + "Detected language: zh\n", + "大概是他最絕望的時候他就回到了自己的家鄉可是家鄉裡的人也覺得\n", + "Detected language: zh\n", + "这个人已经二十几岁快三十岁了怎么无所事事 没有职业 好像听说他做了一个牧师\n", + "Detected language: zh\n", + "最後又被開除所以它在那個小小的封閉的農村裡面也被人家指指點點\n", + "Detected language: zh\n", + "她也觉得好像变成了爸爸妈妈很大的一个负担其实她爸爸本身是牧师\n", + "Detected language: zh\n", + "應該有一部分是可以瞭解這個兒子在信仰上或宗教上的熱情\n", + "Detected language: zh\n", + "可是我想父母很矛盾父母通常又希望自己的孩子是一个在社会上能够被大家接受的人\n", + "Detected language: zh\n", + "所以他拿起了碳筆拿起了一些很簡單的工具畫下了他們的一些\n", + "Detected language: zh\n", + "就是他的行為舉止不會異常可是凡古是有一點異常的\n", + "Detected language: zh\n", + "因為他不喜歡跟人應酬他不喜歡嘻嘻哈哈地講有的沒有的事情\n", + "Detected language: zh\n", + "他總是關心生命裡面比較深層的問題可是我們知道有時候我們碰到一個朋友很嚴肅\n", + "Detected language: zh\n", + "跟你談生命活著的意義你也會蠻害怕的所以 也許泛古就走到自己非常孤獨的那條路\n", + "Detected language: zh\n", + "那麼這個時候因為他曾經在十幾歲的時候就在很大的這個藝術經紀公司裡面做過店員\n", + "Detected language: zh\n", + "所以繪畫就變成他熟悉的一個題材所以因此他就走上了繪畫\n", + "Detected language: zh\n", + "那么,当然绘画这件事,他没有受过正规的训练虽然他做过店员,买卖过艺术品\n", + "Detected language: zh\n", + "可是並不說明你拿起畫筆來你可以畫畫所以這個時候她就覺得\n", + "Detected language: zh\n", + "他也许应该上一点课受一点正规的训练那么他们家族里面有一个唐兄\n", + "Detected language: zh\n", + "叫漠夫漠夫當時是荷蘭海牙小有名氣的畫家\n", + "Detected language: zh\n", + "工作的狀況或者生活的狀況那麼這一類我們稱為素描的作品\n", + "Detected language: zh\n", + "所以范古就想說他也許去找這個親戚因為他是一個比較已經上路的畫家\n", + "Detected language: zh\n", + "大概可以给他一些指点所以他就打包了一些他自己的行李那么也把他自己在一段时间里面画的这些农民\n", + "Detected language: zh\n", + "或者是礦工這種樹苗的作品卷起來帶去給他的堂哥莫福來看\n", + "Detected language: zh\n", + "所以到了海牙 這一段時間我們覺得很好玩就說範固曾經考神學院\n", + "Detected language: zh\n", + "最后没有考取那么这次有点像她的另外一种考试就是她想做画家那么当然她不是去考正规的美术\n", + "Detected language: zh\n", + "或美術學院 只是給他的堂哥莫弗看 可是莫弗當時因為是有名的畫家\n", + "Detected language: zh\n", + "也有一个画室,也在教学生所以大家就看到来了一个这个奇貌不扬的年轻人\n", + "Detected language: zh\n", + "那麼就打開他的畫給大家看他的堂哥看了以後就覺得他的基本功訓練不好\n", + "Detected language: zh\n", + "我想我們講基本功是什麼就是基本功是說我們畫畫是有一定的結構的觀念\n", + "Detected language: zh\n", + "比例啊,色彩啊譬如说我们到美术系我们可能会去画模特\n", + ">>>> 09-06\n", + "Detected language: zh\n", + "繪畫成就越來越成熟我這樣講的原因是說我們一直強調\n", + "Detected language: zh\n", + "去拼起來的一個方方的東西就是可以讓一家人圍在那裡吃飯的東西\n", + "Detected language: zh\n", + "就是說 如果他們是農民 是最窮的農民他們不會去買家具的\n", + "Detected language: zh\n", + "他們可能就是自己去撿一些別人不要的木條、木板慢慢拼\n", + "Detected language: zh\n", + "拼出了一个木桌子所以这个木桌子反骨用了一些很粗况的笔处去表现\n", + "Detected language: zh\n", + "這個木桌子當然沒有抱的很平而且沒有油漆所以它就是原木的\n", + "Detected language: zh\n", + "粗粗笨笨的这样的一个桌子那么这个桌子在画面里面几乎占一个比较中央的位置\n", + "Detected language: zh\n", + "然後有五個人物圍繞著這個桌子我們說有五個人圍著他\n", + "Detected language: zh\n", + "所以有一个人是背对我们的我们看到在绘画里很少人会处理完全背面的人\n", + "Detected language: zh\n", + "可是這個人是完全背面的我們看不到他的臉我們只看到他一個背影坐在那個地方\n", + "Detected language: zh\n", + "可是我想,范古希望傳達出一個他看到的真實的景象\n", + "Detected language: zh\n", + "范古最早在繪畫上的起步其實不是像一般人的這種刻板出身\n", + "Detected language: zh\n", + "因爲其實他對這張話有過很多描寫他寫給弟弟的信裏面也有描寫\n", + "Detected language: zh\n", + "他說他走過那些村落看到這些農民白天在田裡面勞動\n", + "Detected language: zh\n", + "非常地辛苦然後用手去挖這個馬鈴薯然後晚上的時候泛古又走過去\n", + "Detected language: zh\n", + "然後這些農民沒有發現泛谷在屋子外面因為我們知道 他們居民住的房子都是破破爛爛的\n", + "Detected language: zh\n", + "所以有很多的缝就是那个房子其实不是很高级的住宅所以那个木板跟木板之间的缝很宽\n", + "Detected language: zh\n", + "所以泛谷走過去就發現裏面有燈光他就停下來了然後他就\n", + "Detected language: zh\n", + "从门蜂里偷看他就看到一个背对他的人然后他也看到面对他的几个人\n", + "Detected language: zh\n", + "圍坐在桌子上他就很好奇這些人在晚餐了他們白天老苦了一天\n", + "Detected language: zh\n", + "他們現在在吃什麼樣的食物她在信裏面寫得非常詳細她很好奇這些人的生活\n", + "Detected language: zh\n", + "然後我就發現說 這些人整個桌子上只有一個食物就是馬鈴薯\n", + "Detected language: zh\n", + "他没有读过美术系,他没有正规美术学院的训练,他在他的堂哥莫福那个画室里...\n", + "Detected language: zh\n", + "沒有任何其他的東西我們今天可能還有什麼三菜一湯啊四菜一湯可是它們沒有它們就是馬鈴薯\n", + "Detected language: zh\n", + "馬鈴薯擺在爐子裏面烤了烤完以後,切成一塊一塊\n", + "Detected language: zh\n", + "所以我們會看到還有一點冒著煙的白色一塊塊的馬鈴薯就是他們唯一的食物\n", + "Detected language: zh\n", + "反骨非常感動\n", + "Detected language: zh\n", + "我想意義不太一樣因為他剛好是白天看到這一家農民是用自己的手在挖馬鈴薯\n", + "Detected language: zh\n", + "現在他們看到這個馬鈴薯就是他們的食物所以他們是真正在土地裡勞動的人\n", + "Detected language: zh\n", + "他们的劳动就是他们的养活自己的一种方法\n", + "Detected language: zh\n", + "這個是梵谷想要畫的東西它要告訴我們說自食其力的某一種尊嚴\n", + "Detected language: zh\n", + "就是這些人的食物是自己種植的那我想我們今天其實分工分得很細\n", + "Detected language: zh\n", + "我吃的米麵大概都不會是我自己種的可是對於, 相信聖經的飯谷來講\n", + "Detected language: zh\n", + "也只是做了一些简单的基本功的练习比如说可能画一些净物\n", + "Detected language: zh\n", + "他一直相信种土地的道德土地里面的人是靠自己的劳力\n", + "Detected language: zh\n", + "生活他們是字時起立的那我們今天已經很難了解字時起立四個字的真正的莊嚴的意義\n", + "Detected language: zh\n", + "所以他有一點想把吃馬鈴薯的人畫成一張非常莊嚴的宗教繪畫\n", + "Detected language: zh\n", + "我們談到了泛古在1885年\n", + "Detected language: zh\n", + "最重要的一件作品叫做吃馬鈴薯的人我們介紹了\n", + "Detected language: zh\n", + "半谷,可能躲在一个村落非常穷困的农村一个破烂的小房子旁边\n", + "Detected language: zh\n", + "透過那些木板的縫隙看到了一家人\n", + "Detected language: zh\n", + "圍坐在一起 吃晚餐的樣子所以它給我們一個非常真實的感覺\n", + "Detected language: zh\n", + "那麼這五個人圍坐在餐桌上幾乎像西方繪畫史上\n", + "Detected language: zh\n", + "最重要的一個題材叫做 最後的晚餐最後的晚餐是耶穌最後一次\n", + "Detected language: zh\n", + "所谓的净物就是说 放一颗玻璃菜 大白菜放几个马铃薯\n", + "Detected language: zh\n", + "按定时辞假之前跟他的12个门徒一起吃晚餐有面包、有红酒\n", + "Detected language: zh\n", + "可是現在返股看到五個農民圍在一個桌子前面只有馬鈴薯\n", + "Detected language: zh\n", + "他會覺得這是一個真正聖經的題材這是一個真正信仰者的題材\n", + "Detected language: zh\n", + "他們甚至在勞動了一天之後只有馬鈴薯可以吃可是范古說\n", + "Detected language: zh\n", + "他們還是低頭禱告感謝神給予他們食物帕谷在最窮的人身上\n", + "Detected language: zh\n", + "看到了最高的道德在最穷的人世上看到了一種真正的信仰\n", + "Detected language: zh\n", + "他會覺得在大城市當中在阿姆斯特丹、在海爬這些有錢人的生活裡\n", + "Detected language: zh\n", + "信仰已经变成了口头上的一种很虚浮的语言甚至在教堂里面讲着漂亮的话\n", + "Detected language: zh\n", + "可是,没有办法在生活里实践他反而看到了这群人,真正在实践一种仪式\n", + "Detected language: zh\n", + "所以我自己覺得吃馬鈴薯的人有一點像宗教的儀式宗教的儀式是說\n", + "Detected language: zh\n", + "紅蘿蔔然後你來練習做油畫的素描那麼去把這些畫畫下來\n", + "Detected language: zh\n", + "大家都記得最後的晚餐的故事耶穌當時 拿起了一個麵包\n", + "Detected language: zh\n", + "然後就把麵包掰了一塊掰了一塊以後他就把麵包傳下去他跟他的弟子們說\n", + "Detected language: zh\n", + "你們每個人分一塊這就是我的身體現在我們看到\n", + "Detected language: zh\n", + "很有趣 在這裡馬鈴薯 是所有這些人他們要吃的東西其實好像是他們自己的生命的一部分\n", + "Detected language: zh\n", + "他們把所有的生命血汗都在田地裡勞動最後得到的這一盤馬鈴薯\n", + "Detected language: zh\n", + "所以我覺得這張畫,如果大家注意到有兩個人物是非常吸引人的\n", + "Detected language: zh\n", + "一個是側面的一個男子這個側面的男子頭上戴了一個藍色的\n", + "Detected language: zh\n", + "一個扁扁的帽子然後身上穿了一件藍色的粗布衣服很顯然是一個當時\n", + "Detected language: zh\n", + "19世紀末、歐洲的工人或農民的打扮然後臉黑黑髒髒的\n", + "Detected language: zh\n", + "我想一天都在田地裡面勞動的人當然不會是皮膚白白細細的那一種\n", + "Detected language: zh\n", + "懂得怎么调色,那么懂得怎么去打底稿,怎么去做构图。可是范固本身......\n", + "Detected language: zh\n", + "西方的繪畫過去就一直在畫那種皮膚很白很紅潤的人物\n", + "Detected language: zh\n", + "那么范古把他的人物转到了另外一种就是土地里面的劳动人民\n", + "Detected language: zh\n", + "所以這個男子側面坐在那個地方他的手好像在指著馬鈴薯\n", + "Detected language: zh\n", + "然後旁邊有一個女人這個女人頭上有一個荷蘭很常常看到的白色的頭巾\n", + "Detected language: zh\n", + "因為他們該工作的時候習慣戴一個白布的一個頭巾把頭髮包起來\n", + "Detected language: zh\n", + "這個女人好像是拿著X字她正在分馬鈴薯她好像是這一家的主婦\n", + "Detected language: zh\n", + "它負責要把這個馬鈴薯其實我們一看就知道5個人吃大概分量不太夠\n", + "Detected language: zh\n", + "那麼它要把這個馬鈴薯分給每一個人分得非常公平那麼這個時候它有一點\n", + "Detected language: zh\n", + "好像停下來他不知道怎麽辦不知道是不是因為馬鈴薯不夠這麽少的馬鈴薯\n", + "Detected language: zh\n", + "怎么够分呢?他就看着可能是她丈夫的这个男人那么她们在交换 一个\n", + "Detected language: zh\n", + "的人因為他對於人的關心那種狂熱所以他其實有時候\n", + "Detected language: zh\n", + "非常奇特的眼神我覺得這個眼神裡面在傳達一種生活上的辛苦\n", + "Detected language: zh\n", + "就是怎麼辦那我們只有馬鈴薯我們只有這麼一點點東西那我們要怎麼分\n", + "Detected language: zh\n", + "也可能是說,那我們就分吧!我們就只有這一點食物,那我們每個人少吃一點\n", + "Detected language: zh\n", + "本來每天都不太吃得飽那我們就分一點這樣的馬鈴薯我覺得反骨的話\n", + "Detected language: zh\n", + "中文字幕剪輯소裃君\n", + "Detected language: zh\n", + "繪畫裡是沒有語言的可是不知道為什麼很多人都覺得吃馬鈴薯的人這張畫\n", + "Detected language: zh\n", + "有點像個戲劇好像我們可以聽到這些人在講話好像他們中間\n", + "Detected language: zh\n", + "有一些语言 他们好像在交谈一样如果大家手头上有泛古的画册\n", + "Detected language: zh\n", + "我想可以細細地看這裡面的一種非常奇特的人的表情跟關係\n", + "Detected language: zh\n", + "特別是這個女人眼睛瞪得很大我覺得這個瞪得大大的眼睛而且手拿著一個叉子\n", + "Detected language: zh\n", + "好像不在意那个技巧在上一个单元当中我们特别介绍他两张很重要的素描\n", + "Detected language: zh\n", + "她本來正有一個動作可是停下來不做了那不做而看男人的時候\n", + "Detected language: zh\n", + "当然里面有一种,讯问的意思就是说,怎么办我们要怎么分这个马林苏\n", + "Detected language: zh\n", + "所以因此我觉得戏剧性的某一种善那被反骨捕捉得非常好\n", + "Detected language: zh\n", + "如果这是他从门缝里偶然看到的一个家庭的景象那么他当时是玩著\n", + "Detected language: zh\n", + "他大概也沒有辦法立刻做素描他必須回到家裡把他剛才看到的東西\n", + "Detected language: zh\n", + "可以換擁了 phrases開發象徑配合問題那你看他們都是我相真地寫的是這些在 Absolutelyír不同的第三組一直在以來都快要掉 Autumn在~~有新的材料你會看到有了不同的 組織\n", + "Detected language: zh\n", + "農村裏面看這些人的生活所以它慢慢慢慢就可以把這個莊嚴的畫面\n", + "Detected language: zh\n", + "拼湊起來那我們也看到這一張畫面的屋頂他做了一點點的描述\n", + "Detected language: zh\n", + "屋頂上很暗很暗可是吊著一盞煤油燈大概這個煤油燈\n", + "Detected language: zh\n", + "是唯一的一個光量所以這個畫面整個四面全部是被黑暗籠罩\n", + "Detected language: zh\n", + "那麼一張是跪在搖籃前的小女孩一張是cm這個憂愁\n", + "Detected language: zh\n", + "因為我們知道窮人的房子在入夜以後在晚上的時候當然他們很珍惜能源\n", + "Detected language: zh\n", + "不是我們今天環保的角度而是他們可能負不起那些沒有燈的錢\n", + "Detected language: zh\n", + "我記得連我們小的時候能關燈就關燈了因為覺得那個電費很貴\n", + "Detected language: zh\n", + "所以这里面其实是因为贫穷所以整个房子非常的暗\n", + "Detected language: zh\n", + "其實真的跟以前很不同因為你到哪裏都是電燈很亮的非常的亮\n", + "Detected language: zh\n", + "因為大家好像比較富有了所以不會覺得過去的生活\n", + "Detected language: zh\n", + "那麼暗一家人這麼大一個屋子他真的就只有那一盞燈\n", + "Detected language: zh\n", + "而那盞灯也就照亮着刚好在灯底下的那一盘的马铃薯\n", + "Detected language: zh\n", + "所以這個畫面裡在整個的暗色調裡面最亮的部分一個是燈一個是馬鈴薯\n", + "Detected language: zh\n", + "變成這個家庭裡唯一的希望唯一的溫暖唯一的糧食\n", + "Detected language: zh\n", + "這裡是iC之音FM97.5您現在所收聽的是美得沉思\n", + "Detected language: zh\n", + "這兩張素描其實不是油畫而是用很簡單的鉛筆妳寫下來了人間的一種\n", + "Detected language: zh\n", + "這個糧食是馬鈴薯是生理上的糧食其實同時也可能是精神上的糧食\n", + "Detected language: zh\n", + "我們談到了范古在1885年最重要的一件油畫作品\n", + "Detected language: zh\n", + "叫做吃馬鈴薯的人也帶著大家細細的看這一張畫我說細細的看是一件\n", + "Detected language: zh\n", + "因為我們常常在這個色調非常沉重非常暗的畫前面\n", + "Detected language: zh\n", + "有的时候会忽略很多的细节我们不要忘记我们今天的视觉\n", + "Detected language: zh\n", + "往往太容易被光鮮亮麗的東西所搶奪如果我們今天去百貨公司\n", + "Detected language: zh\n", + "我想每個出裝都希望打扮得非常地亮麗讓吸引你的注意\n", + "Detected language: zh\n", + "所以你可以買他們的東西可是事實上這個社會裏面當然有很多的角落\n", + "Detected language: zh\n", + "不可能是這麼亮的如果我們的眼睛已經看慣了霓虹燈的炫亮\n", + "Detected language: zh\n", + "我們有時候就看到可能在很窮困的小角落裡面一個遊民\n", + "Detected language: zh\n", + "一種很悲慘的一個景象那麽一直到1885年我們看到他出現了一個\n", + "Detected language: zh\n", + "她的生活的状况视觉是一个很奇怪的东西因为我们习惯了\n", + "Detected language: zh\n", + "某一種亮度的時候按這個東西我們就看不見了過去在美術系我會希望帶領我的學生們\n", + "Detected language: zh\n", + "去習慣看暗裡面的東西譬如說我們通常畫模特兒的時候\n", + "Detected language: zh\n", + "那個光都打的很亮可是如果我們今天把燈都關掉我曾經跟 Middle Art 學生\n", + "Detected language: zh\n", + "做過這樣的練習,燈都關了他們說現在什麼都看不見我說好,那我們就靜坐在這裡\n", + "Detected language: zh\n", + "慢慢的等然後你會發現其實你慢慢就看到東西了很奇怪 因為我們的視覺\n", + "Detected language: zh\n", + "也适应了那个暗的程度然后你会发现其实再暗再暗都不会是一点光都没有\n", + "Detected language: zh\n", + "光 還是在流動光在很暗當中流動是非常的美所以那些夜晚的今夜\n", + "Detected language: zh\n", + "我很珍惜很多的學生有時候很多年後跑來跟我講他們也很珍惜那個夜晚\n", + "Detected language: zh\n", + "因為他說他們發現窗戶慢慢透出一些戶外的月光而那月光\n", + "Detected language: zh\n", + "這個大概早期的畫作裡現在被認為是最重要的作品叫做《吃馬鈴薯的人》\n", + "Detected language: zh\n", + "在房间的石膏像上面或在人的脸上在流动然后他们看到\n", + "Detected language: zh\n", + "那因此這一張反骨的吃馬鈴薯的人也是優惠的光\n", + "Detected language: zh\n", + "因為我們剛剛提到說這張畫裏面的光源只有一個就是屋頂上吊的這一站\n", + "Detected language: zh\n", + "或是一盞煤油燈這樣的煤油燈照亮了\n", + "Detected language: zh\n", + "事内的某些部分特别是底下的这盘马铃薯或者人物\n", + "Detected language: zh\n", + "一些局部的角度譬如說手臂上的光或者是鼻子上的某些光\n", + "Detected language: zh\n", + "在这张画五个人物当中我们刚才谈了三个人物第1个人物是背对我们的\n", + "Detected language: zh\n", + "因為牠離我們最近牠背對我們所以看不到牠的表情那我一再強調說\n", + "Detected language: zh\n", + "背對我們的人物其實是最重要的因為我們一直在猜測他臉上是什麼表情\n", + "Detected language: zh\n", + "是不是覺得很慘怎麼勞動了一天最後吃這麼一點點馬鈴薯那生命裡面的沮喪\n", + "Detected language: zh\n", + "这件作品会在阿姆斯特丹的凡古美术馆里面看到我好几次在这个画前面\n", + "Detected language: zh\n", + "或者疲倦會不會表露出來因為我們看不見它在我們敘述的另外兩類\n", + "Detected language: zh\n", + "可能是跟他的妻子之间的一个对话的关系可是另外一边\n", + "Detected language: zh\n", + "就是面對這段花的右手邊的時候我們看到兩個有一點年老的女人的感覺\n", + "Detected language: zh\n", + "那其中有一個女人頭上也綁了一個白色的頭巾\n", + "Detected language: zh\n", + "然後她右手提了一個壺這個壺黑黑髒髒的大概是歐洲的這種壺\n", + "Detected language: zh\n", + "像煮咖啡的一種銅壺可是因為窮人家這種壺大概也都很簡陋\n", + "Detected language: zh\n", + "上面连金属的光泽都没有我们看到有些画家画这种铜糊的时候还画的\n", + "Detected language: zh\n", + "擦得很亮然后他在画面上只看到4个白色的瓷碗那么这个瓷碗\n", + "Detected language: zh\n", + "不是杯子因為並沒有耳杯的那個耳可能就是晚我想在窮人來講起來\n", + "Detected language: zh\n", + "他们可能喝汤的碗跟喝咖啡的杯子也都不太分的。\n", + "Detected language: zh\n", + "我覺得如果今天這張畫沒有告訴你這是反骨早期的作品我相信很多人都不會停下來看它\n", + "Detected language: zh\n", + "因為我們今天會很細分說這個杯子是拿來做什麼的這個杯子拿來做什麼可是在窮困的人家裡面\n", + "Detected language: zh\n", + "它们能够拥有的物质非常的少所以那个容器可能就是一个白的瓷碗\n", + "Detected language: zh\n", + "然後他正在拿著這個銅鬍道咖啡我們可以看到那個深咖啡色的液體\n", + "Detected language: zh\n", + "可以流到白色的瓷碗里面每一碗里面都有黑色的咖啡黑咖啡意是说\n", + "Detected language: zh\n", + "没有加奶,也没有加糖因为这两个东西都很贵所以在返古的很多书信\n", + "Detected language: zh\n", + "而她在博士院跟日记里面特别提到当时她看到的农民跟矿工大部分晚餐\n", + "Detected language: zh\n", + "最盛须得都是黑咖啡 because it's not sweet黑咖啡就是他们的唯一的取暖的\n", + "Detected language: zh\n", + "某一種飲料可是裡面沒有辦法加奶也沒有辦法加糖所以這四杯\n", + "Detected language: zh\n", + "放在桌子上面可是我們看到另外有一個非常奇特的這個人物\n", + "Detected language: zh\n", + "手上拿了一個白瓷碗伸向這個正在倒咖啡的女人\n", + "Detected language: zh\n", + "因为它的色彩并不漂亮整张画非常的暗那个调子非常非常的暗\n", + "Detected language: zh\n", + "然后脸上又透出一个非常奇特的表情所以这张画很特别我们会发现\n", + "Detected language: zh\n", + "發現這張畫裡面有一種戲劇性的東西因為有一個女人睜大眼睛在看一個男人\n", + "Detected language: zh\n", + "然後好像在問說馬鈴薯只有這麼少我們怎麼辦可是現在有一個人拿著白匙碗\n", + "Detected language: zh\n", + "在伸向這個倒咖啡的女人我覺得他有一個表情是說我可不可以再來一點\n", + "Detected language: zh\n", + "再多一點可是你會覺得蠻絕望的因為好像感覺到這個黑咖啡\n", + "Detected language: zh\n", + "也都有限量因為他們擁有的物質實在太少太少了所以因此這張畫裡面\n", + "Detected language: zh\n", + "特別希望大家可以看到其實左邊跟右邊是兩組不同的人物\n", + "Detected language: zh\n", + "在扮演一個類似戲劇性的活動都是針對食物的問題可是中間有一個\n", + "Detected language: zh\n", + "背對我們的人物完全沒有表情所以因此畫面上就出現了非常強的戲劇性的張力\n", + "Detected language: zh\n", + "所以我才把它跟西方繪畫史裡最重要的最後的晚餐來對比\n", + "Detected language: zh\n", + "甚至我們也會有一點驚訝說飯鼓為什麼已經化油化了\n", + "Detected language: zh\n", + "我的意思是 最後的晚餐之所以被達文西劃到這麼有名是因為他是一個\n", + "Detected language: zh\n", + "一世性的空間所謂一世性的空間就是我們今天回到家裏晚上跟自己的家人吃晚餐\n", + "Detected language: zh\n", + "那我们觉得晚餐就是晚餐我们今天有虾子有鱼有肉我们就这样吃饱就好了\n", + "Detected language: zh\n", + "就走了你不會記得那個晚餐的可是那個晚餐特別重要是可能今天\n", + "Detected language: zh\n", + "因为家里面的某一个老人过生日然后大家都回来了\n", + "Detected language: zh\n", + "為他慶生,然後很莊重的為他祝壽,那麼這個時候\n", + "Detected language: zh\n", + "晚餐它的意義就不一樣我稱它為儀式性的空間\n", + "Detected language: zh\n", + "在基督教的圣经里面描述了耶稣最后一次跟门徒的晚餐\n", + "Detected language: zh\n", + "當然是儀式性的因為它非常的莊嚴很多人認為它根本就是第一台的\n", + "Detected language: zh\n", + "missa可是現在我們看到范谷再一次的把晚餐變成了一個儀式空間\n", + "Detected language: zh\n", + "因為如果你做素描的話素描本身沒有什麼色彩那麼就是黑白的所以它前面的素描\n", + "Detected language: zh\n", + "他要讓大家看到當時的農民工人過什麼樣的日子\n", + "Detected language: zh\n", + "他們的生活、他們的每一個晚餐是這麼慎重的我記得我小時候父親常常跟我講\n", + "Detected language: zh\n", + "他就講一句話支持晚餐就說歷歷皆辛苦但他講這句話的意思是說你今天不種田了\n", + "Detected language: zh\n", + "可是你要知道你吃的那个饭碗里边的每一粒饭粒粒皆辛苦我们小时候吃晚餐的时候\n", + "Detected language: zh\n", + "我觉得那个晚餐对我来说也是一个仪式因为父亲会让你知道说你不能够碎碎便便的\n", + "Detected language: zh\n", + "因為這個晚餐是多少人他勞動的結果所以我想飯谷的的確有意義\n", + "Detected language: zh\n", + "要把吃馬鈴薯的人變成莊嚴性的儀式借他的會話\n", + "Detected language: zh\n", + "都是有一点暗色调那么画油画的话油画里面有红黄啊绿蓝各种漂亮的颜色\n", + "Detected language: zh\n", + "為什麼這張畫整個看起來黑烏烏的那麼大概只有一點深咖啡色的這個調性在裡面移動\n", + "Detected language: zh\n", + "我是蔣旭我們在壹系列對於畫家的介紹裏\n", + "Detected language: zh\n", + "呃 我们已经大概呃 我们已经大概谈过就是说比方饭股的话 Help\n", + "Detected language: zh\n", + "脏脏的 很灰暗的感覺那麼最主要是因為他當時關心的主題\n", + "Detected language: zh\n", + "都是一些穷苦的人我们知道我们今天如果去一个豪宅这个豪宅可能打光\n", + "Detected language: zh\n", + "打的很亮家裡有很多 你很鮮豔顏色的絲絨桌柙或者是地毯\n", + "Detected language: zh\n", + "如果我去画这种好彩我可以用很多漂亮的颜色可是我们知道如果今天去一个很穷困的人家里\n", + "Detected language: zh\n", + "比如说一个矿工家里他的家里颜色一定不会很多的因为色彩这个东西\n", + "Detected language: zh\n", + "尤其在那個年代當中比較窮困的人大概就是灰灰藍藍黑黑的\n", + "Detected language: zh\n", + "这种基本的一种布料而且我们知道如果穿着很华丽艳丽\n", + "Detected language: zh\n", + "也不適合她勞動如果她白天是在田裡面種馬鈴薯的人或者是所居於玉歐\n", + "Detected language: zh\n", + "礦坑裡面去挖煤的人他絕對不會穿漂亮的衣服一定是穿得髒兮兮的\n", + "Detected language: zh\n", + "從他的出生到他所受到的基督教牧師家庭的教育\n", + "Detected language: zh\n", + "所以范古 這個時候他用到色調上的灰暗我覺得跟他的主題的\n", + "Detected language: zh\n", + "內容選擇有非常密切的關係而且其實在他的信跟他的日記當中\n", + "Detected language: zh\n", + "這段時間他常常提到他在比利時河南的一些\n", + "Detected language: zh\n", + "小鄉村裡面逛來逛去不知道大家還記不記得就是梵谷這段時期\n", + "Detected language: zh\n", + "因為他失業了他教會的聘約沒有拿到所以他其實是有一點負嫌\n", + "Detected language: zh\n", + "那傅賢本來他住在爸爸媽媽家裡他又覺得他老是被鄰居指指點點\n", + "Detected language: zh\n", + "他就跑來跑去的常常跑到那種別人不認識他的那種小鄉下因為不認識他\n", + "Detected language: zh\n", + "他會覺得好像避開了很多指指點點特別是我們上一個單元講過\n", + "Detected language: zh\n", + "它在海牙的时候又跟一个叫西燕的妓女住在一起我们可以想象说那个时候即使没有什么狗在\n", + "Detected language: zh\n", + "对可是大概也沸沸扬扬所以他就宁可去那种很穷很穷的乡下因为这种很穷的乡下\n", + "Detected language: zh\n", + "一直談到他後來做了藝術經濟的工作同時他又發願去最窮困的比利時的波里納\n", + "Detected language: zh\n", + "大家不知道他是誰,如果你不知道他背景的話他是一個蠻溫和的人,他也受過很高等的教育\n", + "Detected language: zh\n", + "也做過牧師講話也很溫和很優雅所以她就可以避開很多的眼光\n", + "Detected language: zh\n", + "所以這個時候它就常常在這種小鄉下像扭南啊什麼這種小鄉村走來走去的\n", + "Detected language: zh\n", + "這種鄉村就有機會看到很多非常底層裡的人民\n", + "Detected language: zh\n", + "比如说种马铃薯的人我们知道马铃薯是欧洲的一般农民的主食\n", + "Detected language: zh\n", + "有點像東方的稻米他們的主食是馬鈴薯凡谷常常話說\n", + "Detected language: zh\n", + "他們在收成的時候用手指頭把那個寒冷的冬天\n", + "Detected language: zh\n", + "在土塊里的馬鈴薯挖出來他常常會形容說這些人的手指非常的粗大\n", + "Detected language: zh\n", + "非常的有力量因為他要在很冷很干硬的土裡面去把馬鈴薯拉出來\n", + "Detected language: zh\n", + "所以它就会注意到这些动作也化了很多这类动作慢慢的它就累积到说\n", + "Detected language: zh\n", + "這個礦工去做牧師那麼一直到1879年\n", + "Detected language: zh\n", + "他對馬鱗鼠會有一個意象我想我們今天想到馬鱗鼠只想到說這是一道菜\n", + "Detected language: zh\n", + "這是一種食物可是梵谷不是因為他是看到種馬鈴薯的人所以當我們看到他最後\n", + "Detected language: zh\n", + "我們就畫了一張吃馬鈴薯的人手我們不要忘記他前面畫了很多 種馬鈴薯的人手\n", + "Detected language: zh\n", + "從種馬鈴薯到吃馬鈴薯它把它連成了一個為生活而勞苦的\n", + "Detected language: zh\n", + "Rose Jordan在這件吃馬鈴薯有名的畫作裡\n", + "Detected language: zh\n", + "如果我們能夠克服第一眼看到他時候那種覺得不賞心悅目\n", + "Detected language: zh\n", + "颜色不漂亮的这种困难因为我知道很多朋友看画的时候第一眼的印象是蛮重要的\n", + "Detected language: zh\n", + "第一眼印象覺得非常亮麗很鮮明你就會想停下來看可是梵谷這一張畫是\n", + "Detected language: zh\n", + "完全沒有鮮明的印象因為它就是黑漆漆的一個屋子裡面\n", + "Detected language: zh\n", + "一群人围在小小的一个破破烂烂的桌子前面在吃马铃薯\n", + "Detected language: zh\n", + "牧師的工作被解聘,到了海牙跟一個妓女叫西燕接別\n", + "Detected language: zh\n", + "我剛剛講說,你克服了第一眼這種困難,你能夠停久一點慢慢看的時候\n", + "Detected language: zh\n", + "這張畫其實出現了一些非常美的東西所以很多人認為泛谷的 吃馬鈴薯的人\n", + "Detected language: zh\n", + "是在最黑暗的最沉重的色調裡面出現了一種聖潔的光\n", + "Detected language: zh\n", + "那我想這個句子其實是跟荷蘭化派有關的因為我們知道荷蘭化派\n", + "Detected language: zh\n", + "在犯古之前,一个最有名的画家林布兰特,他就是很擅长于\n", + "Detected language: zh\n", + "把畫面一直用黑色調,或者深咖啡色調,暗色調一直壓壓\n", + "Detected language: zh\n", + "壓得很暗很暗可是慢慢慢慢他在讓裡面發出亮光出來\n", + "Detected language: zh\n", + "林波蘭特的話里曾經描寫她的母親年紀很老很老的母親他們都是非常信仰的\n", + "Detected language: zh\n", + "心教的人所以非常的勤勞非常樸實的一種生命然後他每天\n", + "Detected language: zh\n", + "可能要感谢神用他长满了皱纹的手,去翻译一本《老圣经》\n", + "Detected language: zh\n", + "來往一段時間這個時候我們已經接近到1885年左右\n", + "Detected language: zh\n", + "她就畫了一張她母親的手在翻聖經的樣子然後那個在很暗的色調裡\n", + "Detected language: zh\n", + "那個皺紋上一點點的光非常的動人所以很多人都形容說荷蘭的話派很習慣於\n", + "Detected language: zh\n", + "在非常污濁非常暗的角落去發現光\n", + "Detected language: zh\n", + "那這事實上不只是一種畫法,其實也是一種哲學,那麼意思就是說,\n", + "Detected language: zh\n", + "我們今天如果帶了很多的鑽石穿著很多的光鮮亮麗的衣服走出來這種美 並不是所謂在\n", + "Detected language: zh\n", + "沉重黑暗當中發亮沉重黑暗發亮是說生命裡面有一部分是非常痛苦的\n", + "Detected language: zh\n", + "比如也許我們在醫院我們看到一個癌末的病人他在非常絕望的身體的痛裏面\n", + "Detected language: zh\n", + "她最後可能會想辦法努力的頑強要活下去如果這樣的畫面被你看到\n", + "Detected language: zh\n", + "你會發現祂是在很黑暗的生命角落裡發出祂生命的光我們可以知道說\n", + "Detected language: zh\n", + "荷蘭話派一向是要抓住這種題材的因為他們會覺得把自己打扮的光鮮亮麗\n", + "Detected language: zh\n", + "那1885年,我们也看到慢慢走上绘画的范固。\n", + "Detected language: zh\n", + "並不是真正的美真正的美是生命到了一個最絕望最辛苦的狀況\n", + "Detected language: zh\n", + "還能夠發亮那種黑暗裏面的光他們認為是最美的我們前面也提到過\n", + "Detected language: zh\n", + "在礦工这个社区做牧师的时候它就是进到\n", + "Detected language: zh\n", + "坑洞裡面去的600公尺深的地底下的坑洞是一點光都沒有的\n", + "Detected language: zh\n", + "我们知道很多矿工为了要劳动所以他们戴一个帽子帽子上有一盏小小的灯\n", + "Detected language: zh\n", + "所以很多人就认为说 那个东西就是黑暗中的一点点的光量那么这个光量\n", + "Detected language: zh\n", + "其實有點像宗教或者信仰的力量就是常常讓你在絕望在傷痛當中\n", + "Detected language: zh\n", + "忽然得到了生命的一種啟發所以你在這個畫面裡你就會發現說大概有五個人\n", + "Detected language: zh\n", + "圍在一個木頭的桌子如果你很仔細看這個木頭的桌子這個木頭的桌子\n", + "Detected language: zh\n", + "不像一個桌子它有點像隨便剪來的一些木板或者木條\n", + ">>>> 09-07\n", + "Detected language: zh\n", + "很可惜他在做牧師的這個途徑當中由于他的認真他的熱情\n", + "Detected language: zh\n", + "被這些大量的陽光衝進來然後整個畫面上全部亮起來\n", + "Detected language: zh\n", + "所以我相信色彩常常在代表一個人的心情\n", + "Detected language: zh\n", + "有時候我們會注意一下你的同事或者你的朋友\n", + "Detected language: zh\n", + "你注意它今天突然穿起黃襯衫吹著口哨你大概知道它今天心情很好\n", + "Detected language: zh\n", + "大概有什么事要发生如果你去发现朋友最近这一阵子老是穿很英语的颜色\n", + "Detected language: zh\n", + "好像他的情緒就很低所以色彩其實是跟情緒有關的一個狀態\n", + "Detected language: zh\n", + "所以反骨很明显在1886年之后颜色全部亮起来\n", + "Detected language: zh\n", + "那麼這裡面當然說明一方面它到了巴黎它的視覺感受到更多的陽光的\n", + "Detected language: zh\n", + "明亮,可是還有一點是反骨的心情改變。反骨在這段時間\n", + "Detected language: zh\n", + "住在巴黎的蒙马特跟他弟弟迪奥住在一起我特别要介绍一下\n", + "Detected language: zh\n", + "這樣去幫助所有的農民礦工結果反而遭到了教會的排斥\n", + "Detected language: zh\n", + "萌玛特。它是巴黎北边的一个区域。法文领域那个萌 ate,萌不会死。\n", + "Detected language: zh\n", + "其实就是山 山丘的意思我们讲的mountain这个字就是mountain\n", + "Detected language: zh\n", + "跟拉丁的系統有關的馬特斯烈士因為這個地方\n", + "Detected language: zh\n", + "當在過去發生戰爭以後死了很多的人所以這個地方有一個很有名的白色的聖新教堂\n", + "Detected language: zh\n", + "在那個山頂上 據說是為了安慰所有的亡魂的\n", + "Detected language: zh\n", + "我直接翻譯叫列石山我們現在是用聲音來翻譯\n", + "Detected language: zh\n", + "就叫蒙馬特很多到法國去遊玩的朋友到巴黎觀光的朋友大概一定會被帶到\n", + "Detected language: zh\n", + "蒙馬特區然後你會發現這個山丘的小丘林上現在還有一個畫家村\n", + "Detected language: zh\n", + "很多的画家在那边帮人家画像啊卖画那为什么蒙马特会变成有这样的渊源\n", + "Detected language: zh\n", + "其實就是像返古這些畫家他們最早從別的地方就小城鎮\n", + "Detected language: zh\n", + "因此,他在這樣的一個失望當中, 離開了教會。這個時候他才比較多花了一點時間。\n", + "Detected language: zh\n", + "或者外國,到了法國以後巴黎其實生活非常昂貴\n", + "Detected language: zh\n", + "你要在巴黎租房子吃東西都貴得不得了尤其是艾菲爾鐵塔\n", + "Detected language: zh\n", + "那个区叫做16区你买一瓶水都比别的区要贵好几倍的房租更不要讲了\n", + "Detected language: zh\n", + "所以為什麼大家都急著蒙馬特蒙馬特是第18區\n", + "Detected language: zh\n", + "大巴黎区北边最郊区的一个区以台北来形容\n", + "Detected language: zh\n", + "有點像早期的山蟲或者蘆洲就是外地來打工的人\n", + "Detected language: zh\n", + "會在這種地方安頓因為房租便宜所以蒙馬特就開始變成一個很有趣的區域\n", + "Detected language: zh\n", + "我们知道比梵谷更晚一点从西班牙来了一个穷小子就是皮卡索他就住在蒙马特\n", + "Detected language: zh\n", + "然後住在一個洗衣的工廠裡面所以現在那個地方也變成古蹟了所以我們就會發現\n", + "Detected language: zh\n", + "而且蒙马特出了很多大话讲可能很多朋友听过一个名称叫 红魔方就是木兰户史\n", + "Detected language: zh\n", + "投注在藝術上這可以這樣講通常這個人很喜歡藝術\n", + "Detected language: zh\n", + "魔方就是那種有點像古代的用水力發電的\n", + "Detected language: zh\n", + "磨麵粉的工廠因為後來有電力了所以就不用水力了所以這種大空間\n", + "Detected language: zh\n", + "就廢掉 廢掉以後大家就把這個地方改成其實早期是有點色情的那種\n", + "Detected language: zh\n", + "跳慷慨舞的地方有點像我們的牛肉場然後羅特列克就幫這些\n", + "Detected language: zh\n", + "跳脫衣舞的女孩子畫看板所以她其實並不是一個什麼大家看得起的高級畫家\n", + "Detected language: zh\n", + "可是後來他們都成名了所以蒙瑪特就變得很有名大家就覺得這個地方有一點臥虎藏龍\n", + "Detected language: zh\n", + "都是来的时候都是穷小词可是最后都成名了然后画本来卖不出去像返古本来都卖不出去\n", + "Detected language: zh\n", + "后来樊谷死了以后一张画卖到10亿台币我那个时候认识很多台湾学艺术的朋友\n", + "Detected language: zh\n", + "反正一到巴黎先要去蒙马特混一混因为觉得这个地方出了太多有名的画家\n", + "Detected language: zh\n", + "所以也許對學藝術的人來講是一個鼓勵吧或者一個夢想就是說我今天很窮 沒有關系\n", + "Detected language: zh\n", + "喜歡畫畫,喜歡寫詩,喜歡表演走向戲劇\n", + "Detected language: zh\n", + "天我會跟凡古一樣跟Picasso一樣跟羅特勒克一樣販賣的很貴所以蒙馬特\n", + "Detected language: zh\n", + "我想從反骨的年代到現在一百多年它一直是巴黎最有藝術氣息的一個區域\n", + "Detected language: zh\n", + "可這個區域大家絕對不要誤會它不是我們的心意計劃區它不是昂貴的區域\n", + "Detected language: zh\n", + "它反而是有點窮窮的破破爛爛的裡面很多小偷啊扒手啊欺不塞人\n", + "Detected language: zh\n", + "流浪漢妓女都在這個區街頭上很多活潑的生命現象\n", + "Detected language: zh\n", + "所以我一直感觉到画家到了新一季画区其实是画不出什么画的反而也许到三重卢州\n", + "Detected language: zh\n", + "他會看到更多生命的面貌所以蒙瑪特很活潑那范古當時到了這個地區\n", + "Detected language: zh\n", + "他好快樂因為范古在1886年以後接觸的人,不是農民就是礦工\n", + "Detected language: zh\n", + "都是生活很苦的人可是忽然到了蒙马特我们知道蒙马特即使流浪汉都蛮可爱的\n", + "Detected language: zh\n", + "蒙马特刘兰和我形容一下就是每天去要一瓶红酒要一点面包坐在路边吃东西\n", + "Detected language: zh\n", + "很可能是為了藝術的美可是其實我們特別應該要注意\n", + "Detected language: zh\n", + "他們就是不工作的可是他們就是認為說生活價蠻好的反正人家給他一點\n", + "Detected language: zh\n", + "剩的麵包給他一點剩的紅酒他就有酒喝有麵包吃所以梵谷忽然覺得\n", + "Detected language: zh\n", + "一些人好像窮可是窮得蠻快樂特別要強調他跟工人的窮不一樣\n", + "Detected language: zh\n", + "它跟農民的窮不一樣它還是有一點生活的活潑性所以反骨就受到他們的感染\n", + "Detected language: zh\n", + "整個畫立刻明亮了起來我們提到了反骨1886年到巴黎以後的那種解放\n", + "Detected language: zh\n", + "画风的解放 色彩的解放可是更根本的是他自己生命的解放\n", + "Detected language: zh\n", + "跟他心情的解放這個時候他也有一點像個小流浪漢了每天夾一個素描本\n", + "Detected language: zh\n", + "到处跑来跑去让他认识了很多蒙马特的小酒馆的老板\n", + "Detected language: zh\n", + "或者老闆娘我们知道这种某码特这种区域很有趣就是很多外籍劳工\n", + "Detected language: zh\n", + "比如说有来了一个意大利女人她们都是外国人 反骨是荷兰人酒馆的名字叫当伯坦\n", + "Detected language: zh\n", + "這類的畫家他真正的關心的目的並不是畫本身\n", + "Detected language: zh\n", + "就是零鼓酒管零鼓就是我们跳什么新疆舞的时候会有一种小皮鼓上面有铃铛的\n", + "Detected language: zh\n", + "掀起你的头盖来什么我们就会打着那个鼓叫凌鼓Dumball hand他现在非常有名\n", + "Detected language: zh\n", + "很多人去巴黎觀光都要去看當時就是來了一個意大利的女人這個女人大概交際手腕很好\n", + "Detected language: zh\n", + "他就常常讓這些藝術家到他這個地方來喝酒,聊天\n", + "Detected language: zh\n", + "而且大概蛮重要的是因为画家常常没有钱有时候卖了一张画有钱就请大家喝酒\n", + "Detected language: zh\n", + "可是有時候就沒有錢了這個意大利女人大概也蠻四海的有一點跑江湖跑灌的\n", + "Detected language: zh\n", + "就常常可以让他们涉帐就是说没关系你们今天没有钱你就记账那等到你们华麦了你们再还我\n", + "Detected language: zh\n", + "所以这个酒馆就变成画家很爱聚在那边高谈阔论批评时政\n", + "Detected language: zh\n", + "然後談藝術大家都很開心甚至在那邊辦展覽因為他們都沒有成名\n", + "Detected language: zh\n", + "真正的畫廊也不讓他們展覽就他們說我們就借你這個小酒館我們就把畫掛起來\n", + "Detected language: zh\n", + "繪画、艺术,对他来说只是关心生命的一个方法\n", + "Detected language: zh\n", + "所以帆古就在這邊開展覽帆古有一張畫就在1887年就畫了這個\n", + "Detected language: zh\n", + "小酒館的意大利老板娘甚至有些傳記也認為凡古大概跟老板娘\n", + "Detected language: zh\n", + "有一點戀情在發生可是這個其實沒有證據因為反谷一生他很渴望有愛情有友誼\n", + "Detected language: zh\n", + "可是又不明确并不明确而且这个酒馆的老板娘\n", + "Detected language: zh\n", + "交際手腕太好他跟每個畫家都很好可能每個畫家都覺得她是他的女朋友所以我想這個\n", + "Detected language: zh\n", + "所以有一點像酒吧的那種最好的 bartender 那種調酒者其實都有一點這種能力\n", + "Detected language: zh\n", + "就是因為畫家有時候有一點憂鬱畫賣不掉心情不好他會安慰你的\n", + "Detected language: zh\n", + "被安慰的男畫家都覺得好像他是你的女朋友一樣可是我想真正的傳記上\n", + "Detected language: zh\n", + "還沒有找到很明顯的證據可是反骨畫過老百娘的相而且這個相也曾經來過臺灣展覽過\n", + "Detected language: zh\n", + "我記的 只是凡古他 個少數一兩張來過臺灣展覽的一張畫\n", + "Detected language: zh\n", + "或者說一個媒介,一個橋樑。所以我們會覺得它在 1886 年之前\n", + "Detected language: zh\n", + "就是,凌谷酒馆的老板娘的话所以你可以看到凡谷这个时候跟1886年以前,很不同\n", + "Detected language: zh\n", + "我特別要強調是他認識的人他的性質變了以前都是農民工人\n", + "Detected language: zh\n", + "看到他們 他就想救贖他們覺得他們生活太苦 吃馬鈴薯這麼苦\n", + "Detected language: zh\n", + "可是反蛊自己有窮的鑰匙也幫不了她的忙可是現在在某瑪爾塔塔認識這些人\n", + "Detected language: zh\n", + "都是比較城市邊緣的人可是還不至於生活過不下去\n", + "Detected language: zh\n", + "我的意思说他们多多少少有一点像一个小资产者开个小杂货铺\n", + "Detected language: zh\n", + "開個小酒館生活也都還過得去所以我覺得這些人生活是比較喜悅的\n", + "Detected language: zh\n", + "巴黎的蒙马特有点像台湾的夜市返古忽然到了一个台湾的夜市\n", + "Detected language: zh\n", + "然後在夜市裡面人跟人是很親切的很容易坐在一起吃一碗蚵仔米霜\n", + "Detected language: zh\n", + "然后就聊起天来了那种感觉所以我觉得这个也说明了反骨这一段时间非常的快乐\n", + "Detected language: zh\n", + "剛開始畫畫的時候它的顏色很陰暗他畫很多的礦工很多的農民\n", + "Detected language: zh\n", + "而且很明显他认识了好多画家我们讲到罗特列克罗特列克是法国南部的一个\n", + "Detected language: zh\n", + "爸爸是貴族媽媽也是貴族可是他爸爸媽媽是親親同婚\n", + "Detected language: zh\n", + "所以他有一種軟骨症後來去馬上摔上來他就變成諸乳就是我們看到那個駝背\n", + "Detected language: zh\n", + "然後又有點雞胸然後個子一直長部高帶就140公分那樣所以他就很置禪行愧\n", + "Detected language: zh\n", + "就覺得自己好像其貌不揚在貴族的上流社會裡\n", + "Detected language: zh\n", + "老師覺得自己好像身份很低的感覺所以最後他就流浪到了巴黎\n", + "Detected language: zh\n", + "然後到了巴黎就跟那些蒙馬特的紅魔方跳舞的女孩子甚至色情行業的女孩\n", + "Detected language: zh\n", + "就混在一起幫他們畫像那麼繁古就跟羅特列克變得很好的朋友他也非常喜歡羅特列克的畫\n", + "Detected language: zh\n", + "还有一個就是高庚我们知道高庚更是一个奇怪的人高庚原来是股票市场裡\n", + "Detected language: zh\n", + "一個炒股票的商人然後他的太太是丹麥的一個很有錢的啤酒廠的一個老闆的女兒\n", + "Detected language: zh\n", + "类似我们前面介绍的吃马铃薯的人在很昏暗的灯光里面\n", + "Detected language: zh\n", + "其實她是很富有的人家出身的可是不曉得後來哪根筋不對就是她忽然覺得那個\n", + "Detected language: zh\n", + "有錢的生活很無聊我想我們今天在台灣證券市場股票市場的朋友大概不會覺得無聊\n", + "Detected language: zh\n", + "因為每天都很興奮,就可以賺錢可是高庚竟然賺了錢以後,一點都不快樂他覺得,我賺這麼多錢\n", + "Detected language: zh\n", + "我在干嘛最后他就不管他太太也不管孩子他就跑去画画了所以这一群人都在同一个画室\n", + "Detected language: zh\n", + "当时有一个叫K Tokyo kommen,一个画家,不是很有名的画家开了一个画室,就是有一个民间的绘画学校\n", + "Detected language: zh\n", + "羅特列克,高根, 梵谷都在這裡跟它學化所以它們就變成了\n", + "Detected language: zh\n", + "和有一点像同学其实我们知道画画的同学跟一般学校讲的同学\n", + "Detected language: zh\n", + "有一點不一樣因為他們畫畫就是今天請了一個模特然後我們就畫一畫\n", + "Detected language: zh\n", + "可能不高兴就不画了然后大家就跑出去喝酒跑到街上就玩唱歌其实,艺术家就有点浪漫\n", + "Detected language: zh\n", + "在巴黎到現在還是藝術家還是這樣的生活所以范古他的爸爸是牧師祖父是牧師\n", + "Detected language: zh\n", + "沒有很多的色彩所以這樣的畫作你會覺得有一種壓抑有一種生命的苦悶\n", + "Detected language: zh\n", + "其实牧师的家庭是很压抑的永远在念经的永远觉得自己不能够太快乐\n", + "Detected language: zh\n", + "就違反了基督的信仰可是凡古這個時候忽然快樂起來它忽然覺得生命裡面\n", + "Detected language: zh\n", + "沒有這麼多好玩的事情每一天大家都約著說我們今天去哪裡喝酒我們今天去哪裡畫畫\n", + "Detected language: zh\n", + "去戶外寫生所以她們變成了一伙非常要好的朋友所以我覺得\n", + "Detected language: zh\n", + "這些東西都足以說明為什麼反股在1886到1887的話\n", + "Detected language: zh\n", + "忽然亮起來所以我特別要強調說這個亮起來不只是因為plingsiter色彩對它的影響\n", + "Detected language: zh\n", + "我覺得更重要的是返古自己的心,忽然打開了。他忽然覺得世界…\n", + "Detected language: zh\n", + "對他來講不再是一個痛苦的對象這個世界充滿了希望充滿了夢想\n", + "Detected language: zh\n", + "充滿了各種地表現自我的可能所以這個時候他的顏色才有了一個明亮\n", + "Detected language: zh\n", + "就像我們在心情好的那一天穿的那件黃襯衫一樣\n", + "Detected language: zh\n", + "可是這個時候 如果我們要問反骨 說你為什麼不畫漂亮一點的畫\n", + "Detected language: zh\n", + "那么反骨到了巴黎我们明显地看到它绘画里色彩的改变\n", + "Detected language: zh\n", + "比處的改變可是返歐是不是失去了它最早對社會裡面的\n", + "Detected language: zh\n", + "底層的人的關心是不是放棄了它所謂救贖的信仰呢?我想我們在這裏\n", + "Detected language: zh\n", + "可以再做一个分析我特别借他这段时期画的一张重要的人物\n", + "Detected language: zh\n", + "網路畫作介紹這張畫叫做唐奇老爹\n", + "Detected language: zh\n", + "如果大家看到这张画他是一个穿着蓝色外衣的中年的男人\n", + "Detected language: zh\n", + "长得并不怎么样特别那头上戴了一个扬扬的帽子然后他两个手\n", + "Detected language: zh\n", + "握在胸前很規矩的坐在那邊帆古就畫了它的一張像\n", + "Detected language: zh\n", + "这张像 很有趣的是它后面背景的部分 墙上挂了很多日本的\n", + "Detected language: zh\n", + "服侍会的版画我们可以很清楚可以看到有两个日本的穿和服的女人\n", + "Detected language: zh\n", + "我想返古惠會回答我們說他看到的人生並不漂亮他看到的人生是非常破爛的\n", + "Detected language: zh\n", + "讓唐吉老爹的頭頂帽子上面還有一個日本的富士山的風景\n", + "Detected language: zh\n", + "好,这张画我要跟大家解释为什么这张画里会有日本的版画反谷不是到了巴黎吗\n", + "Detected language: zh\n", + "可是我们要知道说,巴黎这个时候变成欧洲最大的一个大都会\n", + "Detected language: zh\n", + "如果是大都會,它一定有一個特性,不是一個只強調本土的城市。\n", + "Detected language: zh\n", + "才叫做大都會我們知道在西方的名字叫Matropolitans比如說紐約有一個美術館\n", + "Detected language: zh\n", + "Metropolitan哦我們翻譯成大都會美術館紐約是大都會倫敦是大都會\n", + "Detected language: zh\n", + "巴黎是大都会所以凡是被叫做大都会的城市基本上它的文化\n", + "Detected language: zh\n", + "都不是单一的他有很多外来的移民他有很多外来的观光客所以他的文化\n", + "Detected language: zh\n", + "是多元的因此我們就看到翻古到了巴黎以後發現怎麼盟馬特的畫家\n", + "Detected language: zh\n", + "每一個人都收藏日本版化因為他們會覺得JAPAN 日本好遙遠\n", + "Detected language: zh\n", + "所有的人都穿得破破爛爛然後曬的黑黑的沒有很多食物吃\n", + "Detected language: zh\n", + "这个国家到底是个什么样的国家他们不知道但他们充满了好奇充满了对日本的梦想\n", + "Detected language: zh\n", + "所以他們就把日本的版畫掛在自己的家裡我們叫做異鄉情調\n", + "Detected language: zh\n", + "很多人就说,你到一个城市,你要观察这个城市是不是大都会\n", + "Detected language: zh\n", + "你就觀察一般的人家裡掛的某些話如果這些話都是很本土的\n", + "Detected language: zh\n", + "表示這個城市還不是大都會因為它強調我是一個接受多元文化的人\n", + "Detected language: zh\n", + "因此我有時候會覺得可能在台灣我們還沒有看到一個城市足夠被稱為大都會\n", + "Detected language: zh\n", + "我們基本上太強調太多的本土所以我們沒有一個國際的vision一個國際的視野\n", + "Detected language: zh\n", + "可是如果大家看唐吉老爹這張畫可以看到1886年對於反古來講\n", + "Detected language: zh\n", + "凡古本來也是一個荷蘭畫家可是現在他到了巴黎他並不是法國畫家\n", + "Detected language: zh\n", + "他要變成國際畫家了梵谷今天是世界上最有名的畫家我們不會說\n", + "Detected language: zh\n", + "所以乾乾瘦瘦的1886年以前他看到的生命現象都是辛苦的\n", + "Detected language: zh\n", + "他只是荷蘭画家或者法国画家因为在他的画里他大量吸收了\n", + "Detected language: zh\n", + "東方的元素他很喜歡日本版畫他就把唐吉老狄他要畫這個模特兒\n", + "Detected language: zh\n", + "他说你坐在那边后面就挂的都是日本版画所以这张画我特别要解释\n", + "Detected language: zh\n", + "就是說裡面有很多返古剛剛到巴黎的藝文化的因素在裡面\n", + "Detected language: zh\n", + "接下來我就要介紹唐吉老爹是誰為什麼他的名字叫Dunkey後面要加一個\n", + "Detected language: zh\n", + "老爹 這法文叫爸爸就是爸爸的意思\n", + "Detected language: zh\n", + "这个唐棋很好玩他是个老革命党我的意思说1871年\n", + "Detected language: zh\n", + "我們現在從梵谷到巴黎 1886 年往前推1871 年\n", + "Detected language: zh\n", + "就15年前巴黎發生過一次很重要的示威運動叫做人民公社\n", + "Detected language: zh\n", + "就是工人跟农民上街头去跟政府的军队打仗我们在历史上叫做巴黎共識\n", + "Detected language: zh\n", + "都是痛苦的,都是壓抑和封閉的所以他的作品也都在很誠實的\n", + "Detected language: zh\n", + "就是馬克思主義的信仰這個巴黎公社巴黎公社後來失敗了就是這個政府的軍隊\n", + "Detected language: zh\n", + "拿着枪开枪打死了很多的人所以我们现在去巴厘还看到有一个墙叫巴厘攻势墙\n", + "Detected language: zh\n", + "當時有很多公認農民在這邊被槍殺這個唐吉老爹自己是蠻有錢出身的\n", + "Detected language: zh\n", + "可是她很同情工人和農民她覺得工人和農民本來就有資格上街頭去抗議政府對他們的剝削\n", + "Detected language: zh\n", + "抗議政府經濟政策的不當所以唐吉老爹就參加了巴黎共識\n", + "Detected language: zh\n", + "我們知道當時參加巴黎公社以後就被抓了所以他就關到監牢裏去本來大概要判死罪的\n", + "Detected language: zh\n", + "或者判無期徒刑可是唐吉老爹的家庭背景很好我們知道不止我們有關說\n", + "Detected language: zh\n", + "在国外也有观说你是立法委员的儿子你是什么部长的儿子你可以观说\n", + "Detected language: zh\n", + "那唐姐老爹認識一些議員所以這議員就替她觀說她就從監獄放出來了\n", + "Detected language: zh\n", + "放出來以後唐吉老爹他對政府還是很不滿他就在蒙瑪特開了一個小文具店\n", + "Detected language: zh\n", + "表達這樣的一個人生的現象那麼到1886年之後我們看到\n", + "Detected language: zh\n", + "賣油畫顏料 賣畫筆 賣畫布然後他自己很喜歡藝術\n", + "Detected language: zh\n", + "然後這個時候我們就看到高庚、羅特列克、梵谷都跟他買畫布\n", + "Detected language: zh\n", + "買畫筆 買顏料可是我們剛才講過這些畫家很窮常常付不起錢\n", + "Detected language: zh\n", + "這個唐吉老爹就常說沒關西因為他就是革命黨革命黨就說\n", + "Detected language: zh\n", + "有饭大家吃所以他就把这些东西就给他们说可以设账可是唐起老弟的太太胸得要命\n", + "Detected language: zh\n", + "我們知道太太要很可憐因為太太要負責採米油煙醬醋茶她就常常衝出來\n", + "Detected language: zh\n", + "卻來罵他丈夫說你在做生意你到底在幹嘛你把這些東西給這些畫家然後就罵反骨\n", + "Detected language: zh\n", + "所以返古最恨的就是唐吉老爹的這個太太所以這些是他傳記里很有趣的東西\n", + "Detected language: zh\n", + "可是我要講這個故事的原因是說反骨忽然碰到了一群人像我們講到\n", + "Detected language: zh\n", + "临古酒馆的老板娘像唐吉老爹这种人不是工人不是农民\n", + "Detected language: zh\n", + "到梵谷的一生,发生了一个关键性的改变就是她的弟弟叫做迪奥\n", + "Detected language: zh\n", + "可是他們生命裡有一種對窮人的同情他們自己生活還過得去所以反骨忽然覺得這個社會裡\n", + "Detected language: zh\n", + "有很多溫暖的東西就是可以把一杯酒分給別人喝可以把你的顏料\n", + "Detected language: zh\n", + "奢賬給別人說你現在沒有錢沒有關係你先去畫畫吧有一天你成名了你再還我錢\n", + "Detected language: zh\n", + "反顧忽然覺得 這個大都市裡並不是所有的人性都這麼自私這麼冷漠的\n", + "Detected language: zh\n", + "這個城市裡面有溫暖其實我跟很多朋友說我到現在我都喜歡巴黎是因為巴黎到現在還有這個傳統\n", + "Detected language: zh\n", + "巴黎有好多的流浪漢我台灣的朋友去常常看不起這些流浪漢所以他們為什麼不去工作\n", + "Detected language: zh\n", + "可是我也跟他們講說這些流浪漢裡面我認識過有的是巴黎大學的教授\n", + "Detected language: zh\n", + "他們不願意去大學教書因為他們覺得這個社會裡面太多他們不喜歡的體制\n", + "Detected language: zh\n", + "他們寧願做流浪漢然後他們就更加要一點紅酒跟麵包我要特別強調說\n", + "Detected language: zh\n", + "這些酒店的老闆跟麵包店的老闆也很願意把酒跟麵包給這些人\n", + "Detected language: zh\n", + "這個弟弟跟範谷的感情非常地好那麼一路都在幫助這個哥哥\n", + "Detected language: zh\n", + "我覺得我在台灣街要做流浪漢大概可能會活不下去因為我覺得我們很少這樣的老闆\n", + "Detected language: zh\n", + "所以這裡面其實是一個都市的精神巴黎的都市裡面有一種對於人\n", + "Detected language: zh\n", + "追尋他自己生活的欣賞跟尊敬即使你是一個流浪漢\n", + "Detected language: zh\n", + "就像返古当时也穷得要死话也卖不掉返古当时如果在台北的话大概已经不知道怎么样被人家轻视了\n", + "Detected language: zh\n", + "覺得你是一個窮途潦倒的畫家可是帆鼓在當時有唐吉老爹恳把顏料畫布施捨給他\n", + "Detected language: zh\n", + "有一個零股酒館的老闆娘肯把酒捨給他那麼因此我覺得反骨在這一段時間\n", + "Detected language: zh\n", + "得到了非常多的朋友友誼的溫暖那麽這個是我覺的對他的畫風\n", + "Detected language: zh\n", + "最大最大的影響可是 還有一點是 我們下一個單元特別要提的當時1886年剛好發生了一個新印象主義的話判\n", + "Detected language: zh\n", + "那么这个新印象主义里面很重要的一位领导者叫秀娜是反谷的好朋友\n", + "Detected language: zh\n", + "所以我們下一個單元會特別提到反谷在點描畫派的筆觸上是受到新印象主義的影響\n", + "Detected language: zh\n", + "這個時候迪奧他就到了最大的藝術經紀公司做這個藝術經紀公司\n", + "Detected language: zh\n", + "美得沉思我是蔣旭\n", + "Detected language: zh\n", + "是在巴黎的一個分公司的負責人那麽因此他弟弟在這邊賣畫賣得不錯\n", + "Detected language: zh\n", + "那麼在整個的商業行為上也有很多的收入所以他就寫信給范谷\n", + "Detected language: zh\n", + "給他自己最關心的哥哥說你要不要來巴黎 住在我這邊\n", + "Detected language: zh\n", + "至少房租也省了然后这边有很多的画家因为迪奥是做绘画的经济买卖的\n", + "Detected language: zh\n", + "所以他就跟他哥哥說你喜歡畫畫你可以透過我的關係認識很多的畫家\n", + "Detected language: zh\n", + "很多藝術家的朋友因為 floods 之前一再受打擊包括教會\n", + "Detected language: zh\n", + "包括生活周遭幾乎最後沒有朋友了它變成一個很孤獨的一個個人\n", + "Detected language: zh\n", + "所以這個弟弟覺得說如果梵谷到了巴黎的話至少跟這些藝術家相處\n", + "Detected language: zh\n", + "該多一點朋友也會快了起來所以飯谷就被的的奧說動了\n", + "Detected language: zh\n", + "這裡是IC之音FM97.5您現在所收聽的是美德辰斯\n", + "Detected language: zh\n", + "那么她就打包了她的行李就从北方荷兰就到了巴黎\n", + "Detected language: zh\n", + "好,我想荷蘭到巴黎是從北方往南走那裡面有一個很重要的意義是\n", + "Detected language: zh\n", + "我们知道欧洲的北边,比如说法国的北部阿里以北\n", + "Detected language: zh\n", + "跟巴黎的南部基本上是很不同的气温,很不同的\n", + "Detected language: zh\n", + "怎么说日照我说的日照是说那个太阳的感觉很不一样比如说我在巴黎的时候\n", + "Detected language: zh\n", + "覺得每天都陰陰的很少看到太陽 灰灰的所以一到有太陽的時候巴黎人就很興奮\n", + "Detected language: zh\n", + "都会跑到赛纳河旁边去脱了衣服在那边晒太阳因为他们阳光的机会太少\n", + "Detected language: zh\n", + "可是如果你往里昂以南走就在法文裡面叫\n", + "Detected language: zh\n", + "到了南方以後你會發現即使在冬天都有一點陽光亮麗就是所謂的\n", + "Detected language: zh\n", + "普羅旺斯那個地方所以因此我們看到梵谷從荷蘭往南走\n", + "Detected language: zh\n", + "我是講詢我們在一系列的返古的介紹裡今天這個單元可能是非常重要的一個關鍵\n", + "Detected language: zh\n", + "其实有一点在追求阳光因为如果我们今天生活在\n", + "Detected language: zh\n", + "在巴利以北的比利时 荷兰就是范谷早期活动的区域大部分是在荷兰跟比利时\n", + "Detected language: zh\n", + "可是她到了巴黎生活在巴黎的時候忽然她覺得她的世界亮起來了\n", + "Detected language: zh\n", + "那么我觉得大家可以在看梵谷的书的时候你翻一下你会发现\n", + "Detected language: zh\n", + "你即使对饭骨很不了解你只要翻他的画册翻到那个画忽然亮起来颜色很丰富\n", + "Detected language: zh\n", + "有很漂亮的蓝很漂亮的 明亮的黃色的時候你看下年代大概就是一八八六 一八八七\n", + "Detected language: zh\n", + "就是它到巴黎了所以我覺得一個環境對藝術家的影響有時候是很難想像\n", + "Detected language: zh\n", + "比如說今天,我相信今天我們生活在台北的一個畫家能跟生活在高雄的兩個媒體在胡 Nono\n", + "Detected language: zh\n", + "或屏東的畫家他的畫的色彩感也會不一樣因為日照的情況不同\n", + "Detected language: zh\n", + "色彩其實是因為光線而發生的一個狀況比如說在半谷1886年\n", + "Detected language: zh\n", + "因爲我們可以說,凡古在1886年之前,他基本上還沒有跟藝術發生過童年。\n", + "Detected language: zh\n", + "到巴黎他受到最明显的一个影响就是印象派的影响印象派是在1874年\n", + "Detected language: zh\n", + "出來的一個新的畫派那麼這個畫派我們很熟悉的畫家\n", + "Detected language: zh\n", + "像莫內像雷諾瓦比如最有名的莫內莫內就是一生在追求陽光的\n", + "Detected language: zh\n", + "他告訴所有的人說畫畫不要在房間裡畫因為房間裡面\n", + "Detected language: zh\n", + "以前室內的光是假的意思是說我們的燈光\n", + "Detected language: zh\n", + "我們的蠟燭光我們的油燈是假的可是如果到戶外去用戶外的光來畫畫\n", + "Detected language: zh\n", + "就是太陽的光太陽的光是一直在變化的然後太陽的光會使色彩\n", + "Detected language: zh\n", + "才达到一种饱和的程度因此我们就看到这样的一个理论很明显的\n", + "Detected language: zh\n", + "變成一個繪畫視覺上的新的革命新的革命\n", + "Detected language: zh\n", + "所以一向派也叫做外光化派戶外的光的意思外光化派\n", + "Detected language: zh\n", + "非常明顯直接的關係也就說在1886年以前\n", + "Detected language: zh\n", + "所以這些畫家就有一個習慣就是背著畫架 帶著畫布走到陽光底下\n", + "Detected language: zh\n", + "在戶外在畫畫我們接下來會探討到范谷後來都是在現場戶外\n", + "Detected language: zh\n", + "再去攜身風景面對著一大片麥田亮麗的陽光\n", + "Detected language: zh\n", + "去捕捉那个萨纳之间的光那么这个很明显就是因为反顾到了巴黎\n", + "Detected language: zh\n", + "受到了明显的印象派的影响所以她话风从荷兰的\n", + "Detected language: zh\n", + "陰暗的憂鬱的感覺轉換成法國的明亮喜悅\n", + "Detected language: zh\n", + "非常希望大家能够有机会翻一下返古的画册或者有一天\n", + "Detected language: zh\n", + "今天可以偷睁到阿姆斯德丹的坂谷博物馆或者是巴黎的奥塞美术馆阿姆斯德丹xe\n", + "Detected language: zh\n", + "你會發現,你站在反骨的話前面,整個人會覺得有一種被陽光\n", + "Detected language: zh\n", + "燃烧起来的感觉番古是一个非常特别的画家他在画里用强烈的色彩\n", + "Detected language: zh\n", + "雖然他也畫了一些畫可是他主要的生命理想是要去做一個牧師\n", + "Detected language: zh\n", + "使得陽光把溫度好像把溫度留在花布上我不知道這樣一句話對一般人 eveningre\n", + "Detected language: zh\n", + "我看朋友會不會有點不容易理解很多人覺得我看一張畫這個畫裡面\n", + "Detected language: zh\n", + "有色彩可是不应该有温度如果用手去摸这个画布应该是没有\n", + "Detected language: zh\n", + "溫度的可是我的意思說一個畫家可以把顏料調到\n", + "Detected language: zh\n", + "全部是饱和的明度我们知道色彩学里面一个叫彩度\n", + "Detected language: zh\n", + "一个叫明度彩度是讲色彩的频率\n", + "Detected language: zh\n", + "可是還有一個明度,是光線跟色彩之間的關係\n", + "Detected language: zh\n", + "如果穿黃顏色黃顏色是明度非常高的明度非常高比如說\n", + "Detected language: zh\n", + "紫色彩度很高可是紫色的明度并不高尤其是比较偏蓝的紫色的话\n", + "Detected language: zh\n", + "它的彩度高可是明度不高所以如果我們今天用專業的名詞講彩度\n", + "Detected language: zh\n", + "要去為基督教奉獻,去完成祂生命的信仰。\n", + "Detected language: zh\n", + "跟明度的話明度代表一個心情上的某一種亮麗的感覺\n", + "Detected language: zh\n", + "所以我想大家可能聽過什麼情人的《黃襯衫》之類的以前有很多這種老歌\n", + "Detected language: zh\n", + "為什麼用黃色比喻愛情 比喻喜悅為什麼去見情人的時候\n", + "Detected language: zh\n", + "要去穿黃顏色的衣服因為黃色是明度最高的我們也知道古代的皇帝是穿黃色衣服的\n", + "Detected language: zh\n", + "因为黄色他的明度最高他最容易被看到在很多的色彩里\n", + "Detected language: zh\n", + "室内黄色是亮起来的所以很明显的看到反鼓在1886年到巴黎以后\n", + "Detected language: zh\n", + "它的話裡增加了非常多的高明度的黃色而這個黃色\n", + "Detected language: zh\n", + "其實是陽光的色彩就是金黃褐黃明黃各種的黃在他的畫面\n", + "Detected language: zh\n", + "甚至檸檬黃堆疊成一點一點亮麗的這個光線\n", + "Detected language: zh\n", + "因此我們在看反骨的話說我們會覺得好像我們的瞳孔忽然\n", + ">>>> 09-08\n", + "Detected language: zh\n", + "就算有右溜轉子,也知道個字的誰要找先知這裡是 ICGIN-FM97.5您現在所收聽的是《美德程思》我是 蔣勳\n", + "Detected language: zh\n", + "我记得我们谈过范谷在17岁的时候也曾经在这个公司做过职员做过7年之久\n", + "Detected language: zh\n", + "有點像外籍老公一樣的人當中其實我們看到羅特列克也是從南方來的\n", + "Detected language: zh\n", + "後來呢比卡索就從西班牙到了某馬特所以這個某馬特夥伴就變成了很多這種外籍的人\n", + "Detected language: zh\n", + "在一起大家法文都講不好因此也都不會覺得誰是上流級所以大家就會情感特別依賴\n", + "Detected language: zh\n", + "那我覺得他這個時候畫的很重要的一些畫是表現巴黎邊緣的工廠\n", + "Detected language: zh\n", + "我們看到它可以在前景的部分完全是空地遠遠地看到花了一排工廠\n", + "Detected language: zh\n", + "一根一根的煙囱 在冒着黑煙然后工厂的屋顶 是红颜色的这个屋顶\n", + "Detected language: zh\n", + "前面全是荒廢的黃色的土地那我們等一下會分析一下為什麼犯古會畫工廠這樣的主題\n", + "Detected language: zh\n", + "翻古在1887年有一些作品經過專家學者的解讀\n", + "Detected language: zh\n", + "是我們產生了很不同的印象因為這些畫我們看到是風景畫\n", + "Detected language: zh\n", + "西方的風景我們叫 thought我們背了一個畫架跑出去寫生面對一個戶外的風景\n", + "Detected language: zh\n", + "那麼范谷後來離開去做牧師那麼她的弟弟就等於有一點接了她的工作就在姑比喜藝術公司那麼繼續做這個職員\n", + "Detected language: zh\n", + "画画 那么这种我们都叫风景画可是不知道大家有没有印象就是我们如果讲风景画\n", + "Detected language: zh\n", + "我们觉得一定是一个很漂亮的地方比如说有山有水有瀑布\n", + "Detected language: zh\n", + "我们才叫风景话就是如果我们今天跟朋友约了说我们去写声好不好我想大概可能会约到\n", + "Detected language: zh\n", + "比如淡水的码头啊或者是观音山的落日啊就我们一定会找风景好的风景\n", + "Detected language: zh\n", + "我們大概不會跑到一個什麼工業園區然後面對著工廠去劃畫\n", + "Detected language: zh\n", + "因为我们觉得工厂不是一个很美的一个风景可是很显然我们看了1887年\n", + "Detected language: zh\n", + "范谷有一些作品畫得很明顯就是工廠因為在畫的地平線上\n", + "Detected language: zh\n", + "你看到畫面上最重要的主題就是一根一根巨大的煙囪裡面冒著黑煙\n", + "Detected language: zh\n", + "好 我們知道今天的工業比如說我們到工業園區、到科學園區我們不是很容易看到\n", + "Detected language: zh\n", + "这种冒着黑烟的工厂因为我想现在工业的形态也不太一样\n", + "Detected language: zh\n", + "那個他弟弟在藝術經濟方面非常成功以後就住在巴黎的蒙瑪特\n", + "Detected language: zh\n", + "或者環保的觀念也不太讓煙囪冒著黑煙可是泛骨的時代是19世紀末\n", + "Detected language: zh\n", + "87年它在巴黎那時候巴黎的工業是一個初期的工業所以基本上都是燃燒著煤煙的工廠\n", + "Detected language: zh\n", + "那范古为什么会去面对着空气污浊的工厂去画画满天空都是梅血\n", + "Detected language: zh\n", + "為什麼會去畫這些建築物看起來一點都不好看的工廠我們看到有一位學者專家\n", + "Detected language: zh\n", + "後來寫了很重要的論文 分析這件事情就是梵谷基本上曾經在\n", + "Detected language: zh\n", + "礦工的礦kap待故他非常同情工人他覺得當時的工人\n", + "Detected language: zh\n", + "每天工作到14个小时 16个小时是非常不人道的事情而且工人在发生\n", + "Detected language: zh\n", + "礦灾的时候呀,灾变的时候没有得到任何的保障而这些工人本身\n", + "Detected language: zh\n", + "在他们生病或者死去的时候没有任何的福利对他们家庭没有任何的保险\n", + "Detected language: zh\n", + "因此,其實范古在某個部分一直是社會主義的信仰者。\n", + "Detected language: zh\n", + "那麼認識很多當時非常有名的話家等到梵谷一到了巴黎他的弟弟就把梵谷介紹給這一群朋友\n", + "Detected language: zh\n", + "就是他相信社會的財富是大家應該共享的就是我們用我們今天\n", + "Detected language: zh\n", + "就是有勞動者有資本家那資本家是擁有錢的人\n", + "Detected language: zh\n", + "他們要蓋一個工廠,然後找來很多工人來做工。可是范谷會覺得\n", + "Detected language: zh\n", + "得当时的钱都被这些老板赚去了工人都没有赚到那工人工作14小时\n", + "Detected language: zh\n", + "我老板每天工作16小時这么辛苦可是赚的钱比老板少太多太多所以基本上\n", + "Detected language: zh\n", + "她就開始以工廠為主題劃到一個問題就是這位學者特別指出\n", + "Detected language: zh\n", + "梵谷的風景畫前面的空地代表當時荒廢的\n", + "Detected language: zh\n", + "農業土地農民本來可以在田裏面種菜種稻穀種麥子\n", + "Detected language: zh\n", + "來作為他們的生活可是因為資本家來了資本家開始用錢\n", + "Detected language: zh\n", + "把農民的土地買走土地不再耕作了因為他們就在土地上\n", + "Detected language: zh\n", + "我們看到1887年對於梵谷來說非常重要的是她忽然從一個原來非常不快樂的生活走進了一個對她來講光鮮亮麗的新的族群世\n", + "Detected language: zh\n", + "該廠房好 我的意思是說我們知道都市邊緣的土地本來是農地\n", + "Detected language: zh\n", + "比如說我記憶當中我大概青少年的時候台北的東區全部是農田\n", + "Detected language: zh\n", + "可是現在這個地方變成最貴的土地所以如果有大工廠科技公司要在那邊去設廠\n", + "Detected language: zh\n", + "他當年等於從農民的手中把這個土地買來買來的時候可能很便宜\n", + "Detected language: zh\n", + "可是一下就翻了好幾倍我們現在聽到心儀計劃區的土地價格我們覺得簡直像天腳\n", + "Detected language: zh\n", + "可是我想我在大學的時候我都記得那邊的土地並不貴甚至是等於台北的邊緣地區\n", + "Detected language: zh\n", + "我用这个来解释,这位学者指出 范谷在1887年画的这张图\n", + "Detected language: zh\n", + "這個工廠的主題其實有很深的寓意就是她很擔心\n", + "Detected language: zh\n", + "他擔心這個工業像一個怪獸,來勢洶洶,將要吞沒\n", + "Detected language: zh\n", + "所有的農業土地然後他也覺得這些農民將要怎麼辦他們的土地全部被買走\n", + "Detected language: zh\n", + "因為在這個之前我們知道蒡古接觸的大部分就是清教徒牧師或著礦工或著農民都是一些很保守然後生活壓力很大的人\n", + "Detected language: zh\n", + "然後他們就要變成了工業人口他們變成工人然後他們家裡面本來還有土地\n", + "Detected language: zh\n", + "現在沒有土地了等於是簽了一個賣生氣賣給這些工廠然後他們就變成工廠的議員\n", + "Detected language: zh\n", + "可工場裏面又沒有很好勞資雙方的福利制度所以這工人就不斷地被剝削\n", + "Detected language: zh\n", + "好當然我現在談的是19世紀末歐洲工業初期的時候\n", + "Detected language: zh\n", + "發生的社會現象那麼當然是因為經過反鼓這些藝術家不斷地表現這樣的議題\n", + "Detected language: zh\n", + "而引發了大家對工人的同情對農民的同情最後今天我們知道\n", + "Detected language: zh\n", + "歐洲的先進的國家英國、法國、德國他們都有非常好的福利制度甚至有非常完善的保護\n", + "Detected language: zh\n", + "所有農民工人的社會福利制度包括事業保險金包括勞資雙方裡面\n", + "Detected language: zh\n", + "怎麼樣子能夠去分享這個利潤包括保險制度都做得非常完善\n", + "Detected language: zh\n", + "可是也因此我們會對一百多年前像返古這一類的藝術家\n", + "Detected language: zh\n", + "我們也曾經提到他在1882年認識的一個妓女 Cian那麼也是生活非常辛苦的人\n", + "Detected language: zh\n", + "有很多的尊敬因為他們透過了藝術呼喚起大家對人的同情\n", + "Detected language: zh\n", + "所以有時候我們覺得畫畫好像無關緊要反正就畫一張畫可是有時候一張畫\n", + "Detected language: zh\n", + "可以呼唤起所有的人对人的不忍我们其实都有那个不忍人之心\n", + "Detected language: zh\n", + "我們看到一個人受苦看到一個人過度勞動看到一個人生活沒有保障\n", + "Detected language: zh\n", + "我們都會同情可是這個同情需要經過文學或藝術把它呼喚起來\n", + "Detected language: zh\n", + "所以我們知道返古如此再晚一點 11900 年到了蒙馬特的皮卡索也是如此\n", + "Detected language: zh\n", + "比加索我覺得大家都聽過它在1900-1904年有一個時期叫藍色時期\n", + "Detected language: zh\n", + "他專門畫猛瑪特街頭的流浪漢畫這些和賣藝的人\n", + "Detected language: zh\n", + "無家可歸的人他覺得這些人住在蒙馬特非常的可憐就生活完全沒有保障\n", + "Detected language: zh\n", + "那麼這裡面都在表示說巴黎雖然是一個繁華大都市可是繁華都市的背後\n", + "Detected language: zh\n", + "所以范古跟這樣的窮困絕望的人在一起他的生命自然沒有辦法亮麗起來\n", + "Detected language: zh\n", + "其實有一些生活的非常困窘的人那今天我們說台北也是一個繁華大都市\n", + "Detected language: zh\n", + "可是我们能够看到这个都市的边缘可能有一些有米\n", + "Detected language: zh\n", + "可能有一些人生活是没有保障的那这些失业的人口将要何去何从\n", + "Detected language: zh\n", + "並不是每個人都可以開著3000cc的大轎車滿街跑那麼這個時候如果菜價很貴\n", + "Detected language: zh\n", + "房價很貴那麼這些人基本的溫飽都沒有得到保障應該怎麼辦呢我想我從這個角度切入\n", + "Detected language: zh\n", + "希望大家了解范古在他的藝術事業上其實本質上一直是\n", + "Detected language: zh\n", + "人道主義的關懷我們在談1887年受到新印象主義\n", + "Detected language: zh\n", + "影響下的饭股整个心情上的喜悦以及他画风的\n", + "Detected language: zh\n", + "從陰暗轉為亮麗我們特別明顯地看到販股這段時期\n", + "Detected language: zh\n", + "有一些作品是跟猛马特有非常明显的关系的比如说她画过的唐吉老爹\n", + "Detected language: zh\n", + "所以到了巴黎以後她認識了一群畫家而我們可以這樣講吧從經濟生活上來看畫家不是有錢的人尤其是范古剛到蒙馬特那蒙馬特註的畫家大概都是還沒有成名的\n", + "Detected language: zh\n", + "是在蒙馬特開一個文具店的一個老頭他也畫過一個\n", + "Detected language: zh\n", + "就这一个小酒馆的女老板这个女老板叫Siga Turi\n", + "Detected language: zh\n", + "再加脫力他是意大利人你聽他的名字來知道SEGATORIA所以我特別提到說\n", + "Detected language: zh\n", + "蒙馬特其實有很多外來的移民這些外來的移民到了巴黎以後當然買不起昂貴地區的房子\n", + "Detected language: zh\n", + "所以他們可能就在蒙馬特市中偏遠地區租一個小房子\n", + "Detected language: zh\n", + "開個小餐館,價格都不貴那麼蘇格托里這個女人開的餐廳\n", + "Detected language: zh\n", + "叫做 凝骨餐館凝骨是什麼我不知道大家有沒有看過新疆的女孩子跳舞的時候\n", + "Detected language: zh\n", + "手上會拿一面酷,旁邊有鐵片的所以咬起來是有鱗的聲音也有鼓的聲音\n", + "Detected language: zh\n", + "我們叫靈古法文叫當波漢這個餐館到現在還在巴黎就是變成一個像一個古蹟保護\n", + "Detected language: zh\n", + "就是因為范古常常去其實不止范古當時的畫家都喜歡到這裡那麼我想這裡有一個特色\n", + "Detected language: zh\n", + "可是,没有成名以前,大概都苦哈哈的有点潦倒,有点落魄\n", + "Detected language: zh\n", + "就是 我們看到範谷畫了塞加托里的像頭髮梳得很怪高高的然後紅色的頭髮\n", + "Detected language: zh\n", + "我们知道这种小酒馆的女主人她常常是这个餐厅\n", + "Detected language: zh\n", + "生意好不好的一個很重要的原因我們大概在臺灣也知道說有一個叫什麼\n", + "Detected language: zh\n", + "劉媽媽的店之類的那個劉媽媽一定很重要就是說她是很家常婦女的\n", + "Detected language: zh\n", + "然後她出來很喜歡跟這些畫家開玩笑因為畫家都有一點頑皮有時候吃她一點豆腐\n", + "Detected language: zh\n", + "可是她也不在乎可是她也會吃回去之類就是很懂得人情世故的一種女人\n", + "Detected language: zh\n", + "好我想這樣講大家就可以了解他們有一點像今天我們所說夜店裡面的那種\n", + "Detected language: zh\n", + "這種調酒的Bartender就是我們叫調酒師就是我們說這種夜店你會特別想去哪一家\n", + "Detected language: zh\n", + "是因為他那個調酒的人特別懂得人情世故因為你來的時候他看你今天有一點\n", + "Detected language: zh\n", + "倒楣的樣子就知道說你可能買不出去所以他就說今天酒我請你喝一杯吧\n", + "Detected language: zh\n", + "我們在一系列對大畫家範古的介紹裏談到了1886年範古從荷蘭到了巴黎\n", + "Detected language: zh\n", + "可是基本上我想 畫家跟我們說到的農民 礦工還是不一樣\n", + "Detected language: zh\n", + "就是大家去那邊會覺得心情會得到安慰或者說今天你特別開心\n", + "Detected language: zh\n", + "那麼他也跟你一起唱唱歌之類所以泛古跟塞加托麗非常好\n", + "Detected language: zh\n", + "變成很好的朋友所以有一天他就說我幫你畫一張信我們看到這個女老闆就坐在那邊兩隻手\n", + "Detected language: zh\n", + "放在桌子上手上掉了一個香煙有一點呼之欲出就是那種義大利電影裡\n", + "Detected language: zh\n", + "常常看到那种很成熟的女人一个人到了外国开一个小餐馆\n", + "Detected language: zh\n", + "要謀生然後跟這些男畫家混的也不錯所以甚至有些傳記裡面都是\n", + "Detected language: zh\n", + "認為,飯谷可能和塞加托利有一點戀情的關係可是我自己覺得不一樣\n", + "Detected language: zh\n", + "因為這種小酒館的女老闆我們在巴黎看過很多她跟誰都很好\n", + "Detected language: zh\n", + "他不會特別跟哪一個人很好因為她要做生意因為你對每個人就是畫家來了把他們當小孩\n", + "Detected language: zh\n", + "摸摸头啊 拍拍肩膀啊那这些画家就会继续来所以它生意才做得下去\n", + "Detected language: zh\n", + "因為他生活上在畫畫這件事情有一種愉快就是我們可以想像當時蒙瑪特這一批畫家像混在這個有點像牛肉場當中一些跳舞的女孩之間的羅特列客像\n", + "Detected language: zh\n", + "所以我覺得大家看這張畫的時候特別可以感覺到范古當時得到的一種溫暖\n", + "Detected language: zh\n", + "她是荷兰人她到了巴黎其实是一个异乡人通常这种人很寂寞\n", + "Detected language: zh\n", + "可是反骨道1887年特别开心因为认识了一批这样的外国人\n", + "Detected language: zh\n", + "所以他們彼此變成了好朋友大家也可以注意看一下這一張賽加托利的畫的背景部分\n", + "Detected language: zh\n", + "墻上掛著日本服侍會的一些畫作如果大家看完這張畫\n", + "Detected language: zh\n", + "你再翻到唐吉老爹那一張畫唐吉老爹坐在那個地方後面掛滿了都是浮世繪的畫\n", + "Detected language: zh\n", + "好 這是我們又看到了一個有趣的東西就是 范古到了巴黎以後\n", + "Detected language: zh\n", + "一個改變它的畫風很重要的元素不只是新印象主義是日本的福祉會版畫\n", + "Detected language: zh\n", + "我们知道所有的大都会像巴黎已经是一个\n", + "Detected language: zh\n", + "是一個大都會大都會有一個特徵就是國際的東西都會進去\n", + "Detected language: zh\n", + "高根原來是一個炒股票的商人現在他不喜歡股票市場他就跑來畫畫\n", + "Detected language: zh\n", + "比如說我們今天 如果住在屏東我可能聽不到很多歌曲我看不到很多外國的表演\n", + "Detected language: zh\n", + "我可能看不到很多外國的畫展可是如果住在台北我可以看到很多外國的畫展\n", + "Detected language: zh\n", + "我可以聽到很多外國的歌劇跟表演那麼意思說大都會一定有一個特徵\n", + "Detected language: zh\n", + "他是面對世紀他不是local的他不是地方的所以巴黎當時就有很多外國人已經去了\n", + "Detected language: zh\n", + "這個年代很多外國人去日本人也去了日本商人也帶了日本的藝術品\n", + "Detected language: zh\n", + "就是服事会版话梵谷对这个东西非常感兴趣她觉得那个她不了解的国家\n", + "Detected language: zh\n", + "那個很遙遠的日本那個很遙遠的東方她們換女人怎麼會是這樣畫的\n", + "Detected language: zh\n", + "然後日本服飾會的版畫因為它色彩非常的鮮豔所以翻古也得到很大的感動\n", + "Detected language: zh\n", + "就覺得他很想用這樣的色彩來畫畫所以我想到了巴厘以後的梵谷\n", + "Detected language: zh\n", + "很重要的一點是他才跟世界接軌我說世界接軌就是說我們今天住在\n", + "Detected language: zh\n", + "所以這群人也沒有窮到像農民工人那麼窮基本上他們有一個特徵\n", + "Detected language: zh\n", + "鹿港我們住在苗栗我們住在美濃我們可能還很難跟世界接軌\n", + "Detected language: zh\n", + "因為,它是很地方的可是,如果你住在台北高雄你大概必須跟世界接軌\n", + "Detected language: zh\n", + "因為所有的大都會被稱為大都會最大的特徵就是說它一定是比較國際性的\n", + "Detected language: zh\n", + "甚至連他的居民都是比較國際性的所以我們也可以推測那個時候\n", + "Detected language: zh\n", + "像日本的畫家也會到芒瑪特去譬如說藤田次治藤田次治大概在1910、20以後\n", + "Detected language: zh\n", + "就在巴黎也成名起來是一個日本畫家福吉他他已經成名他也住過\n", + "Detected language: zh\n", + "蒙巴納斯或蒙馬特這些地區因此梵谷就跟世界的文化開始接觸在一起\n", + "Detected language: zh\n", + "那麼也使梵谷從原來的一個荷蘭、很鄉下的地方的畫家\n", + "Detected language: zh\n", + "搖身一變的走向國際化我覺得這是對范國非常重大的影響\n", + "Detected language: zh\n", + "因為我們說 這已經是1887年了范谷還只剩下88、89、903年的生命\n", + "Detected language: zh\n", + "就是說 他們大概就是自己養活自己獨來獨往 因為他們大部分沒有家庭的負擔\n", + "Detected language: zh\n", + "他90就自殺了所以最後的3年他才跟世界接觸整個畫亮麗起來 活潑起來\n", + "Detected language: zh\n", + "開始創造出非常明亮的陽光以及亮麗的色彩\n", + "Detected language: zh\n", + "那麼我覺得這跟范谷後來變成一個世界性的畫家有非常重大的關係\n", + "Detected language: zh\n", + "這樣就只有幸福而已美得沉思我是\n", + "Detected language: fa\n", + "اوکر شدند را کی کم的話 س tunga باشم چلند دعا\n", + "An error occurred: 'fa'\n", + "Detected language: zh\n", + "比如說高庚其實有太太有孩子那麼可是因為他後來不想做股票商人\n", + "Detected language: zh\n", + "他就跑來畫畫以後他也不管家了從某一個部分你當然可以說可能是一個蠻不負責任的丈夫或者父親\n", + "Detected language: zh\n", + "可是畫家有一種天生的浪漫或者瀟灑\n", + "Detected language: zh\n", + "所以他們即使蠻窮口袋裡摸不出幾個錢可是過得日子還算快樂就是只要有一點錢他們就會聚在一起跑到小酒館、去喝杯啤酒\n", + "Detected language: zh\n", + "唱唱歌去玩一玩就是我覺得范谷到這一群人當中跟她在工人當中非常不一樣\n", + "Detected language: zh\n", + "所以一般講起來,如果介紹範谷的傳記,都會以1886年作為非常重要的分水嶺。\n", + "Detected language: zh\n", + "因為他感覺不到生活壓力因為這批人有一點是遊離在社會的邊緣的一群人\n", + "Detected language: zh\n", + "他們有一個夢想是有一天他們畫畫可以畫得很好那畫也可以賣得很好可以開很重要的展覽\n", + "Detected language: zh\n", + "變成有名的畫家可是此刻他們都還很窮途潦倒所以窮途潦倒的人特別彼此會容易聚在一起給對方溫暖\n", + "Detected language: zh\n", + "所以我想 泛谷在1886年之前那種跟人相處的困難\n", + "Detected language: zh\n", + "以及她幾乎是完全孤獨沒有朋友我們知道她1882年跟妓女同居在一起的時候\n", + "Detected language: zh\n", + "連他爸爸都不認他他的家庭都要跟他斷絕父子母子的這個關係\n", + "Detected language: zh\n", + "所以他是極其孤獨的可到了巴黎以後他認識好多畫家其實是他很開心的一段時期\n", + "Detected language: zh\n", + "我们前面也介绍过1887年他画了一张很重要的画叫《唐吉老弟》\n", + "Detected language: zh\n", + "我们介绍过唐籍所有的画家都叫他叫老爹老爹这个名字就有点像\n", + "Detected language: zh\n", + "叫伯伯啊 uh 做阿叔说就是是一个尊臣啊 其是西方人很少对一个长辈\n", + "Detected language: zh\n", + "那麽意思是说,在1886年之前,在荷兰在比利时的饭谷基本上她的画风比较的暗\n", + "Detected language: zh\n", + "即使年纪比我大会有这种尊称所以大家叫BärBär就是爸爸的意思\n", + "Detected language: zh\n", + "唐吉老爸,老爹是因为唐吉本身是一个广义的社会主义者\n", + "Detected language: zh\n", + "他非常同情窮人他自己開了一個小文具店油畫顏料 賣文具 賣畫筆 賣畫簿\n", + "Detected language: zh\n", + "那這些畫家很窮很窮又要畫畫所以就常常跑到那些地方去買畫布 買顏料\n", + "Detected language: zh\n", + "可是付不起钱可是唐吉老爹很喜欢这些画家就让他们设账我们知道设账是不付钱先计账\n", + "Detected language: zh\n", + "表示说我有天我话卖了有钱我再还你所以这个唐吉老爹的太太就非常恨这匹画家\n", + "Detected language: zh\n", + "因为她觉得这批画家老是来跟她丈夫设账然后他丈夫又很爱这些画家老实的妖迷\n", + "Detected language: zh\n", + "那麼從來也不計較所以太太是兇的每次看到飯肚 糕根來說就拿著掃把打他們出去\n", + "Detected language: zh\n", + "就變成他們的蠻有趣的一個故事他們就偷偷常常講說那個唐啟老街的太太比蘇格拉底的太太還要凶\n", + "Detected language: zh\n", + "因為歷史上很有名的大哲學家蘇格拉底的太太非常兇\n", + "Detected language: zh\n", + "畫面上很少有明度、很高的顏色另外繪畫的主題大概都是工人礦工、農民啊或者紡織工人\n", + "Detected language: zh\n", + "說這裡面有一種小小的生活的樂趣就是人的幽默可愛因此1887年我覺得是反骨一身\n", + "Detected language: zh\n", + "非常快樂的時刻你可以看得到她的話在這一年當中完全亮了起來\n", + "Detected language: zh\n", + "我们谈到了1887年的范古如果大家有印象或者将来有机会到阿姆斯特丹的范古美术馆\n", + "Detected language: zh\n", + "或者是荷兰有一个地方叫库拉木勒那个地方也有一个蛮好的范谷博物馆\n", + "Detected language: zh\n", + "或者是巴黎的奥塞美术馆里面收藏了很多饭骨的画我讲的这三个美术馆都是收藏饭骨的画最多的地方\n", + "Detected language: zh\n", + "如果大家有兴趣看梵谷的原作不要忘了阿姆斯特丹的梵谷美术馆\n", + "Detected language: zh\n", + "酷拉姆勒的梵谷美術館以及巴黎的奧塞美術館那麼你去看梵谷的醫生的作品的時候\n", + "Detected language: zh\n", + "如果看单件你看不出来你看他一生的作品你就很明显看到1882年他画的画\n", + "Detected language: zh\n", + "我們介紹過吃馬鈴薯的人還是很暗的色調\n", + "Detected language: zh\n", + "可是1到1887的時候她整個畫裡面的顏色忽然亮起來了特別明顯的看到\n", + "Detected language: zh\n", + "所以《1886 年》以前的犯鼓的作品給我們一種非常沉重的在現實當中勞動而疲倦的人生的感覺\n", + "Detected language: zh\n", + "它那時候畫過像蒙馬特的風景那麼這張畫我們大概可以看到是受到很明顯的\n", + "Detected language: zh\n", + "當時在蒙馬特的一個畫家叫做秀娜沙哈S.E.U.R.A.T。\n", + "Detected language: zh\n", + "台灣可能對這個畫家還太熟就是秀拉秀拉創立了一種畫畫的方法叫做點描\n", + "Detected language: zh\n", + "就是用一個小點在畫布裡面把光,跟色彩分析成色譜\n", + "Detected language: zh\n", + "什么叫做色谱呢?我们知道我们有时候去检查我们的眼睛有没有色盲或者色弱\n", + "Detected language: zh\n", + "有一本書翻開來裡面就有色譜這個色譜就是把太陽的光分成橙紅 黃綠 藍 錠紫\n", + "Detected language: zh\n", + "那麼這七種顏色構成了所謂的光譜或者色譜當時修拉因為他們受到了一些\n", + "Detected language: zh\n", + "光學理論的影響他們讀了一些科學上的報告他們知道了光學光當中有紅、橙、黃、綠、藍定辭光當中有紅、橙、黃、綠、藍定辭光當中有紅、橙、黃、綠、藍定辭\n", + "Detected language: zh\n", + "所以他們就用這7種顏色來做點描的方法來畫畫等於是一種科學的分析\n", + "Detected language: zh\n", + "那麼這種畫派叫點苗畫派因為它上面有很多一點一點的像小小的雨點\n", + "Detected language: zh\n", + "那麼到1886年後 到了巴黎我們特別明顯的是看到在1887年這一年對法本來講特別地重要因為\n", + "Detected language: zh\n", + "一樣在畫布上的感覺所以我們就稱他為點描畫派而當時也有一個批評家叫費內翁\n", + "Detected language: zh\n", + "非內翁那非內翁他是個非常敏感的人他當時就寫了評論潭秀拉的話\n", + "Detected language: zh\n", + "他說在1886年之後點描畫派一旦出現印象主義就是原來最主流的最紅的這個畫派\n", + "Detected language: zh\n", + "就不再是主流了他说应该要加一个post rich或者nail就是新印象主义\n", + "Detected language: zh\n", + "或者後印象主義那麼意思說1874年由末內所建立的印象主義已經過世了\n", + "Detected language: zh\n", + "经过12年到了1886年有了一个新的划判所以他在印象主义impressionism这个字前面加ne\n", + "Detected language: zh\n", + "NEo就是我们拉丁文系统里面后来演变成英文的NEW就是新印象主义\n", + "Detected language: zh\n", + "所以我们也把反古1887年列在新意象主义特别是如果大家手上有他的画策\n", + "Detected language: zh\n", + "你可以翻开它1887年的作品你可以看到它画蒙马特的风景前面有一条宽广的马路后面有一些房子\n", + "Detected language: zh\n", + "那么特别注意看它前景的部分全部是用油画比一点一点点出来的\n", + "Detected language: zh\n", + "他到了巴黎投靠他的弟弟德奥他的弟弟德奥跟他的感情非常好\n", + "Detected language: zh\n", + "而且很明顯你看到他的畫面上大量用到黃色因為黃色是高明度色彩\n", + "Detected language: zh\n", + "我們好幾次提到過你會發現你不知不覺今天打開衣櫃很奇怪就選了一個黃色的襯衫\n", + "Detected language: zh\n", + "或者黃色的一條裙子你就會發現可能你自己都不知道你今天心情特別好\n", + "Detected language: zh\n", + "可能是因为你收到了一个好朋友的信可能是因为爱你的人打了个电话可能是因为你想起这一天是你的结婚纪念日\n", + "Detected language: zh\n", + "或者你的生日就是為什麼黃色常常會變成一個歌裡面的所謂\n", + "Detected language: zh\n", + "情人的黃襯衫因為黃色是最高明度在視覺上我們注意黃色有一種警戒的作用\n", + "Detected language: zh\n", + "因为它是视觉上最容易看到的颜色所以大家有没有发现红绿灯里面黄色是警戒灯\n", + "Detected language: zh\n", + "就是從綠燈變紅燈或者紅燈轉綠燈的時候它有一個過渡就是黃燈因為它是警告就是說我們的速度要改變\n", + "Detected language: zh\n", + "或者我們車子,比如我們開車,車子尾巴後面要打的這個方向燈\n", + "Detected language: zh\n", + "閃燈的時候也是黃色所以黃色是因為我們視覺上最容易被看到的顏色\n", + "Detected language: zh\n", + "他當時在巴黎已經是一個小有名氣的藝術經紀商人古筆西藝術經紀公司\n", + "Detected language: zh\n", + "最明亮 它是明度最高的所以如果一個畫家畫面開始用大量的黃色\n", + "Detected language: zh\n", + "我們就會發現這個畫家這個時候在心情上喜悅或者慷奮的狀況\n", + "Detected language: zh\n", + "所以我們特別希望大家能夠分析一下範谷在1887年的畫作\n", + "Detected language: zh\n", + "就是這個時候他常常被了化解就跑到戶外郊外\n", + "Detected language: zh\n", + "蒙马特是一个丘陵区的山区它也是大巴厘的边缘\n", + "Detected language: zh\n", + "其實現在蒙馬特還算是巴黎北邊的邊緣曲我常常形容蒙馬特有一點像山蟲或蘆洲\n", + "Detected language: zh\n", + "就是他房價比較便宜這個地方通常過去是寄布賽人或者外來的勞工住的地方\n", + "Detected language: zh\n", + "所以它一直不算是一個高級住宅區可是畫家剛到巴黎很窮沒有辦法住到很貴的我們所說的什麼信義極華區區\n", + "Detected language: zh\n", + "所以他們就可能住在三重汝州新移民很多的地方所以因此反鼓不是荷蘭人嗎\n", + "Detected language: zh\n", + "他到巴黎其實他是一個異鄉人他是外地來的所以他就混在這一群一大堆的這個\n", + ">>>> 09-09\n", + "Detected language: zh\n", + "范古完全模仿日本服侍会画出来的一张油画这是非常特殊的经验\n", + "Detected language: zh\n", + "大家覺得那個地方 阿爾的風景裡一定要有那個吊橋所以就等於把它重建起來\n", + "Detected language: zh\n", + "就是按照范谷的画,把那个吊桥重建起来所以我们觉得很有趣的就是,一个画家\n", + "Detected language: zh\n", + "或者過一個文學家他生活在一個地方他等於替那個地方保留了很多的記憶有時候我們在一個地方\n", + "Detected language: zh\n", + "长久了,房子也拆掉了,一个老的桥也拆掉,很多的记忆就消失了。\n", + "Detected language: zh\n", + "可是因為一個文學家寫到那個建築,或者那條街\n", + "Detected language: zh\n", + "或者一個畫家畫過那條街或者畫過那個橋那些古蹟就留下來了\n", + "Detected language: zh\n", + "所以我想這裏特別看到范古、魏阿留下了\n", + "Detected language: zh\n", + "或者创造了很多景点今天很多的游客会特别跑到阿尔去观光\n", + "Detected language: zh\n", + "美食 suite那边的餐厅那边的旅馆特别是饭肤住过的\n", + "Detected language: zh\n", + "黃色房屋旁邊的旅館特別是他常去喝咖啡的那個星光咖啡屋\n", + "Detected language: zh\n", + "因為日本的博士會是板話所謂的板話就是說拿刀子在木頭上刻出來\n", + "Detected language: zh\n", + "永遠集滿了人永遠有世界各地的遊客在拍照我想大家可以了解\n", + "Detected language: zh\n", + "一个饭骨为阿尔创造了多少的观光资源所以有时我们很难解释\n", + "Detected language: zh\n", + "就是梵谷只是一個意外吧他只是要往南走因為他覺得南方陽光比較亮\n", + "Detected language: zh\n", + "因為巴黎一直到冬天天空很灰,陽光很少可是越往南方走\n", + "Detected language: zh\n", + "陽光越亮麗所以他覺得他希望追尋一種陽光\n", + "Detected language: zh\n", + "也許不只是我們所說的大自然裡的陽光我覺得是梵谷心裡面對美\n", + "Detected language: zh\n", + "對燦爛對熱情一種渴望因為等下我們會講到\n", + "Detected language: zh\n", + "他在1888年在阿爾的梵谷其實經歷了他生命裡面非常特殊的一年\n", + "Detected language: zh\n", + "她到处去画画然后非常非常的寂寞非常的孤独因为阿尔这个小镇\n", + "Detected language: zh\n", + "就是那些洗衣服的女人就是那些在田里收割麦子的男人\n", + "Detected language: zh\n", + "然后在印刷出来的话叫浮世卫版画因为日本这种画是可以拿来章贴的\n", + "Detected language: zh\n", + "都是文盲都不是自恩饭股在巴黎不一樣\n", + "Detected language: zh\n", + "他在巴黎认识很多的好朋友可是在巴尔他几乎没有朋友那么在那种孤独的状况里\n", + "Detected language: zh\n", + "他非常的渴望友誼所以他就不斷地一封信接一封信一直在寫信\n", + "Detected language: zh\n", + "我們知道范谷最有名的就是留下了非常非常多的書信這些信裡面\n", + "Detected language: zh\n", + "絕大部分是寫給他的弟弟迪奧裡面有很多是寫給羅特列克的寫給高庚的\n", + "Detected language: zh\n", + "那當然我們說書信是一個人在寂寞的時候跟別人的溝通有點像我們今天的email\n", + "Detected language: zh\n", + "跟別人的溝通可是溝通裡面一定需要一種對話比如說最有名的就是 succeed很喜歡羅特列克\n", + "Detected language: zh\n", + "所以他寫了很多信跟羅特列克可是羅特列克每天都陶醉在所有他身邊的那些女人當中\n", + "Detected language: zh\n", + "它對反骨沒有什麼興趣它從來不回信一封信都沒有回過所以當然如果我們今天寫信給一個朋友\n", + "Detected language: zh\n", + "一直寫一直寫最後沒有回信你就慢慢就不寫了那麼其中比較回信的就是高根\n", + "Detected language: zh\n", + "有點像海報,所以它等於是早期的印刷那麼飯顧對這個開滿了櫻花的日本的浮世繪版畫\n", + "Detected language: zh\n", + "所以他跟高根就变成很好的朋友因此我特别要谈到就是说这段时期\n", + "Detected language: zh\n", + "来与及、联系、放古跟外面世界很重要的一个现象\n", + "Detected language: zh\n", + "就是书信它是靠信再跟外面联系所以因此如果我们看R27\n", + "Detected language: zh\n", + "与范谷的画我们会看到一张有趣的作品就是他画了当时\n", + "Detected language: zh\n", + "2 都一个邮差叫做 HulanR-O-U-L-I-N我们翻译成胡铃\n", + "Detected language: zh\n", + "这个狐狸有猜范古在画他的手头上带了一个油猜的帽子身上穿了油猜的制服\n", + "Detected language: zh\n", + "就深蓝色的油菜制服两排的金扣子这个油菜是一个很普通的人可是我们知道\n", + "Detected language: zh\n", + "這個油柴狐磷幾乎變成了ότε哪裡最早的一個好朋友為什麼? 因為他不斷的\n", + "Detected language: zh\n", + "送信,就是范國寫出去的信是透過他送出去別人寄給范國的信\n", + "Detected language: zh\n", + "也是透过胡琳拿给她的所以那个邮差就变成了她跟外面世界的一个重要的联系\n", + "Detected language: zh\n", + "產生了很大的感動因為這種花其實在歐洲他們看到的不多就完全是一個東方式的繪畫\n", + "Detected language: zh\n", + "因此,范谷有一天跟胡琳说要不要坐下来胡琳是一个大胡子的一个男人\n", + "Detected language: zh\n", + "其实是非常乡下的那种邮差可是我自己后来住在巴黎的时候我也跟这个邮差变得非常好\n", + "Detected language: zh\n", + "就是法国的游才来的时候好像不忙那我就说,哎,你不忙,你要不要坐下喝杯咖啡\n", + "Detected language: zh\n", + "我們就坐下來跟你聊聊過一會說哎呦不得了我要趕快去送信又跑了就是這是很法國人的個性\n", + "Detected language: zh\n", + "所以那個郵差很溫暖郵差也常常讓你覺得變成某種友誼的代表\n", + "Detected language: zh\n", + "他自己本身就是一個符號因為他為人類傳遞書信所以我覺得這張畫\n", + "Detected language: zh\n", + "大家如果看到你會覺得很可愛特別是飯谷在這麼寂寞的一個小鎮裡\n", + "Detected language: zh\n", + "幾乎唯一的一個好朋友我們談到1888年\n", + "Detected language: zh\n", + "phankou 从巴黎到了阿尔不知道大家有没有感觉到 phankou 的足迹\n", + "Detected language: zh\n", + "一直從北方往南方走從荷蘭到波非納使的比例\n", + "Detected language: zh\n", + "最特別的是我們看到飯古在模仿這一張日本服侍會版畫的時候\n", + "Detected language: zh\n", + "然後到巴黎,然後再到阿爾他的足跡一直在往南走\n", + "Detected language: zh\n", + "他当时觉得南方对他来讲是阳光的故乡,他想要去感觉阳光。\n", + "Detected language: zh\n", + "她到了阿爾的時候她覺得非常的興奮她在朗羅瓦的這個吊橋裡\n", + "Detected language: zh\n", + "畫出了非常為什麼戰�전的天空我們知道這種藍在巴黎\n", + "Detected language: zh\n", + "都不太容易看到因为巴黎的天常常是灰的而这个湛蓝的天空整个倒影在龙河的河水里\n", + "Detected language: zh\n", + "然後有一些婦人在河邊洗的衣服然後草坡上的麥子\n", + "Detected language: zh\n", + "都是金黃色的所以那時候他很幸福他寫了很多的信給他弟弟給高根\n", + "Detected language: zh\n", + "告訴他們說這裏的陽光多麽亮麗我想這裏面有一個很特別的一點也許大家可以了解\n", + "Detected language: zh\n", + "就是泛谷很想跟別人分享她所感覺到的美可是有時候他會狂喜到去誇張\n", + "Detected language: zh\n", + "其实我们也知道她在2的时候有非常落寞的时刻有非常孤独的时刻\n", + "Detected language: zh\n", + "它上面兩邊,有點像對聯一樣,它還模仿寫了一些漢字。\n", + "Detected language: zh\n", + "我們也有看到她有時候在阿爾晚上睡不著覺她就走到龍河的岸邊\n", + "Detected language: zh\n", + "在河邊散步,河邊非常的荒涼因為小鎮人口晚上都睡覺了\n", + "Detected language: zh\n", + "因为农民都睡得很早那么他睡着了睡着了以后他就看到天空上有一些繁星\n", + "Detected language: zh\n", + "因為我們知道在鄉下沒有很多的燈光燭火\n", + "Detected language: zh\n", + "他就描解那些星光以及路灯导映在河里面的感觉我觉得那张画里面\n", + "Detected language: zh\n", + "其實有一種荒涼跟某一種寂寞也可以瞭解到梵谷其實一直在非常孤獨當中\n", + "Detected language: zh\n", + "渴望跟人溝通可是他過去跟工人溝通跟農民溝通其實都沒有成功過\n", + "Detected language: zh\n", + "到了巴黎以後她跟一些她喜歡的畫家溝通短暫得到了一些快樂\n", + "Detected language: zh\n", + "可她內心深處好像一直有一種很大的渴望是真正有一個懂她心事的人\n", + "Detected language: zh\n", + "可是他一直沒有找到他大概比較好的就他的弟弟迪奧所以他給迪奧的信裡面\n", + "Detected language: zh\n", + "我们知道,日本受到贫甲名、骗甲名的影响有日本的文字。\n", + "Detected language: zh\n", + "是不斷地在請吐他的心事的可是這個時候他既忘了一個人\n", + "Detected language: zh\n", + "她覺得高庚是所有畫家裡感覺最懂心事的人\n", + "Detected language: zh\n", + "所以他就一封一封的写信给高歌然后把他所有在阿尔感觉到的那个风景的美\n", + "Detected language: zh\n", + "不斷地用最狂喜最亢奮的方式表達出來\n", + "Detected language: zh\n", + "然後不斷地去催促高庚說你趕快下來你跟我一起住\n", + "Detected language: zh\n", + "我们一起画画,我们的日子会多么快乐因为我们也可以知道在寂寞跟孤独里的人\n", + "Detected language: zh\n", + "會有很大的渴望就是對一種友誼的渴望渴望高更來陪伴她\n", + "Detected language: zh\n", + "渴望高跟跟他一起畫畫的那種快樂這個時候 我們看到大概從1888年的春天\n", + "Detected language: zh\n", + "他就開始不斷去寫信給高庚描述他所看到的阿爾利\n", + "Detected language: zh\n", + "的确我们也看到这一段时期范古的话改变非常非常的大\n", + "Detected language: zh\n", + "可是日本比較古典的繪畫上提詩的話通常是用所謂的漢字就是牽句來提詞\n", + "Detected language: zh\n", + "因為他原來在巴黎在1887年受到點描畫派的影響他的畫面的點是很小的\n", + "Detected language: zh\n", + "碎碎的 一點一點的感覺可到阿爾以後因為他把畫家立在麥田當中\n", + "Detected language: zh\n", + "他感覺到阿爾的陽光非常的強烈好像鞭打在你的身上\n", + "Detected language: zh\n", + "會曬的你皮膚發燙的讓他感覺到風吹過的脈浪是這樣翻飛\n", + "Detected language: zh\n", + "所以它這個時候筆觸變得很大你可以感覺到如果這段時期的畫作\n", + "Detected language: zh\n", + "你面臨到飯谷的原錯的話那個油料是堆的很厚的一層一層的油料\n", + "Detected language: zh\n", + "特別明顯的是他最喜歡畫的一個題材就是向日葵\n", + "Detected language: zh\n", + "你会看到车子这样开过去有时候一个小时你看到外面的风景\n", + "Detected language: zh\n", + "都是向日葵那這個向日葵是一種花對於當地的農民來講\n", + "Detected language: zh\n", + "它并不只是为了观赏花,是因为葵花,它的瓜子可以炸油。\n", + "Detected language: zh\n", + "那範鼓是不懂漢文的它不會中文可是我們看他在這裡\n", + "Detected language: zh\n", + "它是一種經濟產品所以就大片大片的像日葵的甜可是所有的朋友\n", + "Detected language: zh\n", + "我記得看到這樣的景象都會驚叫起來因為真的就是梵谷看到的景象\n", + "Detected language: zh\n", + "這是在巴黎看不到的因為你會看到亮麗的陽光底下一大堵一大堵的向日葵\n", + "Detected language: zh\n", + "黄色的然后他们都面向着太阳他们的方向完全随着太阳在转\n", + "Detected language: zh\n", + "所以我想范古那時候也感動到說陽光是有這麼大的吸引力的\n", + "Detected language: zh\n", + "這麼遙遠的一個太陽可以讓地球上的植物在仰望它的光跟熱\n", + "Detected language: zh\n", + "而燃燒起来他的生命的热情所以我觉得这里面有一点在象征范古自己在找这个热情\n", + "Detected language: zh\n", + "他在找passion找生命裡面最能夠燃燒他的力量\n", + "Detected language: zh\n", + "所以他就不断画向日葵而因此他在画向日葵的时候他的笔触就变得非常狂野\n", + "Detected language: zh\n", + "不再是秀拉的很碎細的點描所以這一點我特別要解釋\n", + "Detected language: zh\n", + "這裡是IC-GINFM97.5\n", + "Detected language: zh\n", + "一笔一笔用油画笔模仿书法的感觉写了两排的字出来\n", + "Detected language: zh\n", + "就是因為 我們都知道一個畫家一定要找到自己的風格\n", + "Detected language: zh\n", + "自己的style可是1887年我們看到范古有一段時間的話\n", + "Detected language: zh\n", + "非常非常的像秀拉甚至可以说是模仿秀拉所以如果是这样子的话\n", + "Detected language: zh\n", + "《饭鼓》很容易掉到一個模仿他人的陷阱裡一個畫家絕對不會\n", + "Detected language: zh\n", + "因為模仿他人而成名的因為你永遠只是做別人的第二\n", + "Detected language: zh\n", + "所以范古很快地在阿爾就找到了他自己擺脫了他在巴黎受到的欺負\n", + "Detected language: zh\n", + "其他画家的影响而用那种粗犷的狂野筆触画出了真正的反骨\n", + "Detected language: zh\n", + "所以我自己觉得真正的范谷 其实是88年、89年、90年只有三年\n", + "Detected language: zh\n", + "她完成了3年的風格她就自殺走丟所以其實我們也是很心痛覺得這個畫家\n", + "Detected language: zh\n", + "一直在摸索自我風格摸索到1888年一直到她阿爾的時候她才真正完成了她自己\n", + "Detected language: zh\n", + "那么所以这一张画是历史上非常重要的一个见证许多人用它来说明\n", + "Detected language: zh\n", + "所以这也是为什么我们特别要强调阿尔对 Falcon 的重要就是如果他没有来阿尔\n", + "Detected language: zh\n", + "它很可能在巴黎被其他人的画风会淹没掉我们谈到了1888年\n", + "Detected language: zh\n", + "大概到9月的時後我們看到范古的心情達到了一個狂喜的巔峰\n", + "Detected language: zh\n", + "因为他知道高功终于答应他要来了所以他就开始整理房间\n", + "Detected language: zh\n", + "如他那时候住在一个租来的一个我们叫黄色房屋因为那个房屋的外面\n", + "Detected language: zh\n", + "是黃色的油漆然後他在二樓的地方范谷租了兩個房子\n", + "Detected language: zh\n", + "那一个是他的画室可是后来他就把这个画室准备出来给高根迎接高根\n", + "Detected language: zh\n", + "他為了迎接高跟做的事情有時候我們都覺得不可思議就是好我們有一個好朋友\n", + "Detected language: zh\n", + "可能要从乡下来 或从国外回来我们为它准备一个房间我们看到饭股可以是\n", + "Detected language: zh\n", + "日以繼夜地去準備這個房間他把房間的牆壁上\n", + "Detected language: zh\n", + "作為一個西方畫家的反骨,對於東方文化的一種嚮往。\n", + "Detected language: zh\n", + "一點一點畫了像壁紙一樣的花為了迎接她最好的朋友所以我們看到她\n", + "Detected language: zh\n", + "把所有生命里面最大的快乐寄望在高更的来临也许它寂寞到了\n", + "Detected language: zh\n", + "也許他孤獨到了極點他覺得只要高更來可以解決所有他的寂寞跟孤獨\n", + "Detected language: zh\n", + "所以其實我想我們就已經有點擔心就是這樣的一種狂熱的對人的寄望\n", + "Detected language: zh\n", + "可能范谷会掉到另外一个幻灭里我们看到他画了很多的向日葵插在瓶子里的向日葵\n", + "Detected language: zh\n", + "他说要把向日葵的画送给高根好像他觉得高根就是他的太阳\n", + "Detected language: zh\n", + "它就是那一朵向日葵它不斷的去仰望那個太陽然後太陽可以給它光跟熱\n", + "Detected language: zh\n", + "所以我想高庚其實並不了解因為他們跟范鼓的相處其實時間並不長\n", + "Detected language: zh\n", + "在巴黎也只有一年高跟有一點大拉拉的人\n", + "Detected language: zh\n", + "並沒有注意到細節其實我們看到范谷可能有一些精神上的躁鬱的問題已經發生了\n", + "Detected language: zh\n", + "那么这里也说明19世纪的时候透过放股有一个新的世界文化将要出来\n", + "Detected language: zh\n", + "可能要發病我們知道這種躁躍的病可能在不同的嚴陵會爆發\n", + "Detected language: zh\n", + "就它所谓的造症就是特别地亢奋特别的Hot特别的狂袭起来\n", + "Detected language: zh\n", + "就比如高更要来就很兴奋很兴奋的准备所有的事情那其次我们知道欲欲症\n", + "Detected language: zh\n", + "忽然掉到一个很深的低谷,情绪的低潮,它是落差很大。\n", + "Detected language: zh\n", + "所以也因爲泛谷後來精神病里學上特別對照證跟育政\n", + "Detected language: zh\n", + "做了很多的研究因為飯古是第一個重要的個案所以那時候他一直在準備\n", + "Detected language: zh\n", + "最高跟要来吗 高跟是10月到22所以它个9月的时候他那个狂喜\n", + "Detected language: zh\n", + "興奮已經到了完全不能控制的狀況然後高更來了\n", + "Detected language: zh\n", + "他當然很高興跟他一起畫畫可是很快的我們就會發現兩個人共同生活\n", + "Detected language: zh\n", + "其實是非常不容易的他們當時有點在實驗一種像公社一樣的生活\n", + "Detected language: zh\n", + "因為在販股之前大家都流行說,東方是東方,西方是西方\n", + "Detected language: zh\n", + "就是兩個人住在一起然後他們有的錢比如說高庚有一點錢或者梵谷他弟弟會寄點錢給他\n", + "Detected language: zh\n", + "他們就丟在一個罐子裡然後大家一起用我的意思說我們今天如果有一個室友\n", + "Detected language: zh\n", + "我们大概经济还是独立的可是贩股跟高更好到什么程度它们觉得经济可以一起用\n", + "Detected language: zh\n", + "所以不在乎對方從罐子裡拿多少錢所以每天買菜的錢都從罐子裡拿\n", + "Detected language: zh\n", + "那后来 高根写了一个很有趣的诗他们是成年的男人\n", + "Detected language: zh\n", + "男人有生理上的需要所以有時候他們要去祭願那個錢也都在罐子裏拿\n", + "Detected language: zh\n", + "可是後來就開始吵架了因為高根會抱怨范古說你怎麼煮湯的時候\n", + "Detected language: zh\n", + "連鹽料都煮進去因為她在畫畫大概不精心所以那個鹽料就掉到湯裡\n", + "Detected language: zh\n", + "就煮了一鍋的南瓜湯就變成藍色了高根就很生氣說這個湯怎麼喝\n", + "Detected language: zh\n", + "然後范谷也跟他吵架范谷說你最近去那個妓院的次數太多了那個錢都給你花掉了\n", + "Detected language: zh\n", + "東方西方永遠不碰頭有這樣的一個俗語可是我們看到到了梵谷的時代\n", + "Detected language: zh\n", + "所以他们两个就开始一直吵架所以我也觉得这件事情其实说明我们最好的朋友\n", + "Detected language: zh\n", + "其實有一種友誼的狂喜可是當共同生活其實是非常現實的\n", + "Detected language: zh\n", + "因為共同生活裡面的柴米油鹽醬醋茶其實包括夫妻都常常為非常非常的\n", + "Detected language: zh\n", + "小小一點瑣碎的是吵架所以你就可以想像這兩個個性都這麼強烈的人\n", + "Detected language: zh\n", + "當然最後一定爆發吵架這件事所以我想這一段時期其實飯鼓流下最動人的話\n", + "Detected language: zh\n", + "是兩把椅子有一把椅子是高跟的椅子我們知道高跟的椅子\n", + "Detected language: zh\n", + "是范古特别为它做的有把手就是你坐下来有两个抚手\n", + "Detected language: zh\n", + "那高根常常坐在這個椅子上點一支蠟燭然後看書 ketchup\n", + "Detected language: zh\n", + "他看到 dieser椅子是空的高跟走了然后范古就把高跟看的书放在椅子上\n", + "Detected language: zh\n", + "然後黃蠟燭也放在椅子上然後畫了這一張椅子我覺得這椅子的意思是說\n", + "Detected language: zh\n", + "其實東方西方在碰頭了所以我們看到范古會去模仿日本浮世繪版畫\n", + "Detected language: zh\n", + "如果今天有個好朋友我很愛的人來我家然後她坐在那個椅子上然後過一會她走了\n", + "Detected language: zh\n", + "我大概會看那個椅子看很久覺得椅子上還留著他的體溫範谷為什麼會畫椅子\n", + "Detected language: zh\n", + "因为很少画家画椅子可是这个椅子让你感觉到范古对高亨的那种\n", + "Detected language: zh\n", + "依賴,就覺得這是她在人世間大概唯一可以懂她心事的朋友\n", + "Detected language: zh\n", + "可是爲什麽現在好像又跟他保持了一種距離有點隔閡然後泛國又畫了自己的椅子\n", + "Detected language: zh\n", + "他的椅子很簡單沒有扶手就是最簡單的一個椅子然後上面有一個煙斗\n", + "Detected language: zh\n", + "有一包它抽烟的烟丝那我就觉得如果你比较这两把椅子你会感觉到饭骨\n", + "Detected language: zh\n", + "好渴望有朋友可是没有朋友了因为高根可能故意再躲他\n", + "Detected language: zh\n", + "所以到了1888年的12月24號就是聖誕夜的晚上高庚不敢回家\n", + "Detected language: zh\n", + "因为他觉得他这个朋友有点精神病了就是常常会发怒常常会吼叫\n", + "Detected language: zh\n", + "会模仿东方的书法那同一个时间我们看到罗丹大雕刻家\n", + "Detected language: zh\n", + "可是事後又跟他道歉又哭其實是躁鬱的病已經在發那高根很害怕\n", + "Detected language: zh\n", + "不敢回家 就在路上乱逛那么冷我们看看12月已经很冷了\n", + "Detected language: zh\n", + "她就听到有人在跟踪她后面有脚步声她就很害怕一回头看是反顾\n", + "Detected language: zh\n", + "梵谷就一直在跟著他高庚走一走 他意不欲屈地跟著走\n", + "Detected language: zh\n", + "我们就可以了解到高根一定心里非常的恐惧不晓得怎么回事过一会他又仔细地看\n", + "Detected language: zh\n", + "他发现范古手上拿了一把刀是剃头发的剃刀所以他就更害怕\n", + "Detected language: zh\n", + "他覺得范古可能要傷害他我們大概講到這個故事我們覺得非常的痛苦因為高歌那天玩\n", + "Detected language: zh\n", + "就不敢回家就住在旅館裡可清晨的時候他的門被敲開警察告訴他\n", + "Detected language: zh\n", + "你的朋友自杀了所以他就赶回家看到范谷倒在一堆血泊当中可是范谷没有自杀\n", + "Detected language: zh\n", + "范谷只是割了自己的耳朵我想 现在很多医生认为范谷当时\n", + "Detected language: zh\n", + "也曾經畫過柬埔寨的很多舞者高棉的舞者的舞蹈那我們也看到音樂上的德布西\n", + "Detected language: zh\n", + "幻聽,就是他的耳朵旁邊一直有聲音所以他很痛苦他大概要傷害自己\n", + "Detected language: zh\n", + "可是高庚以為他要傷害高庚所以其實我們就會發現一個精神病的朋友\n", + "Detected language: zh\n", + "你不了解他你也救不了他那范古就割了他的耳朵那麽這件事情引發了高跟部\n", + "Detected language: zh\n", + "很快就收拾了行李,就離開那麼飯股也就被送進了\n", + "Detected language: zh\n", + "吸收了巴厘岛的干美狼音乐,去创作他的新音乐。\n", + "Detected language: zh\n", + "您現在所收聽的是美的唇思我是蔣勳\n", + "Detected language: zh\n", + "所以這裡面都說明西方當時很多前衛的藝術家對東方有非常非常大的嚮往\n", + "Detected language: zh\n", + "可是在這個嚮往過了之後我們看到范古在巴黎有一段時間\n", + "Detected language: zh\n", + "很兴奋 认识了很多新朋友 非常的快乐他跟秀拉学点描画派的画法\n", + "Detected language: zh\n", + "它非常喜欢罗特列克,它觉得罗特列克自己本身是一个残障\n", + "Detected language: zh\n", + "可是去幫助很多窮困這種牛肉廠的這種被人家看不起的\n", + "Detected language: zh\n", + "做色情行業的女人們所以他也很尊敬羅特列克他也喜歡高跟\n", + "Detected language: zh\n", + "他覺得高跟一直有一個夢想是要到更偏遠的地方去畫畫1. 認識了這些好朋友之後\n", + "Detected language: zh\n", + "他的生命也開始有了很多很多的夢想他忽然覺得這些朋友聚在一起的時候喝了酒\n", + "Detected language: zh\n", + "然後高談闊論每一個人都說有一天要離開巴黎要去追尋南方的陽光\n", + "Detected language: zh\n", + "因為覺得陽光越亮麗的地方色彩越飽和他們都希望能夠離開巴黎\n", + "Detected language: zh\n", + "我们在系列饭股的介绍里,今天要谈到1888年\n", + "Detected language: zh\n", + "能够走出去可是许多听证朋友大概都了解到我们今天如果住在都市\n", + "Detected language: zh\n", + "不管是台北或新竹因為工作比較方便我們大概也有一個夢想說有一天我們如果去蘭嶼多好\n", + "Detected language: zh\n", + "我們去澎湖也很好我們去宜蘭買快遞或去台東養豬我的很多朋友常常跟我說\n", + "Detected language: zh\n", + "我的最大的夢想是到台東去養豬這些話有時候\n", + "Detected language: zh\n", + "一听听10年听20年这个朋友还在科技公司还是没有去养猪你也知道说梦想归梦想\n", + "Detected language: zh\n", + "其實人很難離開他熟悉的環境就是因為你在都市裡你已經依賴都市了\n", + "Detected language: zh\n", + "我們已經不知道說如果真的到台東去養豬買一塊地並不是那麽容易的事\n", + "Detected language: zh\n", + "你在梦想里面养猪是一个很美的事你真的去养猪所以你每天要去煮猪食\n", + "Detected language: zh\n", + "然後要清洗豬糞大概都不是一個很美麗的一件事所以當時很多畫家\n", + "Detected language: zh\n", + "在梦想说我要离开巴黎要到南方去追寻阳光之高谈阔论\n", + "Detected language: zh\n", + "1888年 在巴黎待了一年多一點點的飯股\n", + "Detected language: zh\n", + "我們歸高談過論,沒有一個人真的走的掉結果藩穀是一個很有趣的人\n", + "Detected language: zh\n", + "范古是一個非常行動派的他毅然決然在1888年的2月\n", + "Detected language: zh\n", + "背起话架把行李一整理她就往南走所以我想这个事情\n", + "Detected language: zh\n", + "也可以说明泛谷身上有一些非常实践的能力\n", + "Detected language: zh\n", + "非常力行的能力因為我們前面講過梵谷其實它的精神本質是基督教的\n", + "Detected language: zh\n", + "基督教的信仰當中會認為理論不如一種真正生命的\n", + "Detected language: zh\n", + "實踐跟力行譬如說耶穌在不道理祂自己本身就是一個力行者\n", + "Detected language: zh\n", + "所以范古家族這個牧師的傳統所以范古家族這個牧師的傳統發現他也有一個\n", + "Detected language: zh\n", + "談到一個事情,要做就真的去做。那不要只是一個空洞的理論\n", + "Detected language: zh\n", + "一直谈一直谈所以我觉得很有趣就是当时有这么多画家在谈要离开巴黎\n", + "Detected language: zh\n", + "忽然又...有了一個新的夢想他覺得巴黎雖然是一個...了不起的城市\n", + "Detected language: zh\n", + "要去追尋南方的陽光追求大地的遼闊可是沒有一個人走出去\n", + "Detected language: zh\n", + "反而是范谷范谷一決定走了以後1888年2月她就往阿爾去了\n", + "Detected language: zh\n", + "我們知道阿爾A-R-L-E-F這個城市很小的小鎮\n", + "Detected language: zh\n", + "他是在巴黎南方其實已經靠近普羅旺斯\n", + "Detected language: zh\n", + "在靠近普羅旺斯的地方在當時是一個非常偏遠的小鎮其實我在\n", + "Detected language: zh\n", + "后来有很多机会去了很多次的阿尔因为阿尔现在变成蛮重要的观光区\n", + "Detected language: zh\n", + "當然是因為販股的關係那到現在為止阿爾其實都是一個人口並不多的小鎮\n", + "Detected language: zh\n", + "他不繁柔因此我們也可以想像我們現在大概坐子彈列車\n", + "Detected language: zh\n", + "從巴黎到馬賽,可能要3個小時然後從馬賽再轉一個車\n", + "Detected language: zh\n", + "可能2個半小時到阿爾可是當年飯鼓要去阿爾可能要折騰一整天\n", + "Detected language: zh\n", + "帶給他許多新的經驗他在這裡學了新印象派的點描畫派\n", + "Detected language: zh\n", + "那个车子非常的慢晃晃 遥遥晃晃最后才能到阿尔而他阿尔一个朋友都没有\n", + "Detected language: zh\n", + "可他就在這個小鎮就代下了所以有點像我們今天說一個畫家在臺北\n", + "Detected language: zh\n", + "國不下去 不喜歡台北那麼最後 他決定要去蘭嶼可是你要去蘭嶼 你可能要知道\n", + "Detected language: zh\n", + "你怎么站来与生存所以我们等一下会提到阿尔时期的泛股那其实也是泛股\n", + "Detected language: zh\n", + "真正繪畫上最成熟的一年這一年繪畫了非常非常多\n", + "Detected language: zh\n", + "極其精采的作品我們談到了1888年范古一個人\n", + "Detected language: zh\n", + "背着行囊、简单的行李一些画布、画具\n", + "Detected language: zh\n", + "就到了法国南方的阿尔我想他对阿尔完全不了解\n", + "Detected language: zh\n", + "他是北方荷兰来的。对他来说,阿尔兹只是地名。\n", + "Detected language: zh\n", + "那個時候,不像我們今天在網站上可以有很多資訊什麼都不知道所以當他坐那個火車\n", + "Detected language: zh\n", + "這種畫法,他同時也受到了日本福祉會版畫的影響。\n", + "Detected language: zh\n", + "搖搖晃晃一整天到了阿爾之後下了火車我一直在想像那個時候的繁谷心情\n", + "Detected language: zh\n", + "一個完全陌生的土地一群完全陌生的人在那個地方\n", + "Detected language: zh\n", + "在那個小站下車的人就很少然後站在那邊看著小鎮的人大家覺得這個人好奇怪\n", + "Detected language: zh\n", + "因为我们后来知道,很多阿尔的人描述这个从荷兰来的画家\n", + "Detected language: zh\n", + "說滿頭紅顏色的頭髮然後像貓一樣綠色的眼睛滿臉都是洛西胡\n", + "Detected language: zh\n", + "乾乾瘦瘦的每天都背著畫家衝進衝出所以當時在...這個...啊\n", + "Detected language: zh\n", + "lock二,它有一条河叫hon,龙河。那龙河,有一个小支流。\n", + "Detected language: zh\n", + "支流上有一個小吊橋叫朗裸瓦吊橋范古畫過這個吊橋\n", + "Detected language: zh\n", + "因為這個吊橋是他每一天走到外面去畫畫必然要經過的一個小橋\n", + "Detected language: zh\n", + "然后这个桥下有很多的阿尔德女人在那边洗衣服\n", + "Detected language: zh\n", + "我們甚至可以看到大概在1887到88年的時候現在找到有一張畫作是\n", + "Detected language: zh\n", + "我們知道今天我們很難理解早期的人類其實是沒有自來水的\n", + "Detected language: zh\n", + "我記得我小時候也沒有所以我在淡水河旁邊看到很多婦人在那邊洗衣服\n", + "Detected language: zh\n", + "當時的龍河邊朗羅瓦吊橋底下有很多的阿爾夫人在洗衣服\n", + "Detected language: zh\n", + "饭古就划了这个吊桥这个吊桥是一个可以开核的吊桥\n", + "Detected language: zh\n", + "因為有船要經過所以如果船要過去的時候這個吊橋可以拉起來所以不是一個很大的吊橋\n", + "Detected language: zh\n", + "那我後來 我到現場去看過其實這個吊橋後來在戰爭當中就毀掉了\n", + "Detected language: zh\n", + "那毀掉以後,如果我們有一個橋毀掉就算了就可能重新要蓋一個新的\n", + "Detected language: zh\n", + "比較現代化的橋。可是如果大家有機會去旅行到阿爾你會發現很有趣\n", + "Detected language: zh\n", + "你會看到一個 完19世紀的吊橋完全木頭的為什麼因為梵古的話裡畫了這個橋\n", + "Detected language: zh\n", + "范果的画里画了这个桥这个桥变成一个很重要的符号\n", + ">>>> 09-10\n", + "Detected language: zh\n", + "我们大概可以感觉到一个从荷兰长大, 因为荷兰是北方\n", + "Detected language: zh\n", + "可能一方面貴,他的這手也很窮另外一方面,他覺得買一個壁紙貼上去\n", + "Detected language: zh\n", + "對這個好朋友其實是不敬的他覺得它要親手去畫這個壁紙\n", + "Detected language: zh\n", + "就是把整個高耕江要住的房間的墻壁上畫滿了一朵一朵小小的花\n", + "Detected language: zh\n", + "像壁紙一樣那麼這個時候我們可以感覺到梵谷愛朋友的那種狂熱\n", + "Detected language: zh\n", + "就是他為了一個朋友他可以不斷的去為他準備最好的東西\n", + "Detected language: zh\n", + "好像这是一个婚礼一样好像为了高庚要来他可以这样准备其实我想每个人在一生当中\n", + "Detected language: zh\n", + "都会有些好朋友有时候好朋友可能从国外来住一段时间你也会很兴奋\n", + "Detected language: zh\n", + "你為他準備房間 買床單 準備一些傢俱會有一種興奮\n", + "Detected language: zh\n", + "為了高跟的來臨這種狂喜已經到了有一點不容易理解\n", + "Detected language: zh\n", + "可是我們感覺到最重要的是因為它藉著高根要來這個事情\n", + "Detected language: zh\n", + "陽光比較少,光線比較陰鬱因此,一個剛剛到了法國南方的法國\n", + "Detected language: zh\n", + "他們整個人處在一個亢奮的狀態因此這段時間他畫了很多\n", + "Detected language: zh\n", + "非常非常精彩的話比如說最有名的相日葵我們知道相日葵是\n", + "Detected language: zh\n", + "范古在1888年夏天的最重要的傑作他大概畫了七張\n", + "Detected language: zh\n", + "他画了7张。可是其实他画向日葵是为了高庚画的。因为他写信给高庚说\n", + "Detected language: zh\n", + "我幫你的房間準備的很漂亮你房間的壁紙都是我親筆一點點畫了\n", + "Detected language: zh\n", + "很多小小的花我决定要在这个房间里挂一张我自己最满意的话\n", + "Detected language: zh\n", + "这张画要送给你后来他发现阿尔最漂亮的画就是向日葵\n", + "Detected language: zh\n", + "所以他就开始画向日葵有时候我很想跟朋友叙述我自己到阿尔的时候看到\n", + "Detected language: zh\n", + "這個強烈的陽光底下向日葵的那種花田的漂亮就是我們在台灣\n", + "Detected language: zh\n", + "先譬作買向日葵、花店去買一束向日葵可是阿爾的向日葵是整片的\n", + "Detected language: zh\n", + "對他來講陽光是多麼明亮而喜悅的一個對象而且對於畫家來講\n", + "Detected language: zh\n", + "就是在起伏的山丘的大地上一整片的金黃色\n", + "Detected language: zh\n", + "然後夏日葵因為它有一個特殊的植物的特性它會一直朝向著太陽\n", + "Detected language: zh\n", + "就是早上的時候它是朝向東方迎接太陽的上升那中午的時候\n", + "Detected language: zh\n", + "它是面對日正當中的太陽所以因此我想范古他有一個感覺\n", + "Detected language: zh\n", + "我覺得這個向日葵好像有點像他自己他覺得高跟就是那個太陽好像他自己一直在仰望\n", + "Detected language: zh\n", + "太陽的光跟熱,也好像一朵小小的相日葵在渴望著.\n", + "Detected language: zh\n", + "幫太陽給他所有的生命的力量所以這個時候他就把向日葵\n", + "Detected language: zh\n", + "捡了回来然后插在一个桃罐里面这个桃罐其实是一个很简单的方法\n", + "Detected language: zh\n", + "法国乡下的陶罐就这种陶罐就是你会注意到他是有一个把手\n", + "Detected language: zh\n", + "然后上面一半有柚有黄色的柚料下面一半没有柚料因为他们制作的时候\n", + "Detected language: zh\n", + "因為陽光的亮麗所以我們會發現所有的色彩都會達到飽和\n", + "Detected language: zh\n", + "就是一个粗陶罐然后用手抓着底部然后在佑料里面这样荡一荡\n", + "Detected language: zh\n", + "所以我们就叫上面一半有右底下一半没有右其实我们现在到西班牙或者法国南部旅行\n", + "Detected language: zh\n", + "常常看到民間用那種搖水的罐子其實就是這樣的罐子它其實不算是\n", + "Detected language: zh\n", + "一個很精緻的花器可是它很純樸所以它可以襯出\n", + "Detected language: zh\n", + "非常的美所以範圍就把很多大朵大朵的向日葵\n", + "Detected language: zh\n", + "插在這個桃冠當中然後開始創作了它最有名的一系列\n", + "Detected language: zh\n", + "向日葵的話我們談到了範谷在1888年的夏天\n", + "Detected language: zh\n", + "創作了一系列的向日葵這些向日葵是位高跟化的\n", + "Detected language: zh\n", + "我們看到畫面上大部分使用的色彩基本上都是\n", + "Detected language: zh\n", + "是明黄色我特别加了一个明亮的咏这个字\n", + "Detected language: zh\n", + "所以可能很多朋友還沒有特別的注意到光線與色彩的關係\n", + "Detected language: zh\n", + "因为我们知道黄色有不同的色温有的时候黄色比较偏\n", + "Detected language: zh\n", + "咖啡有的时候黄色最亮的时候你说你在黄色里面加很多的白它会变成柠檬黄\n", + "Detected language: zh\n", + "那檸檬黃再淡一點我們可能就叫明黃為什麼加一個明明亮的\n", + "Detected language: zh\n", + "名叫明花在色彩学上我们知道黄色是明度最高的就是色彩学拔\n", + "Detected language: zh\n", + "把色彩分成明度跟彩度譬如說紅色\n", + "Detected language: zh\n", + "是彩度很高的颜色黄色是明度很高的颜色明度很高的颜色\n", + "Detected language: zh\n", + "意思是說他在陽光的光線底下他會特別容易被發現\n", + "Detected language: zh\n", + "所以我不知道一般朋友有沒有發現黃色常常用來做成\n", + "Detected language: zh\n", + "警戒的颜色比如说举最容易理解的例子如果你开车你知道你车\n", + "Detected language: zh\n", + "車子要轉彎的時候打的那個燈閃的那個燈就是黃色還有就是我們在馬路的路口\n", + "Detected language: zh\n", + "通常在阳光 日照很长的地方人民的服装大概都会色彩悬验起来\n", + "Detected language: zh\n", + "我們有所謂的紅綠燈紅綠燈,紅燈轉綠燈,綠燈轉紅燈,之間\n", + "Detected language: zh\n", + "會有一個警告的顏色的燈就是黃燈,閃黃燈\n", + "Detected language: zh\n", + "可以常常變成警戒警告因為黃色在視覺上很容易被看到\n", + "Detected language: zh\n", + "所以因此我们就可以看到这个色彩区也帮助我们在解读为什么\n", + "Detected language: zh\n", + "我們梵谷在這個夏天畫的畫用了這麼多的黃色好像黃色\n", + "Detected language: zh\n", + "就變成他生命一個很大的喜悦大家常常聽到有一些歌曲\n", + "Detected language: zh\n", + "名字叫《情人的黃震山》黃震山的意思是\n", + "Detected language: zh\n", + "你在谈恋爱的时候,你在高兴的时候,你很喜欢在身上穿黄色的衣服。\n", + "Detected language: zh\n", + "所以黃色衣服可能代表一種喜悅因為他這時候在等待高跟來臨\n", + "Detected language: zh\n", + "好像在戀愛一樣所以她的畫面中畫了很多的黃色\n", + "Detected language: zh\n", + "因為色彩在陽光底下才能夠達到一種飽和所以我們也常常會覺得\n", + "Detected language: zh\n", + "可是我們看到在這一系列的向日葵當中因為向日葵\n", + "Detected language: zh\n", + "它會本身長在土地裡面它有一個頑強的生命力它每一天會追尋陽光\n", + "Detected language: zh\n", + "可是我们把向日葵剪断 拿回来插在桃冠里没有多久你會发现\n", + "Detected language: zh\n", + "香日葵就枯萎了因为香日葵需要大量的阳光你如果放在室内\n", + "Detected language: zh\n", + "它失去了大量的阳光它基本上就不太能够存活所以范古在画这些向日葵的时候\n", + "Detected language: zh\n", + "你會感覺到其實他在表現有一點乾掉的向日葵向日葵乾了以後\n", + "Detected language: zh\n", + "尤其是他花蒂的部分就是那個綠色花蒂的部分有一點像\n", + "Detected language: zh\n", + "刺味尖尖的摸起來會扎手因為很粗的感覺那我覺得泛谷在表現一個死去以後\n", + "Detected language: zh\n", + "非常顽强的向日葵好象他的生命已经找不到阳光了可是他还坚持\n", + "Detected language: zh\n", + "要用最强烈的方法活下去因此我们看到向日葵的这一组\n", + "Detected language: zh\n", + "陽光亮的地方,人比較喜悅,比較容易有很明顯的個性。\n", + "Detected language: zh\n", + "用來送給高庚的話, 的確表現了返古最內在對於陽光\n", + "Detected language: zh\n", + "黃色頑強的生命力一個巨大的狂熱的這種表現\n", + "Detected language: zh\n", + "所以我們知道蝦仁葵一直變成飯古很重要的一個畫作\n", + "Detected language: zh\n", + "這七章向日葵現在也分散在不同的地方比如說德國牧泥\n", + "Detected language: zh\n", + "还有一件那么在英国的伦敦的国家画廊有一件我最喜欢的\n", + "Detected language: zh\n", + "我觉得是弃鉴里面画的非常好上面有14朵的像日葵插在一个桃冠当中\n", + "Detected language: zh\n", + "陶罐上還有hvansson就是返股的簽名可是後來\n", + "Detected language: zh\n", + "我们知道在1987年的时候俱黎范谷死去已经很久很久了\n", + "Detected language: zh\n", + "1987年的所在國際的拍賣市場日本人為了要證明\n", + "Detected language: zh\n", + "日本已經有強大的經濟實力有一個叫安田平安的安\n", + "Detected language: zh\n", + "很強烈的感情同時也會喜歡色彩因此凡古在阿爾的這段時期\n", + "Detected language: zh\n", + "田地的田 安田保險公司他們就用當 mixkup中共協調\n", + "Detected language: zh\n", + "十億台幣的價格買了一張向日虧那麼這一張向日虧\n", + "Detected language: zh\n", + "就保留在日本的美術館所以我想大家可以了解到\n", + "Detected language: zh\n", + "相日葵在《范谷》的畫作裡面,包括他的創作意義。\n", + "Detected language: zh\n", + "以及美學價值甚至連這種有點像股票市場一樣\n", + "Detected language: zh\n", + "在亞洲這樣的繪畫市場裏的炒作其實都變得很傳奇很多人也嘲笑這件事\n", + "Detected language: zh\n", + "至今凡股一生穷途潦倒一张画也卖不出去\n", + "Detected language: zh\n", + "他大概無法想象他死了以後竟然有一張畫被日本人以十億台幣的告假\n", + "Detected language: zh\n", + "所以在這裡當然讓我們感覺到有一種去對於便攜生命的侮辱\n", + "Detected language: zh\n", + "就是這樣好的一個畫家可是他有生之年其實是不被世人認知的\n", + "Detected language: zh\n", + "畫了很多的畫作讓我們感覺到它對於大自然當中天空的湛藍\n", + "Detected language: zh\n", + "我们都知道到现在全世界炒作饭股的价格已经到了\n", + "Detected language: zh\n", + "不可思议的地步我想这件事情如果泛骨留支不晓得\n", + "Detected language: zh\n", + "他會有什麼樣的表情也許是無奈的苦笑其實我們會發現\n", + "Detected language: zh\n", + "一個這麼具有生命力的畫家這麼天才的畫家其實他的創作在\n", + "Detected language: zh\n", + "有生之年竟然是完全不被理解的所以這一群湘日葵的畫作\n", + "Detected language: zh\n", + "因为高跟来临所以激发了范谷的一个强大的创作力\n", + "Detected language: zh\n", + "那麼,除了向日葵以外,我們也看到有一件作品變成特別記錄了\n", + "Detected language: zh\n", + "范谷跟高庚的友誼關係 最重要的一張畫 叫做\n", + "Detected language: zh\n", + "范古的房间这张画其实就是范古画他自己住的那个房间\n", + "Detected language: zh\n", + "可是這個房間因為我們知道也有兩間所以其中有一間是為了迎接高庚來的\n", + "Detected language: zh\n", + "这里是IC之音FM97.5您现在所收听的是美德辰斯\n", + "Detected language: zh\n", + "我們知道這種法國南方的天空一般人叫做地中海瀾\n", + "Detected language: zh\n", + "而準備的我們就會發現范古在房間的一端面對著他\n", + "Detected language: zh\n", + "門的入口的那個方向因為我們看到 畫的端景是門跟\n", + "Detected language: zh\n", + "床,有一个小小的桌子,有两把椅子,有一张床,\n", + "Detected language: zh\n", + "那么这一张画很多人都在谈到说因为范古对高庚的\n", + "Detected language: zh\n", + "極大的等待跟渴望就覺得這個朋友來了他就不孤獨了也不寂寞了\n", + "Detected language: zh\n", + "所以很多的学者都分析这一张画认为这张画里, 以辞是\n", + "Detected language: zh\n", + "那桌子上的這個洗臉的桃冠是兩個床上的枕頭是兩個\n", + "Detected language: zh\n", + "連牆上掛的畫都是兩張都是雙的那麼意思是說\n", + "Detected language: zh\n", + "這個在孤獨狀態的泛谷渴望生命裡面有一個陪伴他的人\n", + "Detected language: zh\n", + "那麼這個人就是高庚他在幻想他來幻想他來了以後可以打破他生命的寂寞\n", + "Detected language: zh\n", + "蘭桑是有點透明的裡面流動著非常美的光尤其在夏天\n", + "Detected language: zh\n", + "到了1888年的10月 高工果然來了我們之後會跟大家報告\n", + "Detected language: zh\n", + "所發生的問題以及販股巨大的幻滅\n", + "Detected language: zh\n", + "我們在談到范古與高庚的這個複雜的關係裡\n", + "Detected language: zh\n", + "我們看到1888年通過一個漫長的夏天半股整個生命的燃燒\n", + "Detected language: zh\n", + "創作了非常精彩的畫作然後到10月初高根來了高根來了以後\n", + "Detected language: zh\n", + "然后,他们住在一起,一起画画,一起用餐。\n", + "Detected language: zh\n", + "兩個窮朋友,有一個罐子,把他們僅有的錢就丟在裡面。\n", + "Detected language: zh\n", + "所有買菜的錢都從這裡面出一切都是共用我們大概很少看到\n", + "Detected language: zh\n", + "你一對室友他們可以要好到這個樣子比如說我們有室友可是我們經濟可能還是獨立的\n", + "Detected language: zh\n", + "我們很少會跟人家說哎,我的信用卡你也可以用可是,范果跟高庚當時\n", + "Detected language: zh\n", + "我们通常看到大概到9点 10点还是明亮的\n", + "Detected language: zh\n", + "竟然是這樣的一種狀況就是連經濟上的東西它們都彼此共用\n", + "Detected language: zh\n", + "可是 當然 會不會是因為這樣的一種 相處在現實生活裡 其實非常容易發生\n", + "Detected language: zh\n", + "我們會幻想跟一個人很好可是等到生活在一起的時候\n", + "Detected language: zh\n", + "點點滴滴的生活細節瑣瑣碎碎的生活現實會磨得兩個人\n", + "Detected language: zh\n", + "总是在吵架比如说我们看到高庚会不断的抱怨范谷� card\n", + "Detected language: zh\n", + "你為什麼每次煮那個南瓜湯老是把顏料掉進去\n", + "Detected language: zh\n", + "湯里怎么喝下去那我们也看到这两个男人其实都没有生活经验这是他们大概第一次共同生活\n", + "Detected language: zh\n", + "然後共同去做菜 一起去畫畫所以中間就會發生很多的衝突\n", + "Detected language: zh\n", + "也是一個非常追求個人個性的人他有時候很希望自己是一個完全自由的人\n", + "Detected language: zh\n", + "那可能凡古也一直追問說你今天玩那麼晚不回來你到底到哪裡去可是高庚決定\n", + "Detected language: zh\n", + "它基本上不像我們天黑的比較早因此我想泛古在阿爾的時候\n", + "Detected language: zh\n", + "他是個成年的男人他應該有自由去追求他的私生活因此\n", + "Detected language: zh\n", + "這種衝突不斷地發生所以 慢慢地我們看到十月 十一月到十二月\n", + "Detected language: zh\n", + "大概不到三個月的時間,到了12月的時候,我們已經看到兩個人的關係了。\n", + "Detected language: zh\n", + "變成非常非常惡劣這個惡劣其實我們可以從\n", + "Detected language: zh\n", + "從兩張畫看得出來就是梵谷後來畫了兩把椅子\n", + "Detected language: zh\n", + "这两把椅子有一把椅子叫做高跟的椅子这个椅子是有扶手上面有一支蜡烛\n", + "Detected language: zh\n", + "然後有2本書我們看到這把椅子我們覺得很奇怪一個畫家怎麼會畫一張\n", + "Detected language: zh\n", + "空的乙子可是题目又叫高更的乙子我们知道因为高更来 所以范古\n", + "Detected language: zh\n", + "為他買了一個很漂亮的椅子相對於他自己的椅子有一張叫做\n", + "Detected language: zh\n", + "梵谷的椅子梵谷的椅子很简单是那种最廉价的农村里的椅子\n", + "Detected language: zh\n", + "在田野當中跑在戶外做血聲的時候這些光線裡面的色彩刺激了他得到很強烈的感冠印象\n", + "Detected language: zh\n", + "看出来范谷把所有最好的东西都给高跟高跟可能坐在这个有扶手的椅子\n", + "Detected language: zh\n", + "點了一只蠟燭正準備讀書可是范古可能就跟她就叨叨唸起來因為生活很多\n", + "Detected language: zh\n", + "他們彼此會有很多的衝突這高根可能就不耐煩就把書丟了\n", + "Detected language: zh\n", + "就走了當高庚走了以後我們大概可以想象泛谷一個人坐在房間裡\n", + "Detected language: zh\n", + "面對著一張椅子這張椅子上還有高跟坐過的體溫可是他知道\n", + "Detected language: zh\n", + "高庚就知道高庚不會再回來了高庚已經受不了這個朋友覺得他煩人煩得要死\n", + "Detected language: zh\n", + "因此當他在畫這個椅子的時候裡面有一種巨大的寂寞\n", + "Detected language: zh\n", + "高綱沒有來之前的寂寞還好強烈因為之前他在幻想\n", + "Detected language: zh\n", + "所以他有狂喜可是現在來過以後發現兩個人是根本無法相處的\n", + "Detected language: zh\n", + "所以這個是他面對的這個空的椅子其實裡面有很大的痛苦他又畫了他自己的椅子\n", + "Detected language: zh\n", + "那麼同時范古這個時候很懷念在巴黎認識的一些同樣在畫畫的好朋友\n", + "Detected language: zh\n", + "他自己的椅子上丢了一个烟斗丢了一包烟丝就是大概高跟走了\n", + "Detected language: zh\n", + "他也很无奈犯过就拿起烟斗烟丝在那边抽烟那么因此这两张画\n", + "Detected language: zh\n", + "如果我們把它擺在一起看我們就會覺得這兩個椅子在椅子上的那個關係\n", + "Detected language: zh\n", + "已經要改變了他們都有一個自己的位置椅子就是一個人做過的位置\n", + "Detected language: zh\n", + "可是這個位置可能要轉換了所以大概到12月的時候我們看到這種惡劣的關係\n", + "Detected language: zh\n", + "就造成高蓋越來越不想回到黃色房屋因為他會覺得一回來\n", + "Detected language: zh\n", + "就要跟范姑吵架所以他宁可再问浪档浪档来浪档去就是不愿意回来\n", + "Detected language: zh\n", + "到12月24号就圣诞夜我们看到外面是多么寒冷其实法国的南部在冬天的时候\n", + "Detected language: zh\n", + "整個地中海的風吹起來是非常乾冷的一個氣候可是高跟就在外面逛來逛去\n", + "Detected language: zh\n", + "趕來 Guankui 不肯回家她在逛來逛去的同時忽然就聽到腳步聲然後回頭就發現\n", + "Detected language: zh\n", + "所以他就不斷寫信給他們那麼我們也可以說是因為范古在阿爾的時候其實蠻寂寞的\n", + "Detected language: zh\n", + "飯古在跟著他他走快一點 飯古也走快一點他走慢一點 飯古也走慢一點\n", + "Detected language: zh\n", + "高庚就有一點恐懼其實那個時候他還不知道范谷有潛藏的精神病的問題\n", + "Detected language: zh\n", + "他只是恐懼這個飯車要幹嘛接著他就看到飯車不只跟着他\n", + "Detected language: zh\n", + "范國德手上拿了一把剃弧子 刮弧子的剃刀所以這時候他就更害怕\n", + "Detected language: zh\n", + "所以今天晚上高哥就沒有回到黃色房屋去睡覺他就跑到鎮上的一個小旅館\n", + "Detected language: zh\n", + "被諭 投訴了一夜第二天早上就被警察敲門敲醒告訴她說\n", + "Detected language: zh\n", + "自殺了所以他就匆匆忙忙趕回到黃色房屋發現梵谷倒在\n", + "Detected language: zh\n", + "紅色的雪破鐘其實范古沒有自殺范古只是用剃刀割掉了自己的耳朵\n", + "Detected language: zh\n", + "那麼當時警察也沒有仔細看所以以為他自殺了\n", + "Detected language: zh\n", + "事情后来在精神医学上开过很多次的会议 在讨论就是1888年的12月时\n", + "Detected language: zh\n", + "就是没有太多的朋友我们介绍过就是这一段时期因为他常常写信\n", + "Detected language: zh\n", + "半谷精神病爆發的時刻那這個爆發是因為長期以來\n", + "Detected language: zh\n", + "在精神病的焦慮狀況裡面的這個有躁鬱病的範谷\n", + "Detected language: zh\n", + "它已经换了幻听的问题就出现幻听幻听就说\n", + "Detected language: zh\n", + "有人在他耳邊一直在講話一直干擾他他割了耳朵以後\n", + "Detected language: zh\n", + "他忽然就轻松了因为他好像暂时转移了精神上的焦虑\n", + "Detected language: zh\n", + "我的意思是說我們都覺得泛古 pause 歌而多很可怕歌而多不是很痛的事嗎\n", + "Detected language: zh\n", + "可是肉体上的痛,有时候会转移我们精神的痛因为我们知道很多人在精神痛苦的时候\n", + "Detected language: zh\n", + "反而去伤害自己的身体好所以在躁育病或者自闭\n", + "Detected language: zh\n", + "裡面都有這些現象那麼這個事情發生了以後番古就被很多的鄰居聯名\n", + "Detected language: zh\n", + "強迫關到精神病院去治療所以接下來在1889年至1890年\n", + "Detected language: zh\n", + "所以幫他送信的一個游差這個湖嶺大概變成了他唯一的朋友\n", + "Detected language: zh\n", + "長達一年在聖雷米精神病院的治療我們可以說\n", + "Detected language: zh\n", + "高庚大概是引发梵谷精神病爆发的一个原因可是我们不能够怪高庚\n", + "Detected language: zh\n", + "我們只說,泛骨本來就有這個淺嘗的、發病的記音\n", + "Detected language: zh\n", + "只是高根剛好變成了一個介面因為它等待高根的狂袭\n", + "Detected language: zh\n", + "起到幻灭的巨大的落差使他忽然發病\n", + "Detected language: zh\n", + "所以在發病之後,關到精神病院接下來以後的單元會繼續談\n", + "Detected language: zh\n", + "范古如何在精神病院裡创作出她更惊人的、最美丽的\n", + "Detected language: zh\n", + "像Starry Night 星夜這樣的作品出來他1890年就自殺了\n", + "Detected language: zh\n", + "我們會看到這個生命,即使只剩下最後一年他還創作了將近兩千張的偉大的繪畫\n", + "Detected language: zh\n", + "可是胡琳基本上不是艺术家也不是知识分子她对于范谷的这个绘画的世界\n", + "Detected language: zh\n", + "我是蔣勳我們在一系列對荷蘭畫家《返古》的介紹裡\n", + "Detected language: zh\n", + "其实不太能够理解大概只能照顾一下范古的生活而已所以范古这个时候有一种极大的渴望\n", + "Detected language: zh\n", + "他寫信給他弟弟寫信給羅特列克寫信給高根\n", + "Detected language: zh\n", + "這些畫家一封一封的信,不斷的敘述她在阿爾感覺到的陽光,色彩的美。\n", + "Detected language: zh\n", + "其实他有一个很强烈的渴望是希望这些朋友读了他的信以后\n", + "Detected language: zh\n", + "他们也会跟她一样坐着火车离开巴黎 往南方走所以我们也可以看到这些信里面\n", + "Detected language: zh\n", + "其實有著一種強烈的同伴呼喚的感覺因為的的確確飯谷一個人在RR\n", + "Detected language: zh\n", + "其實是非常非常寂寞的就是那些農民 其實也不懂它\n", + "Detected language: zh\n", + "甚至他還覺得他怪怪的一個荷蘭畫家每天衝進衝出地在畫畫\n", + "Detected language: zh\n", + "也不曉得她在干嘛所以她很渴望有同伴我對同伴的解釋是說\n", + "Detected language: zh\n", + "某一種在藝術上可以一起討論一起畫畫共同有美的追求的人\n", + "Detected language: zh\n", + "今天這個單元要談到1888年的9月\n", + "Detected language: zh\n", + "我叫做銅板那麼這個時候他寫了很多信給他的好朋友大概都是畫家\n", + "Detected language: zh\n", + "都是他在巴黎認識的我們剛提到的駱特烈克高庚還有披薩羅\n", + "Detected language: zh\n", + "這些人大部分的畫家因為有自己的生活他們也陶醉在自己的一個領域當中陶醉在自己的一個領域當中\n", + "Detected language: zh\n", + "大概讀了范蠱的話可能有所感動吧可是也不會被他所誘惑\n", + "Detected language: zh\n", + "你就真的跑到法國南方去譬如說 我們提到羅特列克羅特列克是一個非常好的畫家\n", + "Detected language: zh\n", + "她在当时蒙马特的《红魔方》画很多这种跳槓槓舞的一些女孩子\n", + "Detected language: zh\n", + "所以她整天跟這些女人混在一起她大概從來也不會想要去跟范古一起住在一起去畫畫\n", + "Detected language: zh\n", + "所以梵谷寫给罗特列克的一封都没有得到回应只有他从来不回信的\n", + "Detected language: zh\n", + "那麼其中回信的一個人是高根我們也瞭解到高根原來是一個在股票市場\n", + "Detected language: zh\n", + "找股票的商人是發了財以後,他其實有一種不快樂他自己也覺得好像文明富有\n", + "Detected language: zh\n", + "我們在上一個單元曾經提過1888年的2月的時候\n", + "Detected language: zh\n", + "比如說我們今天如果從鄉下到了臺北臺北是一個大都市\n", + "Detected language: zh\n", + "可是在職場裡做久了你可能又會不喜歡台北你會覺得這個都會裡面\n", + "Detected language: zh\n", + "好像少掉了什麼東西你又會懷念起原來你在童年時代所居住的那個農村\n", + "Detected language: zh\n", + "那個陽光 那種人情味的溫暖高跟其實有點像這樣子所以高跟一直想離開巴黎\n", + "Detected language: zh\n", + "一直想到鄉下的地方或者荒野的地方他其實不太確定到底是什麼\n", + "Detected language: zh\n", + "我們知道後來在范谷死掉以後高庚就去了大西地其實南太平洋的一個小島\n", + "Detected language: zh\n", + "他就不斷去畫這種原住民然後他覺得原住民是世界上最快樂的人\n", + "Detected language: zh\n", + "因为他们收入很少他们没有权利的欲望没有财富的欲望\n", + "Detected language: zh\n", + "生活非常简单,可他们每天都在唱歌、每天都在跳舞。他们是最快乐的人。\n", + "Detected language: zh\n", + "所以高庚當時讀了范谷的信以後其實受到很大的吸引\n", + "Detected language: zh\n", + "梵谷离开了巴黎前往法国南部的一个地方叫阿 acting\n", + "Detected language: zh\n", + "他就觉得 范古的信里面所描绘的那个阿尔是不是真的是一个天堂\n", + "Detected language: zh\n", + "那邊的人民這麼淳樸那邊的土地這麼遼闊那邊的天家\n", + "Detected language: zh\n", + "這邊這麼藍 那邊的陽光這麼亮麗那邊的每一個麥田\n", + "Detected language: zh\n", + "之前的金黃色都給他很大的感動所以高庚後來就有一點被梵谷打動了\n", + "Detected language: zh\n", + "所以她在回信當中 說有一天我真希望 我能夠到阿爾蘭\n", + "Detected language: zh\n", + "跟你住在一起跟你一起画画好 这下不得了因为犯古一直在等这个同伴\n", + "Detected language: zh\n", + "终于他觉得高跟要来了因此我们这个单元当中\n", + "Detected language: zh\n", + "可能會談一些 1888 年的夏天到 9 月這段時期因為高跟是 1888 年的\n", + "Detected language: zh\n", + "10月到了阿爾那麼在這個之前大概有兩三個月的時間\n", + "Detected language: zh\n", + "范谷一直在准备高跟来临她为高跟画很多的画为高跟准备房子\n", + "Detected language: zh\n", + "對於范國來講這個阿爾其實是一個非常陌生的地方可是他在阿爾感覺到一種\n", + "Detected language: zh\n", + "為高跟準備他的畫畫的工具為他準備椅子那我們可以看到\n", + "Detected language: zh\n", + "高庚的来临变成饭骨燃烧起来了一个具大的热情而竟然也变成他\n", + "Detected language: zh\n", + "創作繪畫的一個最重要的動機我們提到了1888年大概在夏天的時候\n", + "Detected language: zh\n", + "當范古接到了高庚的來信,告訴他說他準備整理 ge\n", + "Detected language: zh\n", + "刑囊,坐火车到南方来找范谷这个时候\n", + "Detected language: zh\n", + "和范古得到非常大的快樂我們可以講一個人在極度的寂寞\n", + "Detected language: zh\n", + "極度的孤獨裡面祂會把所有生命裡面最大的希望寄託在\n", + "Detected language: zh\n", + "一个朋友的身上所以我们大概可以看到这个时候范古的那种狂喜\n", + "Detected language: zh\n", + "她不曉得怎麼告訴這個將要來臨的朋友說這個地方多美\n", + "Detected language: zh\n", + "我自己也去过阿尔,阿尔是一个蛮平凡的小镇这种小镇当然有小镇的可爱\n", + "Detected language: zh\n", + "非常強烈的法國南部的陽光它感覺到在陽光底下大片大片的金黃色的麥田\n", + "Detected language: zh\n", + "可是基本上小鎮人民大概都是農民所以他們也不會有很多\n", + "Detected language: zh\n", + "高階層的像知识分子所以其实从这个角度我们可以了解贩卖股在那边\n", + "Detected language: zh\n", + "那種寂寞致死的感覺因為沒有談話的對象所以這段時期\n", + "Detected language: zh\n", + "另外我們可以看到他畫了很多夜晚的畫比如說夜間的這個\n", + "Detected language: zh\n", + "星空的底下的咖啡屋其實阿爾因為都是農民所以咖啡廳都很少\n", + "Detected language: zh\n", + "唯一的露天咖啡座大概就是站上稍微有一點地位的有文化的人\n", + "Detected language: zh\n", + "會去那邊喝咖啡在露天的一個咖啡桌然後夜晚天空上是暗藍色\n", + "Detected language: zh\n", + "一刻一刻的襲 Allez不过 凡古就画过这个画凡古画这个画 当然说明他可能晚上\n", + "Detected language: zh\n", + "在田山常常睡不着觉然后也就在这个小镇里到处像个孤魂一样\n", + "Detected language: zh\n", + "散步繞來繞去因為我們知道小鎮的人口睡覺都睡得很早\n", + "Detected language: zh\n", + "它常常帶著畫架走到荒野當中把畫架架好去畫這些麥田當中一絲一絲的陽光\n", + "Detected language: zh\n", + "尤其是農民,因為農民早上都是日出而做的。所以他們晚上\n", + "Detected language: zh\n", + "也相對地睡得很早所以整個城鎮裡面那種晚上的荒涼就在這個\n", + "Detected language: zh\n", + "胖古在阿爾時期的話立明顯的感覺到了那他後來\n", + "Detected language: zh\n", + "因為知道高庚要來,他就為他準備房間有一張畫是梵谷畫的-叫做《紅化這是妳的 racist 》\n", + "Detected language: zh\n", + "黃色房屋這個房屋就是當時離火車站不遠的一個地方那飯谷到了以後\n", + "Detected language: zh\n", + "就租下來那他有兩間剛好有兩間他就準備原來他自己住一間\n", + "Detected language: zh\n", + "以前可能是化石现在他就准备把化石移过来把化石让给高跟\n", + "Detected language: zh\n", + "就是他自己有一個房間然後高根有一個房間然後這個時候他就很興奮\n", + "Detected language: zh\n", + "他就幫高庚的房間粉刷我們知道西方人一直有一個習慣\n", + "Detected language: zh\n", + "就是房間裝飾的時候要貼壁紙那麼 泛谷就不肯貼壁紙\n", + ">>>> 09-11\n", + "Detected language: zh\n", + "很多原來很傳統的農村反而變成了對很多人有非常大的吸引力\n", + "Detected language: zh\n", + "我會覺得那個畫面整個太陽的熱都被他留在畫簿上了那麼這個就是一個好的畫家\n", + "Detected language: zh\n", + "因爲我們知道畫畫其實不完全是用視覺畫畫有時候會把\n", + "Detected language: zh\n", + "嗅覺劃進去有時候會把皮膚上的感覺劃出去比如說我去澎湖的海邊\n", + "Detected language: zh\n", + "先游泳晒太陽去玩那我會覺得我要畫澎湖的海我不希望我畫出來的海\n", + "Detected language: zh\n", + "只是一個視覺上看到的海我希望看我畫澎湖海的朋友\n", + "Detected language: zh\n", + "能夠感覺到澎湖的陽光那種亮的感覺那種曬在皮膚上熱的感覺\n", + "Detected language: zh\n", + "甚至我希望我的朋友看我画的澎湖的海的时候能够鼻子上闻到\n", + "Detected language: zh\n", + "那個海裏面有一種鹹鹹的新的味道因為海洋裏面有一種海的味道\n", + "Detected language: zh\n", + "因此我覺得一個好的畫家通常會把身體裡很多不同的感覺記憶\n", + "Detected language: zh\n", + "一起劃在花圃上這是我特別希望很多朋友如果有一天你有機會\n", + "Detected language: zh\n", + "我想我們也可以舉壹下例子譬如說我們在臺灣可能工商業發達之後\n", + "Detected language: zh\n", + "可以站在梵谷的一張相機嘴畫的前面看插的時候\n", + "Detected language: zh\n", + "千万不要忘记,你不应该只是用眼睛。你可以透过你的视觉\n", + "Detected language: zh\n", + "感覺到那個畫裡面某一種法國南部的那種陽光乾燥的\n", + "Detected language: zh\n", + "有一點星裂的氣味因為像是葵花的花被栽下來以後\n", + "Detected language: zh\n", + "很快它就乾了那麼乾掉的向日葵其實它會釋放出一些\n", + "Detected language: zh\n", + "是很特殊的植物氣味今天我舉個例子在台灣\n", + "Detected language: zh\n", + "到谷成熟的時候我走過那個稻田風裏面陽光底下\n", + "Detected language: zh\n", + "會帶來一陣一陣道骨的那個氣味有一種米跟骨的香味\n", + "Detected language: zh\n", + "倒古的那個香味我想襄逸葵的話也在傳達這樣的一個很有趣的訊號\n", + "Detected language: zh\n", + "所以因此很多人都认为范古是一个很特殊的画家因为在他之前\n", + "Detected language: zh\n", + "有些人會特別在周休二日去尋找類似像九份或者是美濃這種比較傳統性的施政\n", + "Detected language: zh\n", + "绘画这个事情都被认为是visual art就是视觉艺术可是梵谷\n", + "Detected language: zh\n", + "是一個把所有生命的感覺都畫進畫布的人所以他的畫\n", + "Detected language: zh\n", + "會讓所有的人感動起來不只是看同時是去\n", + "Detected language: zh\n", + "感觉到画布里面很多生命的那个力量比如如果我们看他画的那个陶罐\n", + "Detected language: zh\n", + "我們知道插著這個向日葵的陶罐就是法國南部一般的\n", + "Detected language: zh\n", + "農民家裡面最常用的陶罐我們知道這種陶罐 就是用陶土\n", + "Detected language: zh\n", + "捏出來的一個很笨笨拙拙有點像台灣以前養猪的時候\n", + "Detected language: zh\n", + "裝噴的那種 裝搜水用的那種甕它不是瓷器\n", + "Detected language: zh\n", + "因為磁器很細致它是一種陶土的罐子而且很顯然的\n", + "Detected language: zh\n", + "我們看到它上誘的方法可能就是把誘料從上面交上去所以我們看到有一張\n", + "Detected language: zh\n", + "在那边回忆一些农业的记忆或者是手工业的记忆所以我们知道大概在19世纪末的时候\n", + "Detected language: zh\n", + "泛谷的向日葵它的陶罐上有绿色的诱料可这个绿色的诱料留到一半就不留下去了\n", + "Detected language: zh\n", + "因為底下是樹胚因為農民在做桃冠的時候不會像公庭裡面做東西這麼講究\n", + "Detected language: zh\n", + "所以它就把肉料澆上去 泼上去以后那个肉料就自然流下来那么反而构成一种\n", + "Detected language: zh\n", + "很粗獷的美因此就看到范古在上日奎的話裡不只在傳達\n", + "Detected language: zh\n", + "向日葵的美也传达出法国南部某种农民生活里面的\n", + "Detected language: zh\n", + "渾然大气一种粗旷的樸质的这种美所以因此她这几张画作就变成\n", + "Detected language: zh\n", + "非常非常的有名那么特别到了1987年我们知道当时\n", + "Detected language: zh\n", + "是從民間私人收藏的一張相日賄因為大部分的相日賄都已經賣到博物館去了\n", + "Detected language: zh\n", + "博物馆就不會再賣出來了留到民間可能唯一的一張相日魁後來在拍賣市場拍賣\n", + "Detected language: zh\n", + "那麼日本有一個安田保險公司就花了當時台幣將近10億\n", + "Detected language: zh\n", + "也有最早向米勒這些畫家他們就到了豐丹白露的一個地方\n", + "Detected language: zh\n", + "去买了这张画而轰动世界那么这是1987年如果是今天\n", + "Detected language: zh\n", + "我想20億都不止了飯谷的話當然也越來越少因為它後來關在金城病院\n", + "Detected language: zh\n", + "到1890年就自杀了我们现在讲的是1888年所以他其实主要的话做\n", + "Detected language: zh\n", + "也就是在最後的兩三年裡畫的那麼數量也不會是那麼多因此\n", + "Detected language: zh\n", + "就是一張珍貴的飯股可能真的就是期貨可拒\n", + "Detected language: zh\n", + "談到這個向日苦也覺得他對於飯穀的生命好像有最後某一種隱喻的意義\n", + "Detected language: zh\n", + "因為向日葵一直追求陽光對於飯谷來講生命是要燃燒的\n", + "Detected language: zh\n", + "如果生命不能燃烧他宁可死掉好像她最后的自杀跟她这个生命的\n", + "Detected language: zh\n", + "追求有关他希望他的生命是一种光跟热的释放他希望他活着他的生命\n", + "Detected language: zh\n", + "你能夠如此燦爛像向日葵一樣燦爛如果這個聲明\n", + "Detected language: zh\n", + "叫做巴比松創立了所謂巴比松華派巴比松原來也就是一個農村\n", + "Detected language: zh\n", + "你沒有辦法 這麼燦爛他就寧可結束自己那我想這是 反骨很特殊的\n", + "Detected language: zh\n", + "一個對生命價值的自我解釋我們談到\n", + "Detected language: zh\n", + "通常我們會講到7章在不同博物館收藏\n", + "Detected language: zh\n", + "大家可以注意一下,它曾经有一段时间用一个浅蓝色\n", + "Detected language: zh\n", + "很明亮的蓝色来做向日葵的背景由向日葵基本上是黄色的色调\n", + "Detected language: zh\n", + "可是後來他也選擇了檸檬黃檸檬黃裡面帶一點點淡淡的綠\n", + "Detected language: zh\n", + "是一种明度很高的黄色他用这种黄色做背景来衬出前面\n", + "Detected language: zh\n", + "是一些比較深的黃色的象日葵你會發現它畫面是好幾種不同的黃色組織\n", + "Detected language: zh\n", + "包括桌子,桌子是一种土黄色。桃罐也是一种土黄色。\n", + "Detected language: zh\n", + "像日葵是一种带着咖啡色的黄后面的背景是柠檬黄因此我们就会发现\n", + "Detected language: zh\n", + "可是因為農民在那邊耕種有一種很特殊的景象\n", + "Detected language: zh\n", + "范古在这段时期非常喜欢黄颜色他用黄色来做各种的变调\n", + "Detected language: zh\n", + "好像變成黃色的一種交響曲所以通常我們常常在畫畫的時候會喜歡用到\n", + "Detected language: zh\n", + "不同的顏色來做配置可是梵谷是在單一的顏色當中\n", + "Detected language: zh\n", + "做不同色系的變化所以因此如果大家有機會特別是到\n", + "Detected language: zh\n", + "而倫敦我自己最喜欢的那一张相日奎大家可以感觉到黄色变的这么丰富\n", + "Detected language: zh\n", + "因為黃色其實就是陽光的顏色那種黃裡面帶著一種金一種黃金的貴重\n", + "Detected language: zh\n", + "一种灿烂其实范古在追求生命的燃烧性他希望生命能够燃烧到最灿烂的状况\n", + "Detected language: zh\n", + "像火的颜色、像星辰的颜色、像太阳的颜色,她希望把她的自己的生命提高到一种\n", + "Detected language: zh\n", + "跟宇宙裡面最明亮的這些星塵能夠一起發亮發光\n", + "Detected language: zh\n", + "所以 因此我們站在尚日葵這些畫作前面我們被感動的 其實 不只是\n", + "Detected language: zh\n", + "這個景象本來可能並不稀奇可是慢慢因為工業革命以後\n", + "Detected language: zh\n", + "像日葵這一個花我覺得是范谷本身的那個生命還有我也希望大家\n", + "Detected language: zh\n", + "如果有机会看原作那我在我写的《饭谷的这个书》里面也希望尽量用很多的局部\n", + "Detected language: zh\n", + "把這個向日葵的花的某一種感覺呈現出來因為我在倫敦看原作的時候\n", + "Detected language: zh\n", + "我發現它畫那個向日葵向日葵的花的中間, 有很大一堆葵花詞\n", + "Detected language: zh\n", + "也就是我们讲到花蕊的部分有点像我们讲莲花莲花花瓣掉了以后\n", + "Detected language: zh\n", + "它中間會有個蓮蓬蓮蓬就是產生蓮子的那個地方就是下一代生命的地方\n", + "Detected language: zh\n", + "我們平常有些朋友喜歡吃葵花籽\n", + "Detected language: zh\n", + "向日葵花瓣的中央有點像我們手掌大小一個圓形的東西那有時候它可以蠻大\n", + "Detected language: zh\n", + "我在法国看到的向日葵通常比我在台湾看到的向日葵要大有时候那一朵向日葵\n", + "Detected language: zh\n", + "大概有一个人的脸那么大然后中间的葵花籽构成的花芯的部分\n", + "Detected language: zh\n", + "人們越來越懷念人在土地裡勞動跟工作的風景\n", + "Detected language: zh\n", + "大概就有我手掌的那種大小然後這個時候你看到梵谷在畫這個部分的時候\n", + "Detected language: zh\n", + "因為葵花籽是一粒一粒的裡面有一種很密的聚在一起很厚實的質感\n", + "Detected language: zh\n", + "尤其在摘下来以后插在陶瓶里面它干了以后那个质感更明显\n", + "Detected language: zh\n", + "那梵谷想要传达出那个感觉可是你用画的 其实不容易画出来\n", + "Detected language: zh\n", + "后来我就发现他把油画颜料通常我们画到画布上\n", + "Detected language: zh\n", + "可能要堆很久以後就會變得很厚可能很厚的顏料比如說如果有2公分厚的顏料\n", + "Detected language: zh\n", + "要一个礼拜才能够干透就是它不是那么容易干的所以这个时候饭谷就在\n", + "Detected language: zh\n", + "还没有干的这一块颜色就是咖啡色黄色挑出来的花蕊\n", + "Detected language: zh\n", + "你们还带着绿色的葵花齿的部分它就用油画笔\n", + "Detected language: zh\n", + "我不知道一般朋友对油画笔熟不熟它跟我们写毛笔字的毛笔不太一样\n", + "Detected language: zh\n", + "所以他們就會刻意跑去看譬如說我想今天如果我們在大都會裡長大的孩子\n", + "Detected language: zh\n", + "毛筆通常前面是尖的它是一個比較平頭的油畫筆\n", + "Detected language: zh\n", + "他用這個圓圓的平頭的油畫筆直接就是90度角\n", + "Detected language: zh\n", + "去碰這個粘粘的油化顏料碰了以後就拉起來\n", + "Detected language: zh\n", + "所以你就看到画簿上一个一个尖尖的挥花籽的尖出来\n", + "Detected language: zh\n", + "就是被他提起來的這個大家可以試試看比如說你揉麵做麵糰一個麵糰沒乾的時候\n", + "Detected language: zh\n", + "你如果拿一个油画笔架直接搓下去在拉前搓下去在拉前\n", + "Detected language: zh\n", + "那個面就會尖尖的這樣拉起來有點像我們做生日蛋糕\n", + "Detected language: zh\n", + "生日蛋糕最后挤奶油完全是雕塑性的饭骨就把向日葵的花芯这个部分\n", + "Detected language: zh\n", + "完全變成雕塑印象很深在倫敦每次看的時候你就有一種很大的衝動是\n", + "Detected language: zh\n", + "就是想要用手去摸当然博物馆的话是不让你摸的可是因为它已经不是平面\n", + "Detected language: zh\n", + "你周秋二日的時候 把它帶到類似像嘉南平原的某一個農村\n", + "Detected language: zh\n", + "他變成立體的雕塑了那我覺得這是泛古的話最動人的部分因為他把一個\n", + "Detected language: zh\n", + "平面的繪畫其實是比較溫和的可是當它一旦變成立體的雕塑的時候\n", + "Detected language: zh\n", + "它有一種很強烈的感覺尤其上面一打光以後這個雕塑就會產生立體的光影出來\n", + "Detected language: zh\n", + "它是三度空间的立体的这种我们叫做脚椎体有点椎体的那个美\n", + "Detected language: zh\n", + "這些部分是可能,還沒有看過原話的朋友有時候比較不容易理解\n", + "Detected language: zh\n", + "所以我想我也花多一点时间特别强调如果有朋友到国外去旅行\n", + "Detected language: zh\n", + "到阿姆斯特丹的反古美术馆或者是荷兰的库拉木勒反古美术馆\n", + "Detected language: zh\n", + "或者是到倫敦羅浮宮到奧塞美術館你可能都會看到泛古的作品\n", + "Detected language: zh\n", + "你看到的勿,千萬注意一下范古怎麼使用ö化鹽料就是他把ünü化鹽料當成是一種\n", + "Detected language: zh\n", + "黏土在畫布上在堆堆的很厚很厚最後機裡構成的質感\n", + "Detected language: zh\n", + "可能她也會很感動 因為對她來講視覺的經驗是她在可能台北或者高雄這種都市\n", + "Detected language: zh\n", + "我想是范古最美的部分我形容它有点像火焰而那个火焰当然也是范古自己内在世界\n", + "Detected language: zh\n", + "也非常狂熱的一個自我表情我們接下來就要談到\n", + "Detected language: zh\n", + "画相日葵的同一个时间汎古也开始大量地画自画像\n", + "Detected language: zh\n", + "他已經意識到他自己內在世界有一些跟常人不同的東西\n", + "Detected language: zh\n", + "所謂跟平常人不同,就是説他容易太過度的亢奮。\n", + "Detected language: zh\n", + "好譬如說我們有朋友來了我們可能很高興我們就準備韭菜招待朋友\n", + "Detected language: zh\n", + "可是泛谷在等待高耕来的时候那个康奋已经到了有点不克自治\n", + "Detected language: zh\n", + "好像他睡觉都睡不着了我们叫做害过头了就是亢奋过头的时候他是没有办法安静睡觉的\n", + "Detected language: zh\n", + "所以,今天精神醫療學上說泛谷有明顯的躁鬱病\n", + "Detected language: zh\n", + "這個罩就是狂罩的罩它爆罩起來的時候太過興奮他常常不能睡覺\n", + "Detected language: zh\n", + "都會驅理感覺不到的所以我想人類很特別就是\n", + "Detected language: zh\n", + "用我们今天的话来讲他需要用安眠药才能够让他安静下来但这个时候他就会化化\n", + "Detected language: zh\n", + "所以他就開始畫了很多自畫像好像在鏡子裡他不斷看自己他也想研究自己\n", + "Detected language: zh\n", + "了解自己 解剖自己她在鏡子裡問自己范古 你到底出了甚麼毛病\n", + "Detected language: zh\n", + "为什么大家都在睡觉你睡不着那个焦虑的饭骨那个燃烧的饭骨那个亢奋的饭骨\n", + "Detected language: zh\n", + "其實也是創造力最強的犯蠱所以我們有時候很矛盾我們希望犯蠱\n", + "Detected language: zh\n", + "不要生這個病 不要這麼痛苦 不要失眠可是我們知道 如果不焦慮 不失眠\n", + "Detected language: zh\n", + "范古也畫不出那麼好的畫所以每次看到智畫相的時候都會有一種很大的感動\n", + "Detected language: zh\n", + "因為梵谷的的確是用燃燒自己創造了世間最美的感動力量\n", + "Detected language: zh\n", + "因此,我們一方面心疼這個話家,覺得說,他可不可以不要發病?\n", + "Detected language: zh\n", + "可是我們又知道不發病也沒有這麼偉大的創作我想我們今天感覺到\n", + "Detected language: zh\n", + "往往在往前的進步我們說商業工業是一種進步可他同時又有一個對過去社會的懷舊\n", + "Detected language: zh\n", + "從飯穀的生命來講 每根壽苦幾乎產生了一個\n", + "Detected language: zh\n", + "讓我們難以抉擇的兩難我們談到了梵谷在1888年的夏天以後\n", + "Detected language: zh\n", + "为了等待高庚的来临他的画作里出现两个很重要的主题\n", + "Detected language: zh\n", + "一個是向日葵一個是自畫像對我自己來講因為我也畫畫\n", + "Detected language: zh\n", + "所以我會覺得一個畫家所有的畫作不管是風景、鏡物\n", + "Detected language: zh\n", + "其實都在畫自己因為其實劃家在畫畫的過程當中雖然比如說泛古在面對著向日葵\n", + "Detected language: zh\n", + "向日葵裡面他所要表達的黃色那種光那種熱\n", + "Detected language: zh\n", + "其實是他的熱情 是他的Passion是他的內在世界的某一種糾纏\n", + "Detected language: zh\n", + "所以,我們也可以說每一張畫都代表他的自畫像可是當然,一個畫家在鏡子裡看自己的時候\n", + "Detected language: zh\n", + "做畫下自畫像是更真實的自畫像可是我也跟很多朋友解釋\n", + "Detected language: zh\n", + "農業的生活裡面點點滴滴會變成很感動它的某些力量\n", + "Detected language: zh\n", + "其實一個畫家最難處理的題材 也就是自畫像\n", + "Detected language: zh\n", + "我這樣講的原因是我想很多朋友都可以做這樣的測驗如果你有機會\n", + "Detected language: zh\n", + "你就静静坐在一面镜子前面没有什么目的的在镜子里看自己\n", + "Detected language: zh\n", + "看自己的額頭看自己的眉毛可能看到額頭跟眉毛之間有一些皺紋\n", + "Detected language: zh\n", + "可能是因為歲月形成的皺紋可能是因為最近心情一直不好發怒\n", + "Detected language: zh\n", + "可能眉頭之間就會出現皺紋我們會發現一張臉其實記錄了人所有的\n", + "Detected language: zh\n", + "平常不知不覺累積的焦慮、恐懼、緊張\n", + "Detected language: zh\n", + "喜悅等待全部都會在臉上有時候我覺得很有趣\n", + "Detected language: zh\n", + "所以你在鏡子裏很慢的很安靜地看自己的時候會發現每一條紋路都不會是偶然的\n", + "Detected language: zh\n", + "因為你長期緊張焦慮可能會出現哪幾條皺紋你長期喜歡笑的人可能會出現哪幾條皺紋\n", + "Detected language: zh\n", + "甚至我們今天會覺得我們到了農村以後一個老式的、閩南式的那種像三合院的老房子\n", + "Detected language: zh\n", + "其實我們的五官的表情是一個我們長期精神累積的最後結果\n", + "Detected language: zh\n", + "它是一個作品就是我會發現有些朋友在最近的五年當中\n", + "Detected language: zh\n", + "因為事業的關係 或者感情的關係特別的憂愁我就發現它兩枚之間 那個深度是比別人要深的\n", + "Detected language: zh\n", + "就是他很明顯就告訴我他的心情是在憂愁的狀態可是如果這個人很心靜平坦\n", + "Detected language: zh\n", + "他可能就沒有這兩條皺紋所以因此, 我想翻古再鏡子裏看自己的時候\n", + "Detected language: zh\n", + "他當然發現了他自己的五觀已經被某一種精神上的焦慮折磨到\n", + "Detected language: zh\n", + "跟一般人不一樣大家如果有機會看到1888以後的自畫像你會感覺到他內心世界的恐慌\n", + "Detected language: zh\n", + "緊張 全部都表現出來我記得以前有一個好萊塢的電影叫將軍之夜\n", + "Detected language: zh\n", + "那麼提到在德國納粹時期的一個將軍因為納粹是殺人如麻的\n", + "Detected language: zh\n", + "可是这个将军平常都是很威严的然后大家都觉得他道貌岸然可是有一次他就是刚好没收了很多人的话\n", + "Detected language: zh\n", + "前面有一個曬谷廠裡面的那種廚房跟我們現代廚房的構造不太一樣\n", + "Detected language: zh\n", + "因为范古在纳粹的时期被认为是不好的艺术所以就没收没收以后他在看范古的自画像\n", + "Detected language: zh\n", + "看了以後整個臉上的肌肉就開始跳動我記得是彼得奧圖演的一個電影\n", + "Detected language: zh\n", + "其實那裡面是在講說泛谷的自化像會引發我們類在很多精神上的呼喚出來\n", + "Detected language: zh\n", + "你看我出的畫次可能還好如果有一天你在面對它真正的自畫像的原作\n", + "Detected language: zh\n", + "你會覺得呼吸都喘不過氣了因為他的畫作會讓你有一種緊張\n", + "Detected language: zh\n", + "她的整個眉毛跟眼睛之間她用很多的點去處理然後你會馬上感覺到這個人\n", + "Detected language: zh\n", + "已經到了精神病馬上要爆發就他在畫這個畫的時候還沒有精神病爆發\n", + "Detected language: zh\n", + "因為它是到1888年的12月精神病才爆發\n", + "Detected language: zh\n", + "可是我们看到8月9月10月11月的字画像已经感觉到它one by one濒临崩溃的边缘\n", + "Detected language: zh\n", + "所以現在很多的精神醫療學把泛谷的22張自划像\n", + "Detected language: zh\n", + "有一個大招的我想很多人都會很感動因為覺得這種建築對我們來說已經\n", + "Detected language: zh\n", + "连在一起给大家看那么来分析告诉我们说范玒 upbringing其实她的字化像是最好的病例\n", + "Detected language: zh\n", + "我們知道我們去看醫生醫生會有一個病歷表這個病歷表把我們每一次發病的過程記錄下來\n", + "Detected language: zh\n", + "在做有什么症状这个病例表示一个记录我们病的一个资料\n", + "Detected language: zh\n", + "可是精神醫療學告訴我們說任何醫生的病例表其實都比不上半股的自華像\n", + "Detected language: zh\n", + "因為范谷的自畫像是比別人更深刻地對自己的分析我想跟朋友交換一個意見\n", + "Detected language: zh\n", + "就是 范古是個精神病人我們今天無可否認他後來因為被關在精神病院治療他是一個精神病人\n", + "Detected language: zh\n", + "可是千万不要忘记泛谷同时也是自己的医生他在画画的时候同时在治疗自己\n", + "Detected language: zh\n", + "很多人都发现范古画画的时候非常安静就是不管她多么狂暴的个性躁躍并发到什么程度\n", + "Detected language: zh\n", + "他在画画的过程当中非常非常的安静所以因此现在很多的精神医疗学\n", + "Detected language: zh\n", + "也都用繪畫來做躁鬱病的治療我就曾經參觀過像台大醫院的這個躁鬱病方面的治療\n", + "Detected language: zh\n", + "有點遙遠了所以我想用這個例子解釋梵谷在1888年2月到了阿爾以後\n", + "Detected language: zh\n", + "他們還出過劃冊的就是其實我們很難解釋一個人當她在發病的過程當中\n", + "Detected language: zh\n", + "如果他的手去做一点什么事情比如说一种手工编织或者是刻板画\n", + "Detected language: zh\n", + "他在做一個什麼事情的時候那個專注會轉移他精神的焦慮\n", + "Detected language: zh\n", + "她反而會 calm down 安靜下來她的那個 high 那個過度的亢奮慢慢慢慢會靜下來了\n", + "Detected language: zh\n", + "因此,我想范古同時扮演了病人的角色,也同時扮演了醫生的角色。\n", + "Detected language: zh\n", + "而它的自化像也提供給人類第一次對於躁鬱病這樣的一個精神病的領域\n", + "Detected language: zh\n", + "一個非常深的思考因此,我覺得anychui對於人類的貢獻其實不只是在藝術\n", + "Detected language: zh\n", + "不只是在美學他其實在精神醫療學上各方面他提供了很多彌足珍貴的資訊\n", + "Detected language: zh\n", + "让我们对19世纪人类非常不了解的一个广阔的精神病的领域\n", + "Detected language: zh\n", + "像一個浩瀚的大海一樣有了可以更繼續深入探討的可能\n", + "Detected language: zh\n", + "它其實也在找這個東西對它來講它是一個話講\n", + "Detected language: zh\n", + "所以现在常常精神病的医疗学为犯谷的话去做很多的国际医学会议\n", + "Detected language: zh\n", + "来探讨从他画作里面所表现出来的精神现象有朋友说我那么喜欢范古\n", + "Detected language: zh\n", + "是不是我有一種精神病的傾向那其實我讀到的一些資料是非常有趣的因為現代的精神病的醫療學告訴我們說\n", + "Detected language: zh\n", + "我們每一個人,我們認為是正常的人其實都有多多少少憂鬱跟狂躁的傾向\n", + "Detected language: zh\n", + "所以肇icher跟御并不是只有精神病人有它们被称为精神病患是因为它\n", + "Detected language: zh\n", + "造根喻 已經到了可能不可自治的狀況或者可能到了傷害自己\n", + "Detected language: zh\n", + "或傷害他人的部分可是從醫療學的角度來講我們每一個人其實都有這種傾向\n", + "Detected language: zh\n", + "比如說我很容易可能因為朋友來我就很高興小時候媽媽常說你人來瘋\n", + "Detected language: zh\n", + "其實這個人來風就是說我們也有造的部分或者是有時候可能因為最近身體裡面\n", + "Detected language: zh\n", + "你就觉得奇怪的分泌就特别忧郁不知道为什么一段时间你会觉得因为身体里面的循环系统不好\n", + "Detected language: zh\n", + "這裡是IC之音—FM97.5您現在所收聽的是美的塵絲\n", + "Detected language: zh\n", + "畫家在畫布上用顏色畫畫的時候\n", + "Detected language: zh\n", + "你就不想见朋友然后饭也不想吃这个忧郁也是很正常的\n", + "Detected language: zh\n", + "並沒有什麼不正常那現代醫療學只是告訴我們要充分地了解自己的躁跟愈\n", + "Detected language: zh\n", + "所以知道的灶不要过头那个浴也不要过头如果我今天犹豫了一个礼拜\n", + "Detected language: zh\n", + "我就想辦法去曬曬太陽或者去游游泳到大自然走一走可能我就好了我就渡過來了\n", + "Detected language: zh\n", + "所以因此我會推薦很多朋友看梵谷的話我覺得梵谷的話是了解自我\n", + "Detected language: zh\n", + "最好的一個橋樑所以他不只是有美學的功能他有瞭解你生命\n", + "Detected language: zh\n", + "內在世界的一個最大的貢獻美得沉思我是蔣徐\n", + "Detected language: zh\n", + "會覺得顏色往往是因為強烈的陽光而使色彩變得更飽和\n", + "Detected language: zh\n", + "我们知道,颜色,比如说红色,蓝色,黄色,绿色\n", + "Detected language: zh\n", + "当它在强烈的阳光底下,它会变得更饱和比如,如果我把同样的红色放在比较暗的地方看\n", + "Detected language: zh\n", + "跟放在陽光底下看它在視覺上反應出來的這個頻率\n", + "Detected language: zh\n", + "其實是不一樣的所以因此我們就會發現范古後來很喜歡強烈的色彩\n", + "Detected language: zh\n", + "所以他就想離開巴黎因為對他來講巴黎有一點陰天太多\n", + "Detected language: zh\n", + "巴黎大概入秋以后,基本上都是灰色的很少有阳光所以他就希望往南走\n", + "Detected language: zh\n", + "所以1888年2月它这个往南走的行动也可以代表\n", + "Detected language: zh\n", + "十九世紀許許多多的畫家當時對於陽光的某一種渴望\n", + "Detected language: zh\n", + "我是蔣旋我們談到了梵谷在阿爾時期也就是1888年的2月\n", + "Detected language: zh\n", + "因爲自從印象拍之後,惠畫強調所謂的外光畫排\n", + "Detected language: zh\n", + "就是,画画要在户外,在阳光底下画所以直接的,透过阳光\n", + "Detected language: zh\n", + "照射到景物上,所發射出來那種燦爛的光他們想把這個光能夠捕捉到\n", + "Detected language: zh\n", + "所以因此,我们会发现,以法国为主,很多的画家在印象派之后\n", + "Detected language: zh\n", + "不斷地往南走我們看到塞上後來到了普羅旺斯雷諾瓦也到了普羅旺斯\n", + "Detected language: zh\n", + "很多画家都往南走,其实都是为了追求某一种阳光。\n", + "Detected language: zh\n", + "我自己去过阿尔这个小镇即使到今天它还是一个蛮淳朴的一个农村的形态\n", + "Detected language: zh\n", + "只是多了很多外来的观光客,为了去看范谷留下的足迹。\n", + "Detected language: zh\n", + "所以我们可以想象阿尔这个地区你走出小镇以外\n", + "Detected language: zh\n", + "到处都是麦田那个麦子在成熟的时候透过阳光的照射\n", + "Detected language: zh\n", + "他離開了巴黎到了法國南部的阿爾可能很多朋友對阿爾這個地名並不熟悉\n", + "Detected language: zh\n", + "幾乎是一片金黃色那麼還有我想在阿爾最美的景觀\n", + "Detected language: zh\n", + "所有人都被震撼的景觀是像日葵的花田\n", + "Detected language: zh\n", + "也許我們在台灣不是很容易感覺得到因為像是為是法國的南方\n", + "Detected language: zh\n", + "非常普遍的一種植物它其實並不是為了花藝\n", + "Detected language: zh\n", + "我們說今天我們種象日葵可能是為了賣象日葵的花那麼在傳統的農村當中\n", + "Detected language: zh\n", + "一般人也不會花很貴的錢去買花所以那個時候花可能還無法變成\n", + "Detected language: zh\n", + "一個農業裡面可以有利潤的產業所以向日葵在那個年代當中\n", + "Detected language: zh\n", + "是為了輝花齒他可以榨油那麼這個油本身有它的產能價值\n", + "Detected language: zh\n", + "所以農民就大片的種襄蕊花田\n", + "Detected language: zh\n", + "我现在 seat when I drive through r的时候的时候的时候的时候的时候的时候的时候的时候的时候你会发现你会发现开车开很gado车NSJRC CTHTHZZ555555555\n", + "Detected language: zh\n", + "可是因為梵古在這個地方居住畫畫所以阿爾現在變成了全世界最有名的一個觀光景點\n", + "Detected language: zh\n", + "很久乡日奎的花田都没有结束就是这么辽阔这么大片在平原\n", + "Detected language: zh\n", + "或者微微起伏的山丘上的一大片一大片的向日葵暫時這個向日葵大家都知道\n", + "Detected language: zh\n", + "因為它是一種很特殊的植物它有一種很強的相光性\n", + "Detected language: zh\n", + "他永遠在尋找陽光所以你在不同的時間譬如說我在早上黎明的時候看到的向日葵\n", + "Detected language: zh\n", + "它可能整個都朝向東方好像迎接那個從大地上正在慢慢升起的那個黎明的初日\n", + "Detected language: zh\n", + "到中午的時候他們每個都仰著頭看著日正當中的太陽然後慢慢到下午以後\n", + "Detected language: zh\n", + "他们就朝向西方,一直到黄昏,好像在送别。\n", + "Detected language: zh\n", + "在地平線上逐漸消失的夕陽光所以向日魁是個相光性非常強的植物\n", + "Detected language: zh\n", + "五間屋垂就構成了很特殊的一種視覺景觀而范谷當時對於相日恐嚇\n", + "Detected language: zh\n", + "發生了非常大的感動我想她自己覺得她像一朵像日葵的花她好像在生命裡一直在尋找陽光\n", + "Detected language: zh\n", + "原來阿爾當然像法國南部普羅旺斯這一帶很多很多的小鎮\n", + "Detected language: zh\n", + "一直在寻找太阳的光跟热他希望他的生命能够感受到太阳的光跟热\n", + "Detected language: zh\n", + "而且把光跟熱分享給人間因此這段時間他畫了大量的\n", + "Detected language: zh\n", + "以向日葵為主題的畫作也稱為反骨在藝術史上留下的\n", + "Detected language: zh\n", + "我們知道飯谷在1888年 大概下季\n", + "Detected language: zh\n", + "夏天的這段時期,可能是七月八月九月這幾個月當中,她非常集中地在畫《向日葵》\n", + "Detected language: zh\n", + "那向日葵的花田一大片一大片的花田是他每天背著畫架走過的風景\n", + "Detected language: zh\n", + "它可以感受到每一朵向日葵對於陽光的渴望而且從土地裏面生長起來的這種頑強的生命力\n", + "Detected language: zh\n", + "在視覺上,也給予梵谷非常大的震撼。那麽除了它面對自然風景裡的相日暉之外,\n", + "Detected language: zh\n", + "我們看到范谷當時也在準備她的一個好朋友就是高庚的來臨\n", + "Detected language: zh\n", + "因为高庚大概准备10月的时候要到阿尔来看 犯古\n", + "Detected language: zh\n", + "或者 連市政的資格都沒有可能就是農村吧那可是這些地方\n", + "Detected language: zh\n", + "而且准备要住一段时间,他们一起生活,一起画画。\n", + "Detected language: zh\n", + "所以這時梵谷正在餵高庚的來臨準備一個很漂亮的房間\n", + "Detected language: zh\n", + "整個牆壁上的花都是他自己畫出來像貼壁紙一樣去畫這些花\n", + "Detected language: zh\n", + "那麼她就覺得這個牆壁上她要送給高跟一張她覺得最好的畫\n", + "Detected language: zh\n", + "就是他自己覺得最得意的一張畫作後來他就選擇了象日愧所以這一段時間他不只在大自然當中畫象日愧\n", + "Detected language: zh\n", + "他也把向日葵摘下来 带回家插在一个桃罐当中\n", + "Detected language: zh\n", + "好,所以我们现在看范古的这几张,有名的向日葵,他大概在这段时间\n", + "Detected language: zh\n", + "现在我们保留下来在世界各个不同的博物馆都有饭股的向日葵\n", + "Detected language: zh\n", + "比如說很有名的倫敦的一張泛古畫的象日盔還有慕尼黑\n", + "Detected language: zh\n", + "睦尼黑的博物馆里面也有泛古化的向日葵纽约的现代美术馆\n", + "Detected language: zh\n", + "他的一種純樸所以很有趣的我們發現在法國的工業革命之後\n", + "Detected language: zh\n", + "也有一張返故話的向日葵這些向日葵其實我們如果把它擺在一起\n", + "Detected language: zh\n", + "你會覺得有一點大同小異大概都是一種最單純的畫法就是一個桃瓶裡插了比較少是三朵\n", + "Detected language: zh\n", + "比較多的話可能14朵到15朵的向日葵然後放在桌子上\n", + "Detected language: zh\n", + "所以画面上就是有一个桌子然后后面有一个蓝色的背景可是后来他又把蓝色背景改成了黄色的背景\n", + "Detected language: zh\n", + "因此我们就看到这些画作里面所有的色彩的使用都非常非常的明亮\n", + "Detected language: zh\n", + "好,我们也明显的感觉到,范古到了阿尔以后因為感受到在法国南部的那个阳光的亮丽\n", + "Detected language: zh\n", + "所以他好像試圖在他的畫布上把法國南方的陽光的明亮跟熱度\n", + "Detected language: zh\n", + "留在畫布上我這樣講有些可能會不太了解因為我們覺得畫畫是一種視覺\n", + "Detected language: zh\n", + "可是当我讲一种阳光的热的感觉它是触觉,是体温\n", + "Detected language: zh\n", + "可是很奇怪我自己好幾次在國外的博物館看飯骨的向日葵的時候\n", + ">>>> 09-12\n", + "Detected language: zh\n", + "因为我想现在医疗学都认为精神病本身可能是一个人的某一种记忆\n", + "Detected language: zh\n", + "因為我們對這個領域太不知道我們不了解因為不了解所以其實會有很大的恐懼\n", + "Detected language: zh\n", + "所以我们常常会躲闪而范古在这个时候其实当然 因为他被换屏的状况\n", + "Detected language: zh\n", + "糾纏得太厲害所以現在的醫學上特別解釋說因為他一直幻聽\n", + "Detected language: zh\n", + "幻听就是一直有人在耳朵旁边讲话如果我们碰到一个精神病患的朋友\n", + "Detected language: zh\n", + "他跟你說有某某人或者某某神在我耳邊一直講話\n", + "Detected language: zh\n", + "他講的不是幻想他是真的發生這些事\n", + "Detected language: zh\n", + "問一些精神病方面的醫生他們就跟我講說你對他是發脾氣生氣是沒有用的\n", + "Detected language: zh\n", + "因為對他來講的是很真實的東西他視覺上看到的東西跟他聽覺上聽到的東西\n", + "Detected language: zh\n", + "對他來講是真的如果不是真的范國不会拿起剃刀忍住這麼大的痛把耳朵割下來\n", + "Detected language: zh\n", + "那個東西是一個糾纏就那個聲音一直存在那她一定很努力的去看說到底是誰在跟我講話\n", + "Detected language: zh\n", + "它其實本來就已經存在我們現在可以說半谷它年輕的時候那種對基督教的狂熱\n", + "Detected language: zh\n", + "到底誰在像魔鬼一樣的一直在耳邊發出詛咒的語言可是泛谷每次看都看不到\n", + "Detected language: zh\n", + "可是聲音是真的在的所以因此他最後生氣起來了他就拿剃刀把耳朵割下來\n", + "Detected language: zh\n", + "所以這件事情是現在的精神醫療學上一直在探討的一個重點\n", + "Detected language: zh\n", + "也讓我們了解到說精神病患他所受到的痛苦\n", + "Detected language: zh\n", + "恐怕是我們正常人非常非常難以理解的因為他是真正感覺到\n", + "Detected language: zh\n", + "那個東西在折磨他在糾纏他所以我特別會建議大家如果有興趣可以參考一下\n", + "Detected language: zh\n", + "在我寫的《受苦與救贖,梵谷》的專輯裡我特別比較了\n", + "Detected language: zh\n", + "范古的字畫像因為他的字畫像是1888-1890年\n", + "Detected language: zh\n", + "之間有22張你會發現 在他割耳朵之前翻古所有的字畫像\n", + "Detected language: zh\n", + "我們在前面的單元裡有介紹過充滿了焦慮充滿了一種精神上不快樂的\n", + "Detected language: zh\n", + "甚至他到那個礦工裡面去對礦工的人道主義的關懷唉\n", + "Detected language: zh\n", + "那個眼睛就是讓你一看就覺得要發病的可大家如果看到割了耳朵之後\n", + "Detected language: zh\n", + "他畫了兩張自畫像我們特別給他一個名字叫做哥爾自畫像這兩張自畫像都在\n", + "Detected language: zh\n", + "倫敦都在倫敦如果去倫敦的朋友在独東博物館一個小的畫廊\n", + "Detected language: zh\n", + "在kem Luska 國王學院裏面的ur patternsKOTORileen KOTOR 藝術中心\n", + "Detected language: zh\n", + "你會看到這張畫或者你到倫敦的國家畫廊也會看到這張畫\n", + "Detected language: zh\n", + "因为它画了两次如果没有去过现场我想你可以翻一下画册找到这两张画\n", + "Detected language: zh\n", + "這兩張畫很明顯你看到他右邊的耳朵整個用紗布包起來就是因為他割了耳朵以後\n", + "Detected language: zh\n", + "剛剛從醫院回到家裡去所以紗布還沒有拿掉傷口蠻厲害的\n", + "Detected language: zh\n", + "所以就從頭上一直到下巴全部用白色的紗布包起來\n", + "Detected language: zh\n", + "然後范古就坐在畫架前面我們知道他哥爾多這個傷還沒有好\n", + "Detected language: zh\n", + "其实都跟这个基因有关所以我们也特别强调说其实精神病的某一种倾向\n", + "Detected language: zh\n", + "他就錯在畫架前面在鏡子裡看自己他就畫了這兩張畫像我覺得最讓我訝異的是\n", + "Detected language: zh\n", + "放谷的自画像从来没有这么平静过所以因此我们大概可以了解到\n", + "Detected language: zh\n", + "割耳朵是她不得已因為割了耳朵她暫時可以解決幻聽的折磨\n", + "Detected language: zh\n", + "耳朵旁邊一直有聲音在折磨她的痛苦\n", + "Detected language: zh\n", + "其中有一張還掉了一個煙斗煙斗上還冒出白白的煙出來然後你注意到這裡的 charcoal 的眼神\n", + "Detected language: zh\n", + "非常的平靜而且充滿了一種喜悅的感覺因為他放鬆了\n", + "Detected language: zh\n", + "我們知道精神病患是心靈上有巨大的折磨與焦慮他割了耳朵後\n", + "Detected language: zh\n", + "这个耳朵上的痛反而转移了他精神上的痛所以他就轻松了\n", + "Detected language: zh\n", + "所以我想,我們為什麽說泛古的自我畫像是一個精神病發病的病歷表\n", + "Detected language: zh\n", + "觀察它是非常特殊的一個瞭解人性的某一種過程我們談到了稳固在1888年12月的這個精神病的爆發\n", + "Detected language: zh\n", + "不见得不好它可能是一种狂热这个狂热如果用的过度的时候它会变成\n", + "Detected language: zh\n", + "那麼他戈爾多這個事情第二天在《阿爾》這個小小的市鎮當中的地方報紙的地方版\n", + "Detected language: zh\n", + "有一个小小的一段消息大概没有什么人注意了就是讲一个荷兰的画家自杀的一个消息\n", + "Detected language: zh\n", + "我們從這個消息大概也可以說他們用到自殺這個字而不是割耳朵\n", + "Detected language: zh\n", + "因為我們剛剛特別提到說范谷其實這個時候不是自殺她只是要去去除掉她耳朵旁邊的那個幻聽的痛苦\n", + "Detected language: zh\n", + "很顯然,當時的媒體的報導也對他的精神病狀況其實是不了解的\n", + "Detected language: zh\n", + "所以我們感覺到汎鼓的寂寞 汎鼓的孤獨汎鼓的痛苦是整個世界\n", + "Detected language: zh\n", + "其實沒有了解它的所以它越來越陷入到一個精神上極度的孤獨當中\n", + "Detected language: zh\n", + "甚至连她最好的朋友像高庚后来就打包了行李就搬走了因为她也不知道怎么面对这个事情\n", + "Detected language: zh\n", + "他也對這個朋友很guilty很多的抱歉可是他沒有辦法解決這個問題所以他就拍了電報給飯鼓的弟弟\n", + "Detected language: zh\n", + "迪奧迪奧就趕來解決這個問題然後就把范古送到了聖蕾米精神病院\n", + "Detected language: zh\n", + "可是如果他用的適度的時候它就是一個特別感人的力量因此也很多人 從這個角度去分析\n", + "Detected language: zh\n", + "我們知道這單其實是不得已因為當時范鼓發病以後\n", + "Detected language: zh\n", + "报纸登了小小的消息虽然没有很多人注意可是汾谷的邻居全部都注意到了\n", + "Detected language: zh\n", + "其實泛谷的鄰居都是阿爾這個地方的一般最低層的低收入農民\n", + "Detected language: zh\n", + "這些農民其實對范古這樣的畫家是沒有辦法了解因為我們讀了一點書\n", + "Detected language: zh\n", + "我們可能還會說畫家在做什麽我們知道每天種田的人看到一個紅頭髮荷蘭人\n", + "Detected language: zh\n", + "然后每天冲进冲出在画画他们其实就觉得这个人是一个怪胎那么又常常难难自语\n", + "Detected language: zh\n", + "那更怪了那麼所以等到他割耳朵他們就等於把所有的怪累積在一起就覺得這個人\n", + "Detected language: zh\n", + "真的是一個瘋子而且看到他被抬出來的時候那耳朵沒有然後流著血\n", + "Detected language: zh\n", + "我想大家可以想象多恐怖所以我特別強調是說我們今天有一點在指責這些鄰居\n", + "Detected language: zh\n", + "就是有眼不识泰山就是说这个是犯古一张画要卖到10亿台币\n", + "Detected language: zh\n", + "例如,米格蘭吉羅爬在屋頂上去畫四年的壁畫\n", + "Detected language: zh\n", + "這些人竟然把他當瘋子他其實是一個天才可是我常常跟朋友開玩笑\n", + "Detected language: zh\n", + "着大楼公寓有一天忽然有个人�anken了耳朵\n", + "Detected language: zh\n", + "然後被抬出來血淋淋我想你也會怕的要死那天晚上你可能把你的房門\n", + "Detected language: zh\n", + "特別加上散稻所其實我覺得這次必須要從人性去理解尤其是當時是一般的農民\n", + "Detected language: zh\n", + "他們沒有受過教育 沒有知識他們對於精神病是什麼 他們也不了解\n", + "Detected language: zh\n", + "他們只有蜂子這個概念所以因此他們就好多鄰居就聯名簽了一封信給警察局\n", + "Detected language: zh\n", + "就說這個人是有暴力傾向的然後他拿了刀子割耳朵血淋淋的\n", + "Detected language: zh\n", + "我们很害怕所以希望你们能够保护我们所以患故等于是被强迫治疗\n", + "Detected language: zh\n", + "送到saint hymé就是我刚刚提到圣雷米这个疗养院\n", + "Detected language: zh\n", + "看到在當時這種療養樂前面oks多加一個粳-聖蕾蜜療養樂\n", + "Detected language: zh\n", + "很多人认为米克朗基罗一定也有躁痒病的倾向因为我们一般人没有这样大的passion\n", + "Detected language: zh\n", + "大家就可以了解到因为当时的所有这种医院大概都是教会的\n", + "Detected language: zh\n", + "其实这个修道院可是修道院对于大家不要的人比如说精神病患\n", + "Detected language: zh\n", + "瘋子!麻瘋病人!大家看到就害怕的这些人\n", + "Detected language: zh\n", + "修道院會有一種不忍 因為它們是宗教家它們有一種從神那邊得到的\n", + "Detected language: zh\n", + "一種善良跟慈悲所以他們會接納這種人可是我們不要誤會\n", + "Detected language: zh\n", + "說聖雷米療養院就可以治療精神病因為在當時根本沒有這個學課\n", + "Detected language: zh\n", + "就是医疗学上没有这个学科所以他也不晓得怎么治疗所以唯一治疗的方法是什么\n", + "Detected language: zh\n", + "可能就是關著吧就把它關起來那麼甚至我們知道比如說在大概20年前\n", + "Detected language: zh\n", + "把台灣的又所謂的精神病人然後被送到某一個地方去\n", + "Detected language: zh\n", + "然後受到很多的折磨就用鐵鏈捆綁起來每天用冷水澆他每天\n", + "Detected language: zh\n", + "甚至,也很多人向西方的精神现代医疗学都特别解释\n", + "Detected language: zh\n", + "後來就認為很不人道但是 我知道的那個訊息我當時帶了很多學生去做采訪\n", + "Detected language: zh\n", + "我们的了解是说,其实当时送这些病人去的都是他们的亲人。\n", + "Detected language: zh\n", + "因為親人沒有辦法治療這些人他不知道怎麼辦所以他送到這些地方去\n", + "Detected language: zh\n", + "他也知道這些地方不好會虐待這些病人根本不是一個治療的醫院可是他們沒有辦法\n", + "Detected language: zh\n", + "因為家裡每個人都要上班的時候他們不知道怎麼樣去面對這個精神病患\n", + "Detected language: zh\n", + "因為精神病患在家裡可能會放火可能會傷害孩子所以他們就只好把他送到那個所謂的什麼什麼堂那種廟裡去\n", + "Detected language: zh\n", + "那么其实我们看到那个消息报道出来之后你非常无奈因为当你没有一个科学的方法\n", + "Detected language: zh\n", + "去做很好的治疗的時候民間反而就是用這種最傳統最原始也其實最殘酷\n", + "Detected language: zh\n", + "最恐怖的方法 在面對病人我去了聖雷米療養院走進去的時候\n", + "Detected language: zh\n", + "你其實覺得很大的感觸因為你看到當年關范谷的那球法\n", + "Detected language: zh\n", + "比如說在宗教裡的某一種狂熱其實是一種要燃燒的那種渴望\n", + "Detected language: zh\n", + "現在還保留著小小的一個房子里面一張單人床然後一個很厚的木頭的門\n", + "Detected language: zh\n", + "門上有一個小床子每天送食物給他的然後上面有一個很大的鎖\n", + "Detected language: zh\n", + "那个锁上面都已经生锈了那这就是当年关范谷的房间它从1888年的12月1月\n", + "Detected language: zh\n", + "就住到精神病院那麼一直到1890年的2月大概才離開\n", + "Detected language: zh\n", + "所以大概有一年的时间他是在圣雷米的精神病院接受所谓的治疗而这个治疗也就是\n", + "Detected language: zh\n", + "把它当犯人一样锁在里面它没有行动的自由那么这个时候有医生治疗他\n", + "Detected language: zh\n", + "可能跟他講講話可是一籌莫展因為沒有辦法判斷他的問題\n", + "Detected language: zh\n", + "那麼中間其實也有畫家去看他有一些畫家很關心他\n", + "Detected language: zh\n", + "像貝納 貝納 很好地壹個畫家飯鼓很好地朋友佢哋覺得飯鼓冇發病\n", + "Detected language: zh\n", + "他們覺得它只是過度的狂熱那麼狂熱不應該叫病\n", + "Detected language: zh\n", + "這裡是IC之音,FM97.5您現在所收聽的是美得沉思\n", + "Detected language: zh\n", + "那範古很明顯範古一直要做牧師他是因為他宗教的狂熱一直要燃燒他自己\n", + "Detected language: zh\n", + "所以他们又把范古带出来了带回家 带到了他的那个\n", + "Detected language: zh\n", + "黃色房屋在二讓他畫畫可他沒有多久發現飯穀又不行了\n", + "Detected language: zh\n", + "就把所有的那個顏料放到湯裡面去煮所以他們嚇死了 又把她送回到聖黎明\n", + "Detected language: zh\n", + "醫療院其實我們讀那段傳記的時候有點覺得荒謬 因為所有的朋友\n", + "Detected language: zh\n", + "這個都有一種為難我想有點像我們自己在碰到親人的這種問題\n", + "Detected language: zh\n", + "你到底怎么办因为你送到一個地方把他关在那边你又觉得不忍心可弄回家里\n", + "Detected language: zh\n", + "可能又會惹得整個家裏面一塌糊塗各種問題都要發生所以我想這個時候\n", + "Detected language: zh\n", + "販股還是要自己扮演它自己的一生所謂自己扮演\n", + "Detected language: zh\n", + "自己的醫生是說沒有人可以治療他他關在那個小小的房間的時候他面對著一個窗口\n", + "Detected language: zh\n", + "他開始畫畫了他畫黎明他畫日正當中他畫黃昏\n", + "Detected language: zh\n", + "它渴望把自己燒到一個最極限的狀態而把燃燒的光和熱帶給一些窮困的人\n", + "Detected language: zh\n", + "他畫黃昏以後所有有人都睡著以後的滿天地反省畫出了范古一生最偉大的作品\n", + "Detected language: zh\n", + "就是在這個房間畫的大概一年的時間創作了非常驚人的梵谷\n", + "Detected language: zh\n", + "伟大的作品我们谈到了1890年范古在这个之前\n", + "Detected language: zh\n", + "在盛蕾米的修道院治疗了一年我特别提到这一年的画作\n", + "Detected language: zh\n", + "大概是范古最精彩的画作我也跟很多朋友提到过\n", + "Detected language: zh\n", + "我去過這個現場然後現在因為關過販股所以這個小小的囚房\n", + "Detected language: zh\n", + "這個精神病的官風刺的房子變成了古蹟\n", + "Detected language: zh\n", + "會變成了民勝所以我覺得很荒謬那麼這個\n", + "Detected language: zh\n", + "讓泛谷在這裡受了最大的痛苦的這個房間在全世界的觀光客都去看\n", + "Detected language: zh\n", + "那当我们在那个房间里浏览的时候,我们到底感受了什么?我们觉得只是一个讽刺吗?\n", + "Detected language: zh\n", + "因此我們非常難解讀所謂的精神病這件事情\n", + "Detected language: zh\n", + "還是一個天才她在這個房間畫出了最偉大的話可是她當時被對待的角色\n", + "Detected language: zh\n", + "當然是一個封子如果不是封子這個房間的門上不會掛著那麼大一把鎖\n", + "Detected language: zh\n", + "那個索很顯然是防範她逃走的認為她有逃走的傾向認為她有暴力的傾向\n", + "Detected language: zh\n", + "所以范古是24小时关在这个小房间的比如说我在一个录音间里看到这样小小一个房间\n", + "Detected language: zh\n", + "看看范固的房间就是这样大小如果我是一个24小时不能够出去的人\n", + "Detected language: zh\n", + "這一年我會在這裡做什麼我想大部分的精神病人其實關在那樣的房間\n", + "Detected language: zh\n", + "不多久所有的身体都生病我们知道不能够行动 不能够自由\n", + "Detected language: zh\n", + "所有的渴望夢想被壓抑其實是身體變壞的最大原因\n", + "Detected language: zh\n", + "所以我们也觉得这种传统的对待精神病患的方式其实非常的残酷所以我们读到的所有的资料\n", + "Detected language: zh\n", + "到圣雷米的精神病院當中的病人其實很快就離開人間了因為他們的身體很快就變壞\n", + "Detected language: zh\n", + "藉著范古的介紹其實我很希望很多的朋友能夠瞭解對人的某一種關心\n", + "Detected language: zh\n", + "可是泛顧,毕竟有一個強烈的意志力他要去對抗自己身體上的某一種折磨\n", + "Detected language: zh\n", + "所以這個時候他還在畫畫能夠治療他的最偉大的藥竟然是繪畫是藝術的創作\n", + "Detected language: zh\n", + "它面對著一張一張空白的畫布面對著它的窗口它把窗口看到的所有的風景\n", + "Detected language: zh\n", + "畫成一張一張精彩的繪畫那我也特別希望如果有朋友將來有機會旅遊到聖雷米\n", + "Detected language: zh\n", + "在这个精神病院的窗口坐一坐面对着窗口你会觉得很特别的感觉\n", + "Detected language: zh\n", + "因为我跟朋友提到说我自己的家有十二扇窗可是我很少坐在窗口前看外面的风景\n", + "Detected language: zh\n", + "有时候也坐着,因为外面是条河很漂亮可不会像饭股24小时,坐在那边看风景\n", + "Detected language: zh\n", + "可是范国的房间那麼小他只有一扇窗而他不能出去所以我们就会发现\n", + "Detected language: zh\n", + "那一扇窗變成一個它唯一跟外面世界溝通的一個管道\n", + "Detected language: zh\n", + "所以因此我會覺得那個窗戶真正變成了一扇心靈的窗戶\n", + "Detected language: zh\n", + "在上個單元也提到,現代最先進的精神醫療學都認為\n", + "Detected language: zh\n", + "如果我們是一個囚犯我們在一個四面都是牆壁的房間\n", + "Detected language: zh\n", + "牆壁上只有一個小小的窗我相信我們會整天爬在那個窗口看外面\n", + "Detected language: zh\n", + "因為外面的光 外面的風景外面所有的人走過的感覺\n", + "Detected language: zh\n", + "對他都是生命的渴望我不知道我們能不能講的清楚因為我們沒有這種被囚禁的經驗\n", + "Detected language: zh\n", + "當你被囚禁之後被壓抑之後你才知道自由多麼可貴\n", + "Detected language: zh\n", + "所以这个时候我就会拿着范古的画册坐在那个窗口看\n", + "Detected language: zh\n", + "我发现外面有一个小小的丘陵一些岩石构成的小山\n", + "Detected language: zh\n", + "小山的前方是一大片的麦田金黄色的麦田\n", + "Detected language: zh\n", + "在這一年當中這個麥田從播種到萌芽\n", + "Detected language: zh\n", + "到成長,到結碎,一堆一堆的賣碎結碎,賁股全部劃出來\n", + "Detected language: zh\n", + "精神病其實並沒有一個很清楚的界限也就是說發病跟不發病\n", + "Detected language: zh\n", + "這是1年可是每一天從黎明第一道的光照在遠遠的麥田當中\n", + "Detected language: zh\n", + "它就開始在滑然後有雲流過來那個雲在天空慢慢的旋轉\n", + "Detected language: zh\n", + "他就在畫那堆白雲我們平常畫畫的時候後面都有時間的概念譬如說我在畫畫的時候\n", + "Detected language: zh\n", + "我再想說 等一下幾點鐘有朋友來找我所以我的畫畫一定有結束我覺得飯鼓這一年\n", + "Detected language: zh\n", + "他畫畫的時候後面沒有結束因為他永遠不能出去所以對他來講畫畫這件事是永遠\n", + "Detected language: zh\n", + "看風景是永遠所以他就一直看著那片雲我不知道我們有一個時間\n", + "Detected language: zh\n", + "沒有結束的去看那一片雲我們會看到多麼美麗的雲我們平常看到的雲\n", + "Detected language: zh\n", + "我們都不覺得美麗可是范古看到雲他從來沒有看到雲可以這樣舒展\n", + "Detected language: zh\n", + "這樣子收放自如那個雲向一個過來安慰祂的\n", + "Detected language: zh\n", + "我的一只手 裡面充滿了人的溫暖的感覺我試圖 在我寫《飯古》的時候\n", + "Detected language: zh\n", + "我們叫他病人或者是病患其實我們特別要注意到我們自己身上都有這些基因的\n", + "Detected language: zh\n", + "在話策裡把這一年裡面在這個窗口畫的幾張畫連起來\n", + "Detected language: zh\n", + "你就會發現他從黎明畫到日正當中畫到黃昏的那個過程\n", + "Detected language: zh\n", + "其實風景沒有變還是小山還是麥田還是那一顆孤獨的\n", + "Detected language: zh\n", + "可是變的是什麼 變的是光線從黎明的光慢慢慢慢亮起來\n", + "Detected language: zh\n", + "日正當中的光他看到有農民在農田裏面收割他畫了那個麥田的收割\n", + "Detected language: zh\n", + "他也画过光秃秃的收割以后的麦田黄昏的时候整个落日的美\n", + "Detected language: zh\n", + "然後落日下去了整個天空完全變成暗藍色地中海的夜晚\n", + "Detected language: zh\n", + "那个天空是非常非常蓝的然后一颗一颗的星开始亮起来像点灯一样的亮起来\n", + "Detected language: zh\n", + "然後它可以觀察到每一顆心從什麼位置移到什麼位置好 我現在講這些部分\n", + "Detected language: zh\n", + "我想很少有朋友會感覺到說我們今天沒有時間坐在一個天空前面\n", + "Detected language: zh\n", + "就是一个人完全没有狂喜的部分比如说这个人不管怎么样他都不会害起来\n", + "Detected language: zh\n", + "去看一顆星怎麼移動比如說北斗七星它在不同的季節不同的時間\n", + "Detected language: zh\n", + "它會有方向在轉變的比如說北斗七星的那三顆星\n", + "Detected language: zh\n", + "斗勺的部分跟斗的部分它会在转动的如果我们有很长时间\n", + "Detected language: zh\n", + "無所事事的去觀察心我們會發現心一顆一顆亮起來他有一個他的循環的秩序\n", + "Detected language: zh\n", + "好這個時候看到范古畫出他最偉大的一張畫Starry Night所謂的星夜\n", + "Detected language: zh\n", + "她畫了最美的星夜所有的人在這張畫前面幾乎都熱淚盈眶\n", + "Detected language: zh\n", + "留着眼泪看这张画因为我们看到了一个最孤独最寂寞的一个在囚房里面的人\n", + "Detected language: zh\n", + "最後想要跟整個宇宙講話時候的熱情他把那個感覺畫出來了\n", + "Detected language: zh\n", + "如果大家聽《 darling mclean 》唱的 starring那個有名的一首美國的流行歌\n", + "Detected language: zh\n", + "你就可以看到他是为了这张画所写出来的一首伟大的作品\n", + "Detected language: zh\n", + "沒有熱情我想這個人你可以想像他可能是另外一種病我們都會有一種狂喜狂熱\n", + "Detected language: zh\n", + "我们对于社会我们看到一个不公平的事情我们会觉得大声疾呼\n", + "Detected language: zh\n", + "我是蔣旭我們介紹范谷已經到了她生命最後的一兩年了\n", + "Detected language: zh\n", + "想要去幫助這個社會其實梵谷是這樣的人我們也有這個部分我們也有這樣的熱情\n", + "Detected language: zh\n", + "我們也有對受苦的不忍可是范谷現在發病了發病的原因是因為他這個不忍\n", + "Detected language: zh\n", + "它這個狂熱的燃燒忽然變成有一點克制不住了好像它要單復宇宙之間\n", + "Detected language: zh\n", + "最大的苦難要去為人類做最偉大的事情了所以因此我們很難找到\n", + "Detected language: zh\n", + "所謂的聖人跟發病者之間的界線我想這樣講\n", + "Detected language: zh\n", + "其實我自己對這樣的語言是非常謹慎的因為我們說一個人可能為了宗教的巨大的狂熱\n", + "Detected language: zh\n", + "為很多人去做犧牲跟一個我們看到在精神病方面的\n", + "Detected language: zh\n", + "那個狂熱的燃燒,它的差異是什麼?譬如說在天主教\n", + "Detected language: zh\n", + "歷史當中有一個聖泰瑞莎這個17世紀在西班牙的一個\n", + "Detected language: zh\n", + "天主叫梵蒂岡封為聖女的這個人物是因為祂常常說\n", + "Detected language: zh\n", + "那麼在前面的單元裡我們提到1888年,是半股一個重要的轉折\n", + "Detected language: zh\n", + "然後他會忽然在他眼前出現一片的聖光然後耶穌在他的面前出現\n", + "Detected language: zh\n", + "然後她覺得有一個金色的箭刺穿她的心臟然後她全身在燃燒\n", + "Detected language: zh\n", + "因為這個東西被稱為是一個奇蹟就是所謂的宗教世界裡面的險勝的一個狀況\n", + "Detected language: zh\n", + "所以梵蒂岡的教皇后来就封他为圣三可是现在的精神病学上\n", + "Detected language: zh\n", + "常常認為S içerisa在某一個部分可能類似飯穀的病\n", + "Detected language: zh\n", + "就是他會有一種異常的景象會出現比如說很多人都認為范古在1888年的12月\n", + "Detected language: zh\n", + "年底的時候他拿了剃刀 把自己的耳朵割掉現在的醫療學士 他當時有幻聽的這個病症出現\n", + "Detected language: zh\n", + "就是因為他的躁鬱病太嚴重的時候他會一直覺得耳朵旁邊有人在跟他講話\n", + "Detected language: zh\n", + "我不知道大家能不能理解我的意思我們現在發現在1888年的12月泛股發病了\n", + "Detected language: zh\n", + "是因為幻聽就她耳朵旁邊一直有人在跟她講話可是如果這個人認為講話的人是天上的上帝呢?\n", + "Detected language: zh\n", + "他1888年的2月到了阿爾期待他最好的朋友高歌\n", + "Detected language: zh\n", + "那他會不會被封剩所以因此我的意思說現在很多人在精神醫療學的領域當中\n", + "Detected language: zh\n", + "會發現其實人是一個非常複雜的構成體我們看到使得人性走到最偉大\n", + "Detected language: zh\n", + "最光辉的那個力量跟使得一個人走到發病的那個力量它原來的那個基因可能是一樣的東西\n", + "Detected language: zh\n", + "就是一個燃燒自我的渴望那燃燒自我的渴望可以變成耶穌\n", + "Detected language: zh\n", + "可以變成葉飛 可以變成文天祥可以變成范古可是也可以變成我們說\n", + "Detected language: zh\n", + "它可能變成一種發病比如說我們今天看到一個社會裡面可能對一個不公平的事情大聲疾呼的人\n", + "Detected language: zh\n", + "到了有點過頭的時候我不知道大家有沒有印象有時候我們會說這個同時真的有點發瘋了\n", + "Detected language: zh\n", + "他是一个疯子比如说在选举的时候觉得对他支持的人特别的狂热的时候\n", + "Detected language: zh\n", + "大家說他簡直是個瘋子可是我也要講的是說他也許不是瘋子也許是他因為正義感特別強\n", + "Detected language: zh\n", + "所以其实我们很难糞我在自己整理饭股的撰稿过程当中特别让我对人性有一种小心跟一种谨慎\n", + "Detected language: zh\n", + "能够来跟他一起居住一起画画那高庚到阿尔是1888年的10月\n", + "Detected language: zh\n", + "就是我們不應該隨便對人去下一種判斷說這個人是不是精神病患\n", + "Detected language: zh\n", + "我們相反的應該知道所有的精神病者他所帶的焦慮\n", + "Detected language: zh\n", + "可妄 狂洗其实跟我们是一样的所以因为透过了饭股\n", + "Detected language: zh\n", + "我們感動到它燃燒自己要為他人受苦去救贖的那個力量所以因此 我們才會謹慎的說\n", + "Detected language: zh\n", + "說我們不再隨便地認為別人是瘋子或者是精神病患而對他們有很多的小心\n", + "Detected language: zh\n", + "很多的單代甚至某一種關心出來我們在今天這個單元\n", + "Detected language: zh\n", + "要弹到很多饭骨尤其在他戈尔多前后发病的状态\n", + "Detected language: zh\n", + "他是因為這個後來被強迫治療就關到精神病院去所以我們會集中在1888年的12月到\n", + "Detected language: zh\n", + "他1890年7月自殺這一段時間他大概都在接受精神治療\n", + "Detected language: zh\n", + "我們身邊現在也常常會有一些朋友多多少少受到精神上的困擾甚至我們自己也可能有精神上的困擾\n", + "Detected language: zh\n", + "那麼1888年的10月之後范谷的精神焦慮的狀況\n", + "Detected language: zh\n", + "我覺得藉著飯古也許我們可以有很多比較不同角度的切入\n", + "Detected language: zh\n", + "而能夠對這樣的一個領域做更深刻的理解我們談到1888年的12月\n", + "Detected language: zh\n", + "飯谷精神病爆發割了耳朵那麼這個事件我們在前面的單位有提過\n", + "Detected language: zh\n", + "是跟高庚有關的因為高庚10月到了阿爾跟范谷住在一起\n", + "Detected language: zh\n", + "可是兩個人共同居住在生活上有很多的摩擦而這些摩擦可能是觸發\n", + "Detected language: zh\n", + "泛谷的精神病爆发的一些重要的原因因为我们知道精神病这个基因\n", + "Detected language: zh\n", + "本來就存在在身體裏可他自己一個人獨處的時候也許他還有機會去擺平\n", + "Detected language: zh\n", + "比如说我们知道这段时期范古一直在画刺画像她在画刺画像的同时\n", + "Detected language: zh\n", + "其實也是某一種程度的治療可是高庚來了高庚來的時候把他帶到了一種精神的狂喜的巔峰\n", + "Detected language: zh\n", + "他高興的不得了他覺得高更來以後他所有的恐慌焦慮都會消失\n", + "Detected language: zh\n", + "很明显的越来越严重\n", + "Detected language: zh\n", + "可是他沒有想到在狂喜的巔峰這個人是最危險的因為他摔下來\n", + "Detected language: zh\n", + "可能是一个巨大的幻灭所以我们通常会发现这个朋友精神的状况\n", + "Detected language: zh\n", + "最危機的時刻 可能並不是他長期的某種沮喪有的時候反而是他過害\n", + "Detected language: zh\n", + "那个狂袭到了有点控制不住的时候你特别要小心因为他接下来会是一个巨大的幻灭\n", + "Detected language: zh\n", + "我們看到梵谷很明顯就是當他達到狂襲的巔峰的時候那個落差太大\n", + "Detected language: zh\n", + "他幾乎是從天堂一下子直接墜到地獄去他一下受不了因為那個時候\n", + "Detected language: zh\n", + "短短的两三个月的居住生活他跟高更住在一起每天每天争吵\n", + "Detected language: zh\n", + "而那個爭吵裏面它最後trapped它最後幾乎找不到自己一個容納自己的空間所有的生活都被告 Falco所有的生活都被告\n", + "Detected language: zh\n", + "所纠缠或者干扰所以高耕后来也很痛苦高耕就几乎不敢回家\n", + "Detected language: zh\n", + "每天就在外面逛来逛去所以到12月24号圣诞夜的晚上\n", + "Detected language: zh\n", + "會從各個角度來解讀飯堀的精神病迷越來越嚴重\n", + "Detected language: zh\n", + "我们觉得在西方的基督教里面有这么大的象征意义的这个夜晚所有人都在唱着平安夜的夜晚\n", + "Detected language: zh\n", + "而這個時候高庚不敢回家高庚在寒冷的夜晚裏面到處四處遊蕩\n", + "Detected language: zh\n", + "而最后发现范古跟在他后面高根是一个好朋友\n", + "Detected language: zh\n", + "也许应该去温暖这个朋友也许应该去听听他讲他究竟有什么问题\n", + "Detected language: zh\n", + "有什么样的心事可是我们知道人很脆弱人在这种时候我们自己有时候\n", + "Detected language: zh\n", + "身边有这样的朋友我们会躲起来我们会害怕因为我们不晓得怎么去面对这个朋友\n", + "Detected language: zh\n", + "所以高庚當時就躲起來了就找了一個旅館住在旅館根本不敢回家\n", + "Detected language: zh\n", + "而那天晚上剛好就是范古自己把耳朵割掉的發病的一個最重要的關鍵\n", + "Detected language: zh\n", + "所以很多人后来会怪罪高庚认为高庚没有帮助这个朋友可是我也常常会跟朋友\n", + "Detected language: zh\n", + "檢討說我們自己在面對很多精神病患的朋友的時候我們可能不見得比高跟好的哪裡去\n", + ">>>> 09-13\n", + "Detected language: zh\n", + "以及他所處理的幾張重要的自畫像那麼他在1888年的10月初\n", + "Detected language: zh\n", + "他不曉得梵谷要幹什麼因為 我想高根已經發現了梵谷精神的異常狀態\n", + "Detected language: zh\n", + "就是他在爭吵的時候他的咆哮他的那種尖銳的言辭\n", + "Detected language: zh\n", + "或者她眼睛裡面流露出來的某一種很可怕的無法控制的情緒我想高跟已經\n", + "Detected language: zh\n", + "意識到這個朋友有點要發瘋了就是精神病要爆發所以高根就很害怕說\n", + "Detected language: zh\n", + "范谷一直跟在它后面同时它又不断地回头就发现范谷的手上\n", + "Detected language: zh\n", + "拿着一把剃刀那么所以当时他的理解是梵谷可能对他\n", + "Detected language: zh\n", + "有暴力的傾向哪里把剃刀可能要殺它或者要割傷它\n", + "Detected language: zh\n", + "要侵害他所以他就非常地害怕趕快就跑跑跑最後就跑到一個旅館裡面\n", + "Detected language: zh\n", + "住在旅館不敢回家了就等於是擺脫了飯肚那麼第二天早上\n", + "Detected language: zh\n", + "我們看到警察在旅館找到高庚然後告訴她說你的朋友自殺了\n", + "Detected language: zh\n", + "終於等到了高耕來到阿爾那麼我們可以說他的夢想完成了\n", + "Detected language: zh\n", + "所以他就匆匆忙忙赶回他们两个人共同居住的这个叫做\n", + "Detected language: zh\n", + "黃色房屋的地方然後打開門發現飯股倒臥在雪魄中\n", + "Detected language: zh\n", + "那旁邊丟著這一把剃刀他才發現梵谷原來\n", + "Detected language: zh\n", + "拿着踢刀不是要伤害他 是要伤害自己也许范古当时很渴望\n", + "Detected language: zh\n", + "一個她覺得最瞭解她的朋友高綱能夠在這個時候跟她講兩句比較溫暖的話\n", + "Detected language: zh\n", + "或者安慰他支持他也許他會避免這個自嗆的這個行動\n", + "Detected language: zh\n", + "那事實上,藩鼓並不是自殺,而是把自己的右邊耳朵割掉了\n", + "Detected language: zh\n", + "当然这个事情在小镇当中就传开了\n", + "Detected language: zh\n", + "張也非常害怕立刻拍了電報給飯古的親人就是他的弟弟迪奧\n", + "Detected language: zh\n", + "打了個電報到巴黎告訴迪奧說 你的哥哥那發生了這樣的事件\n", + "Detected language: zh\n", + "可是通常我们看到一个人在梦想完成的时候他的精神状况\n", + "Detected language: zh\n", + "那你要不要来处理高根自己就打包了行李就跑掉了就离开了梵谷\n", + "Detected language: zh\n", + "那麼所以這個事件爆發是在1888年的12月25號\n", + "Detected language: zh\n", + "没有几天就已经是到1890年的新年了所以我们看到1890年以后\n", + "Detected language: zh\n", + "大概一月的時候,范谷從醫院離開,頭上還抱著紗布\n", + "Detected language: zh\n", + "那麼他就回到家裡一個短暫的時間那麼這個時候他在鏡子裡就看自己\n", + "Detected language: zh\n", + "然後就戴了一頂帽子穿了一個綠色的外套然後就畫了兩張\n", + "Detected language: zh\n", + "这一个时期的自划像就是1890年的自划像\n", + "Detected language: zh\n", + "那麼這1890年的之畫像現在都藏在倫敦如果大家有機會看到的話\n", + "Detected language: zh\n", + "你會覺得非常特殊因為我們前面講過很多梵谷的字滑項\n", + "Detected language: zh\n", + "我的自話向一般講起來都是在發病的時候的那種焦慮、不安\n", + "Detected language: zh\n", + "也可能 急速掉到一個 最低潮的狀況最泛谷的個案\n", + "Detected language: zh\n", + "教育的眼神非常明显只有这个哥尔多的这个字化...\n", + "Detected language: zh\n", + "非常特殊如果你仔細看他的眼神他反而是非常安靜的而且其中有一張\n", + "Detected language: zh\n", + "好像是叼了一個煙斗然後煙斗還冒出煙來那有一種好像在鏡子裡看自己\n", + "Detected language: zh\n", + "有點很幽默地嘲笑自己調侃自己的感覺所以在他22章的自畫下\n", + "Detected language: zh\n", + "這是唯一最平靜的一張因為今天的精神醫療界也認為\n", + "Detected language: zh\n", + "是因為他耳朵裡面有幻聽的現像就是精神病的病人有時候\n", + "Detected language: zh\n", + "在耳朵旁邊有人在跟他講話那個講話的聲音讓她沒有辦法睡覺\n", + "Detected language: zh\n", + "一直在 干扰他 干扰他最后他把耳朵割掉说 肉体的痛结果反而把那个\n", + "Detected language: zh\n", + "像魔鬼一樣折磨他的那個聲音趕走所以這段時期是它最平靜的\n", + "Detected language: zh\n", + "所以非常奇怪,我們都以為他割耳朵是一個很痛苦的事\n", + "Detected language: zh\n", + "有的時候也提醒我們是不是我們自己的狂熱、慷憤,在極度夢想裡面的一種渴望。\n", + "Detected language: zh\n", + "有一段時間,它反而得到了平常沒有得到的寧靜。我們談到了1890年,\n", + "Detected language: zh\n", + "一月的范古范古的生命已經到了最後他在1890年的7月27號自殺\n", + "Detected language: zh\n", + "29號去世所以它只剩下了半年的生命可是我們看到\n", + "Detected language: zh\n", + "直到在1890年的時候梵谷經過一整年的精神治療\n", + "Detected language: zh\n", + "因為在1889年1月以後他的精神病爆發當時所有的鄰居\n", + "Detected language: zh\n", + "就簽了一個联名的控訴信要求警方\n", + "Detected language: zh\n", + "至安單位能夠處理犯蠱的暴力傾向的問題\n", + "Detected language: zh\n", + "所以他就被关在圣蕾米金神殡院,一个小小的房间\n", + "Detected language: zh\n", + "還能捍衛病人在當中他就每天不能出去每天面對著一個小小的窗口\n", + "Detected language: zh\n", + "而那个窗口让他可以看到外面的风景这个风景由山脉的起伏\n", + "Detected language: zh\n", + "會使自己一直拉高情緒到一個最高潮\n", + "Detected language: zh\n", + "这个风景里面会有麦浪在翻飞这个风景里面会有\n", + "Detected language: zh\n", + "有天上的雲快在流動甚至他自日出看到日正當中\n", + "Detected language: zh\n", + "一直看到日落最後一直到晚上整個村落的人都睡著了\n", + "Detected language: zh\n", + "可是泛谷是睡不着的她被精神病的折磨折磨到长期失眠\n", + "Detected language: zh\n", + "那麼最後她就看到滿天的繁星這個時候她覺得天空的每一顆星\n", + "Detected language: zh\n", + "都在跟他對話好像變成他窗前最能夠安慰他\n", + "Detected language: zh\n", + "最能够安慰他的力量所以他就画出了最美丽的画作\n", + "Detected language: zh\n", + "星光之夜\n", + "Detected language: zh\n", + "我想是感動了許許多多人的一張畫\n", + "Detected language: zh\n", + "他從戈爾多之後就進入了精神病院\n", + "Detected language: zh\n", + "可是我们也要谨慎地处理当心在这个高潮的时刻\n", + "Detected language: zh\n", + "所以一直在一個治療的期間用匯劃\n", + "Detected language: zh\n", + "來度過最困難的這個時刻事實上\n", + "Detected language: zh\n", + "我想很多朋友都知道在那個年代1889-1890的時候\n", + "Detected language: zh\n", + "其实根本没有我们今天的所谓的精神医疗学因为大家对于精神病的领域\n", + "Detected language: zh\n", + "所以可能医生也只是把他关在那边也不晓得怎么处理\n", + "Detected language: zh\n", + "也沒有一定可以治療的藥物也沒有可以治療的方法所以犯故等於..\n", + "Detected language: zh\n", + "是自己在治疗自己那治疗自己的方法其实就是创作它在长期的创作当中\n", + "Detected language: zh\n", + "得到了非常驚人的一種情緒上的抒情\n", + "Detected language: zh\n", + "所以世界的精神医疗会议常常为了这一年的贩户\n", + "Detected language: zh\n", + "开了很多会议讨论他的画作我们知道这一年当中他画了将近两千张画\n", + "Detected language: zh\n", + "這個可能立刻掉落下來就會陷落住一種精神的憂鬱狀態\n", + "Detected language: zh\n", + "這是一般人不太可能達到的數目。我們可以講說\n", + "Detected language: zh\n", + "一年不過三百多天那他一天可能要畫三張畫四張畫\n", + "Detected language: zh\n", + "入到五章話才能構成所謂的2000,這樣的一年的數字。\n", + "Detected language: zh\n", + "因此在這段時期 我們看看他的畫作達到了一個驚人的創作\n", + "Detected language: zh\n", + "能量而且每一张画都非常非常的精彩我们也看到这个时候的\n", + "Detected language: zh\n", + "几乎完全不管所谓的学院里面画派的纪法油画对他来讲\n", + "Detected language: zh\n", + "只是一個表現的工具而已它可以把濃厚的顏料大量的堆疊在畫簿上\n", + "Detected language: zh\n", + "構成像雕塑一樣的質感讓色彩非常的艷麗、非常的強烈\n", + "Detected language: zh\n", + "因此大概我們站在他這段時期的化作前面\n", + "Detected language: zh\n", + "我們都深不由己會被他的畫作裏面那種強烈的情緒所感染\n", + "Detected language: zh\n", + "所以大概在10月的時候因為高更到了阿爾跟范古住在一起\n", + "Detected language: zh\n", + "甚至會熱淚盈眶所以我們看到他最典型的這一段時期的\n", + "Detected language: zh\n", + "就曾經讓美國很有名的歌手\n", + "Detected language: zh\n", + "throne mc lynn 写了很有名的这首歌然后在整个大众当中流传\n", + "Detected language: zh\n", + "幾乎每一個人到紐約的現代美術館看到那張畫都會得到最大的震撼\n", + "Detected language: zh\n", + "所以这是一个受苦的心灵这是一个受折磨的心灵\n", + "Detected language: zh\n", + "這是一個自己在嘗試要治療自己的心靈可是他是一個\n", + "Detected language: zh\n", + "绝对孤独的心灵因为这个时候他在一个小小的精神病的牢房当中\n", + "Detected language: zh\n", + "门上有一个很大的锁他走不出去他唯一跟外面世界同事们说\n", + "Detected language: zh\n", + "溝通的管道只有牆上那一扇小小的窗它每天看著\n", + "Detected language: zh\n", + "在窗外的風景畫出一張一張精彩的繪畫\n", + "Detected language: zh\n", + "兩個人共同的生活中間發生了巨大的摩擦其實我們也看到\n", + "Detected language: zh\n", + "最後一年也許會給我們很多巨大的感動\n", + "Detected language: zh\n", + "感觸就是我們覺得一個封子能夠畫出這麼一張畫面\n", + "Detected language: zh\n", + "或者在現實生活當中我們常常覺得這個人是一個瘋子\n", + "Detected language: zh\n", + "我們就把他的生命看到一文不值。可是,範谷也許改寫了我們對於\n", + "Detected language: zh\n", + "與人類精神病領域的一個不同的角度的看法我們會發現\n", + "Detected language: zh\n", + "证明这个人是精神病患可是他反而在生命里面创作出正常人\n", + "Detected language: zh\n", + "人都创作不出来的精彩的作品所以因此也许我们对人性会有不同的\n", + "Detected language: zh\n", + "寬容不同的角度去包容這件事情在這一年當中\n", + "Detected language: zh\n", + "我特别要提到说其实范古虽然住在所谓的精神病院\n", + "Detected language: zh\n", + "可是它等于是没有人在照顾它因为少部分的几个医生\n", + "Detected language: zh\n", + "這裡是IC之音 FM97.5您現在所收聽的是美德城斯\n", + "Detected language: zh\n", + "包括高跟、返古可能都没有与他人相处的真正的经验\n", + "Detected language: zh\n", + "大概也束手无策对他的世界也都不了解那么当时会去看他的朋友\n", + "Detected language: zh\n", + "他有也少知又少因為他的鄰居大概都覺得他是瘋子那跟我們一樣\n", + "Detected language: zh\n", + "如果我们觉得有一个人是疯子我们大概就必知为恐不及根本就不敢去碰他那当时去看她\n", + "Detected language: zh\n", + "反而是他認識過的郵差跟他的太太一對很平凡的\n", + "Detected language: zh\n", + "負負負 雖然很溫暖 有時帶一點菜又或是水果看犯蠱給予他一點\n", + "Detected language: zh\n", + "另外有一位畫家叫貝娜他們非常喜歡範谷的畫\n", + "Detected language: zh\n", + "所以他也曾經從巴黎到聖蕾蜜來探視范谷\n", + "Detected language: zh\n", + "那她覺得范古這麼久了關在一個小小的病房裏面非常地可憐\n", + "Detected language: zh\n", + "所以当时就写信给范古的弟弟建议他说是不是把他牵到巴黎去\n", + "Detected language: zh\n", + "離巴黎近一點至少讓朋友有機會可以看它\n", + "Detected language: zh\n", + "他們也許在一個幻想的處境當中認為跟一個最要好的朋友\n", + "Detected language: zh\n", + "他也可以过得比较舒服一点所以我们就看到贩股的最后的半年\n", + "Detected language: zh\n", + "是到了巴黎北边的一个地方叫Eau deve然后它在那个地方\n", + "Detected language: zh\n", + "治疗了半年之後還是自殺生亡\n", + "Detected language: zh\n", + "這個介紹當中到了最後一個段落在1890年的時候\n", + "Detected language: zh\n", + "以后我们看到大概2月范古接到她弟弟跟弟媳妇的一封信\n", + "Detected language: zh\n", + "再跟你說Fan Gu說Fan Gu最愛的這個弟弟\n", + "Detected language: zh\n", + "他太太怀孕了然后跟范谷说这个孩子是男孩\n", + "Detected language: zh\n", + "她生下来以后要用泛古的名字叫《文胜》\n", + "Detected language: zh\n", + "桑古得到很大的感動雖然他自己受到了精神病得這麼巨大的折磨\n", + "Detected language: zh\n", + "她還是覺得這個愛她的弟弟 愛她的弟媳婦將要來臨的一個\n", + "Detected language: zh\n", + "像戀愛一樣然後彼此疏信忘返那麼可以蒙想\n", + "Detected language: zh\n", + "有蘇格蘭德新的生命來用他的名字來命名他覺得很快樂感覺到生命裡的燃燒\n", + "Detected language: zh\n", + "一種喜悅跟興奮所以二月她畫了一張非常非常美的畫\n", + "Detected language: zh\n", + "它在初春的時候,看到有一株杏花,整個樹枝上開滿了花。\n", + "Detected language: zh\n", + "這張畫很特別因為他的背景全部是藍色的好像我們躺在樹底下\n", + "Detected language: zh\n", + "仰望 树的背景全部是天然的背景然后每朵花\n", + "Detected language: zh\n", + "都是白色的,像一粒一粒的芯子一樣。這張畫如果大家看到\n", + "Detected language: zh\n", + "也會很驚訝因為它完全像可能我們在故宮博物院看到的一張\n", + "Detected language: zh\n", + "像宋代的绘画——它非常像东方的绘画——它非常像中国古代牙国。\n", + "Detected language: zh\n", + "公庭的回话那么最有趣的是我们觉得 这个时候范谷不是有精神病吗\n", + "Detected language: zh\n", + "可是这张画看起来非常的宁静一点都不像一个精神病的这种\n", + "Detected language: zh\n", + "居住,一起画画的快乐可是我们知道真正居住在一起\n", + "Detected language: zh\n", + "煩躁 或者焦慮 全部都沒有所以現在的精神\n", + "Detected language: zh\n", + "醫療學其實常常用梵谷做重要的個案\n", + "Detected language: zh\n", + "所以說這個人是精神病患所以他一直在煩惱困擾焦慮的\n", + "Detected language: zh\n", + "继续当中可是我们忽略了有时候它会忽然\n", + "Detected language: zh\n", + "他 Racism可以說是一般的正常人因為這張畫的保持循環比正常人更加平靜\n", + "Detected language: zh\n", + "要显现出来,如果他是在烦燥焦虑的状况,他不可能画出这样的画作。\n", + "Detected language: zh\n", + "所以我覺得範谷很有趣就是他後來最後的一兩年的繪畫\n", + "Detected language: zh\n", + "在他發病之後其實等於是一個精神醫療學最好的病歷表\n", + "Detected language: zh\n", + "因為他記錄了所有他在發病過程當中的情緒上的變化\n", + "Detected language: zh\n", + "有時候非常的焦慮可是有時候非常非常的寧靜有時候非常的巨人\n", + "Detected language: zh\n", + "可能包括所有的柴米油鹽醬醋茶是點點滴滴瑣碎的一些小事\n", + "Detected language: zh\n", + "千里之外可是有時候它又非常的溫暖試圖去擁抱這個世界所以我們觀察\n", + "Detected language: zh\n", + "范谷在最後這段時期的畫作時可能也要特別的小心\n", + "Detected language: zh\n", + "這個時候他的弟弟就把凡古從南部的聖雷米\n", + "Detected language: zh\n", + "精神病院转移到巴黎北边的一个地方叫欧瑰欧瑰也是一个小镇\n", + "Detected language: zh\n", + "现在如果我们从巴黎去这个地方大概只要一个多小时吧\n", + "Detected language: zh\n", + "这个地方有一个很有名的小教堂一个歌德式的小教堂那么泛古\n", + "Detected language: zh\n", + "最后也就画了这个教堂那么他画这个教堂的时候用很特别的紫蓝色的背景\n", + "Detected language: zh\n", + "然後如果你仔細看你會發現這個哥德是有一個尖頂的教堂\n", + "Detected language: zh\n", + "里面的结构其实有点东倒西歪的感觉好像没有办法支撑起来\n", + "Detected language: zh\n", + "這個有點像很多的心理學家認為說一個人所謂正常其實是\n", + "Detected language: zh\n", + "其實我們以高庚跟范古的例子我們也可以看到許多人在戀愛的時候不容易覺察\n", + "Detected language: zh\n", + "有很多的細微的像牙籤一樣的東西在支撐著其實我們不知道\n", + "Detected language: zh\n", + "到哪一個牙籤斷了以後我們整個就垮了就崩潰了所以所謂的精神的正常\n", + "Detected language: zh\n", + "其實是在很多複雜的平衡當中岌岌可危的維持著所以我自己看到\n", + "Detected language: zh\n", + "上半股的这个时期化的欧为的教堂我特别有感触因为这个教堂\n", + "Detected language: zh\n", + "其实就是他自杀以后他的遗体就埋在这个教堂的后面现在我们去捣念泛谷\n", + "Detected language: zh\n", + "就是到這個教堂可他好像看到這個教堂的時候已經看到他自己\n", + "Detected language: zh\n", + "宿命的某些終點那麼這段時期治療他的醫生\n", + "Detected language: zh\n", + "G-a-c-h-e我們翻譯成蓋瑟醫生吧\n", + "Detected language: zh\n", + "這個概設醫生是當時一個畫家比莎樓介紹給梵古的\n", + "Detected language: zh\n", + "大家都觉得这个医生很特别因为他不只是一个有专业技术的医生\n", + "Detected language: zh\n", + "真正婚姻以后的生活跟恋爱并不完全相同\n", + "Detected language: zh\n", + "而且她很喜欢画画她非常喜欢跟画家做朋友所以大家就觉得\n", + "Detected language: zh\n", + "如果由这样的一个医生来治疗梵谷可能会比较好因为他喜欢艺术\n", + "Detected language: zh\n", + "它就会对一个画画的饭股多一点了解或者多一点包容\n", + "Detected language: zh\n", + "可是我們看到好像這個卡斜醫生在治療過程當中\n", + "Detected language: zh\n", + "對梵谷幫助也不是太大我們看到梵谷還劃過這個醫生的項\n", + "Detected language: zh\n", + "這個醫生有一張像是旁邊堆了一些書然後有一個\n", + "Detected language: zh\n", + "那裡就是杯子,杯子裡面插了一些草藥當時的 Seems 可能是用傳統的準備的這種的配料你們 lent這個一些譬 為例子\n", + "Detected language: zh\n", + "這一種有點像今天的民俗廖法就是馬鞭草或者薰衣草就是有一些的植物\n", + "Detected language: zh\n", + "拿来煮汤熬药它是可以帮助情绪安静的\n", + "Detected language: zh\n", + "那可能大概就用這種方法在做精神病的某一種醫療\n", + "Detected language: zh\n", + "看着星星做梦的它可能要落实到非常基础的生活的本质上\n", + "Detected language: zh\n", + "如果大家看到这张画你会觉得非常有趣因为范古在画这个一生\n", + "Detected language: zh\n", + "然後這個醫生在半谷的話里透露出來的表情是非常無奈的那個無奈是\n", + "Detected language: zh\n", + "好像她看著一個病人,完全不知道怎麼樣治療他她也對這個病人的內心世界\n", + "Detected language: zh\n", + "一無所知每次看到這張畫我都覺得蠻好笑的\n", + "Detected language: zh\n", + "幽默的嘲諷感覺起來飯股好像比這個醫生\n", + "Detected language: zh\n", + "还要了解他自己就是 你是医生你要治疗我的病可是范国会觉得说\n", + "Detected language: zh\n", + "我比你還知道我自己的問題在哪裡所以因此我們也可以看到\n", + "Detected language: zh\n", + "你不知道泛固同時是病人同時可能也是自己治療自己的一生\n", + "Detected language: zh\n", + "可是他和醫生也建立了蠻好的友誼所以在最後去世的時候\n", + "Detected language: zh\n", + "他的畫作也都留給了這位醫生那麼一直到\n", + "Detected language: zh\n", + "所以共同生活其实并不是一种恋爱它可能需要另外一种相处的\n", + "Detected language: zh\n", + "1790年的7月27号范古在这个之前画了他最后一件\n", + "Detected language: zh\n", + "作品叫做麦田群鴨就是一大片金黃色的麥子的田地\n", + "Detected language: zh\n", + "當中由烏鴉飛起來我們知道烏鴉常常來偷吃麥子\n", + "Detected language: zh\n", + "所以農民很恨烏鴉就準備一種槍這個槍其實打不死人\n", + "Detected language: zh\n", + "就是散弹枪可是声音很大能够把田里面的乌鸦惊吓飞起来\n", + "Detected language: zh\n", + "所以范古就用了這把槍7月27號對著自己的心臟\n", + "Detected language: zh\n", + "開了一槍而他畫的這張畫裡面剛好是一群黑黑的烏鴉\n", + "Detected language: zh\n", + "從金黃色的麥鐵裏面飛起來很多人都認為這張畫好像是他\n", + "Detected language: zh\n", + "最後的晚格好像她已經了解到她要離開人間那烏鴉\n", + "Detected language: zh\n", + "也像一个不詳的黑云密不在天空上他27号\n", + "Detected language: zh\n", + "彼此的理解寬容那高根和范果事實上都沒有所以在這個相處的經驗當中\n", + "Detected language: zh\n", + "自己心臟打了一槍因為這個槍是散彈所以也打不死人只是受傷了\n", + "Detected language: zh\n", + "流血那麼一直到29號去世就被埋葬在\n", + "Detected language: zh\n", + "奧維教堂的後面那麼結束了這個傳奇的梵谷的一生\n", + "Detected language: zh\n", + "《美的陳思》我是蔣迅\n", + "Detected language: zh\n", + "我是蒋迅我們在一系列對於梵谷的介紹裏到了最後一個單元\n", + "Detected language: zh\n", + "很快就發生了衝突很不幸的是這兩個人都是藝術家而且都是最好的藝術家\n", + "Detected language: zh\n", + "所以因此他們在創作上,保有強烈的自我個性,每一個自我很強的人……\n", + "Detected language: zh\n", + "跟另外一個人相處對方如果自我也很強當然就發生衝突\n", + "Detected language: zh\n", + "所以因此我們看到在短短的一段時期從十月開始兩個人他們的確有一段時間\n", + "Detected language: zh\n", + "一起跑出去画画一起面对风景高庚也画了正在\n", + "Detected language: zh\n", + "在創作時候的梵谷的相那彼此有一段時間短短的\n", + "Detected language: zh\n", + "覺得好像還不錯可是很快你就會發現生活上發生的問題因為兩個人的錢都不多\n", + "Detected language: zh\n", + "两个人的生活需要共用的一些钱就会发生很多波折\n", + "Detected language: zh\n", + "同时两个人也不懂得怎么处理生活像高登就常常抱怨范古孙\n", + "Detected language: zh\n", + "你那個手都沒有洗乾淨都是油化顏料就煮到湯裡去了那因此這種\n", + "Detected language: zh\n", + "我們提到在1888年半古逐漸地開始精神上\n", + "Detected language: zh\n", + "平常看起來微不足道的小小的摩擦可是剛剛好就是生活裡面會演變成最大的事件\n", + "Detected language: zh\n", + "所以大概到11月以後你可以看到兩個人之間的衝突愈來愈明顯\n", + "Detected language: zh\n", + "在這段時期我們看到范古畫了兩張非常有代表性的畫作\n", + "Detected language: zh\n", + "一張叫高庚的椅子一張叫范谷的椅子我們知道椅子是什麼\n", + "Detected language: zh\n", + "椅子是一個人坐在那邊的位置當時高庚要來阿爾范谷非常高興\n", + "Detected language: zh\n", + "所以就為這個朋友準備了很好的房間準備了非常美麗的家具\n", + "Detected language: zh\n", + "它买了一张有扶手的,非常漂亮的椅子那高终也常常就\n", + "Detected language: zh\n", + "再坐在這個椅子上看書我們旁邊點了一支蠟燭\n", + "Detected language: zh\n", + "我們就會看到有可能范古常常就會變成滴滴咚咚 滴滴咚咚\n", + "Detected language: zh\n", + "就在旁邊叨叨念有很多抱怨高更的事情就是我們剛剛提到的\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + ">>>> 10-01\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + ">>>> 10-02\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + ">>>> 10-03\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + ">>>> 10-04\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + ">>>> 10-05\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + ">>>> 10-06\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + ">>>> 10-07\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "An error occurred: CUDA error: the launch timed out and was terminated\n", + "CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.\n", + "For debugging consider passing CUDA_LAUNCH_BLOCKING=1.\n", + "Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.\n", + "\n", + "Unexpected exception formatting exception. Falling back to standard exception\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Traceback (most recent call last):\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\IPython\\core\\interactiveshell.py\", line 3526, in run_code\n", + " exec(code_obj, self.user_global_ns, self.user_ns)\n", + " File \"C:\\Users\\BBS\\AppData\\Local\\Temp\\ipykernel_3852\\1415381140.py\", line 7, in \n", + " create_dataset(data_dir, dataloader_process_only=True)\n", + " File \"c:\\Users\\BBS\\code\\VALL-E-X-Trainer-by-CustomData\\customs\\make_custom_dataset.py\", line 87, in create_dataset\n", + " File \"c:\\Users\\BBS\\code\\VALL-E-X-Trainer-by-CustomData\\customs\\make_custom_dataset.py\", line 44, in make_prompts\n", + " text_tokens, enroll_x_lens = text_collater(\n", + " File \"c:\\Users\\BBS\\code\\VALL-E-X-Trainer-by-CustomData\\data\\tokenizer.py\", line 217, in __init__\n", + " model = EncodecModel.encodec_model_24khz()\n", + " File \"C:\\Users\\BBS\\AppData\\Roaming\\Python\\Python39\\site-packages\\encodec\\model.py\", line 280, in encodec_model_24khz\n", + " model.load_state_dict(state_dict)\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 2027, in load_state_dict\n", + " load(self, state_dict)\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 2015, in load\n", + " load(child, child_state_dict, child_prefix)\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 2015, in load\n", + " load(child, child_state_dict, child_prefix)\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 2015, in load\n", + " load(child, child_state_dict, child_prefix)\n", + " [Previous line repeated 2 more times]\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 2009, in load\n", + " module._load_from_state_dict(\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\torch\\nn\\modules\\module.py\", line 1942, in _load_from_state_dict\n", + " param.copy_(input_param)\n", + "KeyboardInterrupt\n", + "\n", + "During handling of the above exception, another exception occurred:\n", + "\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\IPython\\core\\interactiveshell.py\", line 2120, in showtraceback\n", + " stb = self.InteractiveTB.structured_traceback(\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\IPython\\core\\ultratb.py\", line 1435, in structured_traceback\n", + " return FormattedTB.structured_traceback(\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\IPython\\core\\ultratb.py\", line 1326, in structured_traceback\n", + " return VerboseTB.structured_traceback(\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\IPython\\core\\ultratb.py\", line 1173, in structured_traceback\n", + " formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\IPython\\core\\ultratb.py\", line 1088, in format_exception_as_a_whole\n", + " frames.append(self.format_record(record))\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\IPython\\core\\ultratb.py\", line 970, in format_record\n", + " frame_info.lines, Colors, self.has_colors, lvals\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\IPython\\core\\ultratb.py\", line 792, in lines\n", + " return self._sd.lines\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\stack_data\\utils.py\", line 144, in cached_property_wrapper\n", + " value = obj.__dict__[self.func.__name__] = self.func(obj)\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\stack_data\\core.py\", line 734, in lines\n", + " pieces = self.included_pieces\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\stack_data\\utils.py\", line 144, in cached_property_wrapper\n", + " value = obj.__dict__[self.func.__name__] = self.func(obj)\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\stack_data\\core.py\", line 681, in included_pieces\n", + " pos = scope_pieces.index(self.executing_piece)\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\stack_data\\utils.py\", line 144, in cached_property_wrapper\n", + " value = obj.__dict__[self.func.__name__] = self.func(obj)\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\stack_data\\core.py\", line 660, in executing_piece\n", + " return only(\n", + " File \"c:\\Users\\BBS\\miniconda3\\lib\\site-packages\\executing\\executing.py\", line 190, in only\n", + " raise NotOneValueFound('Expected one value, found 0')\n", + "executing.executing.NotOneValueFound: Expected one value, found 0\n" + ] + } + ], + "source": [ + "basedir = \"MyTTSDataset/train\"\n", + "folds = os.listdir(basedir)\n", + "for fold in folds:\n", + " print('>>>>',fold)\n", + " data_dir = os.path.join(basedir,fold)\n", + " create_dataset(data_dir, dataloader_process_only=True)" + ] + }, + { + "cell_type": "markdown", + "id": "e2fae7f5", + "metadata": {}, + "source": [ + "更改格式為\n", + "```bash\n", + "data_dir_OK\n", + "├── bpe_69.json\n", + "├── utt1-1.wav\n", + "├── utt1-2.wav\n", + "├── utt2-1.wav\n", + "......\n", + "└── utt{n}.wav\n", + "└── audio_ann_sum.txt\n", + "└── audio_sum.hdf5\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "edda7831", + "metadata": {}, + "outputs": [], + "source": [ + "data_dir = 'MyTTSDataset/train'\n", + "output_dir = data_dir + '_tune'\n", + "\n", + "def merge_hdf5(files_to_merge, output_path):\n", + " with h5py.File(output_path, 'w') as out_f:\n", + " for file_path in tqdm(files_to_merge):\n", + " with h5py.File(file_path, 'r') as f:\n", + " for group in f:\n", + " if group in out_f:\n", + " if 'audio' in f[group] and 'audio' in out_f[group]:\n", + " data_existing = out_f[group]['audio'][:]\n", + " data_new = f[group]['audio'][:]\n", + " merged_data = np.concatenate((data_existing, data_new), axis=0)\n", + " del out_f[group]['audio']\n", + " out_f[group].create_dataset('audio', data=merged_data)\n", + " else:\n", + " out_f.copy(f[group], group)\n", + "\n", + "if not os.path.exists(output_dir):\n", + " os.makedirs(output_dir)\n", + "\n", + "hdf5_files = []\n", + "audio_ann_content = \"\"\n", + "\n", + "# Copy bpe_69.json\n", + "bpe_69_path = os.path.join(data_dir, 'bpe_69.json')\n", + "if os.path.exists(bpe_69_path):\n", + " shutil.copy(bpe_69_path, os.path.join(output_dir, 'bpe_69.json'))\n", + "\n", + "for root, dirs, files in os.walk(data_dir):\n", + " for file in tqdm(files):\n", + " if file == 'audio_sum.hdf5':\n", + " hdf5_files.append(os.path.join(root, file))\n", + " elif file.endswith('.wav'):\n", + " shutil.copy(os.path.join(root, file), os.path.join(output_dir, file))\n", + " elif file == 'audio_ann_sum.txt':\n", + " with open(os.path.join(root, file), 'r') as f:\n", + " content = f.read()\n", + " audio_ann_content += content + '\\n'\n", + "\n", + "with open(os.path.join(output_dir, 'audio_ann_sum.txt'), 'w') as f:\n", + " f.write(audio_ann_content)\n", + "\n", + "merge_hdf5(hdf5_files, os.path.join(output_dir, 'audio_sum.hdf5'))" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "0e8154e4", + "metadata": {}, + "outputs": [], + "source": [ + "import utils.g2p.cleaners\n", + "from tokenizers import Tokenizer\n", + "\n", + "def _clean_text(text, cleaner_names):\n", + " for name in cleaner_names:\n", + " cleaner = getattr(utils.g2p.cleaners, name)\n", + " if not cleaner:\n", + " raise Exception('Unknown cleaner: %s' % name)\n", + " text, langs = cleaner(text)\n", + " return text, langs\n", + "\n", + "tokenizer = Tokenizer.from_file(\"utils/g2p/bpe_69.json\")" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "421d0733", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "29ca75fd4e56443eb97ddb313589b90b", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + " 0%| | 0/3811 [00:00= 3:\n", + " text = part[3]\n", + " phonemes, langs = _clean_text(text, ['cje_cleaners'])\n", + " phonemes = phonemes.replace(\" \", \"_\")\n", + " # 3. tokenize phonemes\n", + " phoneme_tokens = tokenizer.encode(phonemes).ids\n", + " if not len(phoneme_tokens):\n", + " print('>>>> drop',text)\n", + " continue\n", + " else:\n", + " clean_lines.append(line+'\\n')\n", + "\n", + "clean_lines = [line if line.endswith('\\n') else line + '\\n' for line in clean_lines]\n", + "# Step 3: Write the remaining lines back to the file\n", + "with open('audio_ann_sum.txt', 'w', encoding='utf-8') as f:\n", + " f.writelines(clean_lines)\n", + "\n", + "print(f\"The line has been removed from {file_path}\")\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/model-card.md b/model-card.md new file mode 100644 index 0000000000000000000000000000000000000000..769b7b6a68450590659af26a86db0affe58dd9e9 --- /dev/null +++ b/model-card.md @@ -0,0 +1,33 @@ +# Model Card: VALL-E X + +**Author**: [Songting](https://github.com/Plachtaa).
+
+This is the official codebase for running open-sourced VALL-E X. + +The following is additional information about the models released here. + +## Model Details + +VALL-E X is a series of two transformer models that turn text into audio. + +### Phoneme to acoustic tokens + - Input: IPAs converted from input text by a rule-based G2P tool. + - Output: tokens from the first codebook of the [EnCodec Codec](https://github.com/facebookresearch/encodec) from facebook + +### Coarse to fine tokens + - Input: IPAs converted from input text by a rule-based G2P tool & the first codebook from EnCodec + - Output: 8 codebooks from EnCodec + +### Architecture +| Model | Parameters | Attention | Output Vocab size | +|:------------------------:|:----------:|------------|:-----------------:| +| G2P tool | - | - | 69 | +| Phoneme to coarse tokens | 150 M | Causal | 1x 1,024 | +| Coarse to fine tokens | 150 M | Non-causal | 7x 1,024 | + +### Release date +August 2023 + +## Broader Implications +We anticipate that this model's text to audio capabilities can be used to improve accessbility tools in a variety of languages. +Straightforward improvements will allow models to run faster than realtime, rendering them useful for applications such as virtual assistants. \ No newline at end of file diff --git a/models/__init__.py b/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f64eed08bfa9b83709b5ea12c3aee07ccc40355d --- /dev/null +++ b/models/__init__.py @@ -0,0 +1,136 @@ +import argparse + +import torch.nn as nn +# from icefall.utils import AttributeDict, str2bool + +from .macros import ( + NUM_AUDIO_TOKENS, + NUM_MEL_BINS, + NUM_SPEAKER_CLASSES, + NUM_TEXT_TOKENS, + SPEAKER_EMBEDDING_DIM, +) +from .transformer import Transformer +from .vallex import VALLE, VALLF +from .visualizer import visualize + + +def add_model_arguments(parser: argparse.ArgumentParser): + parser.add_argument( + "--model-name", + type=str, + default="VALL-E", + help="VALL-E, VALL-F, Transformer.", + ) + parser.add_argument( + "--decoder-dim", + type=int, + default=1024, + help="Embedding dimension in the decoder model.", + ) + parser.add_argument( + "--nhead", + type=int, + default=16, + help="Number of attention heads in the Decoder layers.", + ) + parser.add_argument( + "--num-decoder-layers", + type=int, + default=12, + help="Number of Decoder layers.", + ) + parser.add_argument( + "--scale-factor", + type=float, + default=1.0, + help="Model scale factor which will be assigned different meanings in different models.", + ) + parser.add_argument( + "--norm-first", + type=bool, + default=True, + help="Pre or Post Normalization.", + ) + parser.add_argument( + "--add-prenet", + type=bool, + default=False, + help="Whether add PreNet after Inputs.", + ) + + # VALL-E & F + parser.add_argument( + "--prefix-mode", + type=int, + default=1, + help="The mode for how to prefix VALL-E NAR Decoder, " + "0: no prefix, 1: 0 to random, 2: random to random, 4: chunk of pre or post utterance.", + ) + parser.add_argument( + "--share-embedding", + type=bool, + default=True, + help="Share the parameters of the output projection layer with the parameters of the acoustic embedding.", + ) + parser.add_argument( + "--prepend-bos", + type=bool, + default=False, + help="Whether prepend to the acoustic tokens -> AR Decoder inputs.", + ) + parser.add_argument( + "--num-quantizers", + type=int, + default=8, + help="Number of Audio/Semantic quantization layers.", + ) + + # Transformer + parser.add_argument( + "--scaling-xformers", + type=bool, + default=False, + help="Apply Reworked Conformer scaling on Transformers.", + ) + + +def get_model(params) -> nn.Module: + if params.model_name.lower() in ["vall-f", "vallf"]: + model = VALLF( + params.decoder_dim, + params.nhead, + params.num_decoder_layers, + norm_first=params.norm_first, + add_prenet=params.add_prenet, + prefix_mode=params.prefix_mode, + share_embedding=params.share_embedding, + nar_scale_factor=params.scale_factor, + prepend_bos=params.prepend_bos, + num_quantizers=params.num_quantizers, + ) + elif params.model_name.lower() in ["vall-e", "valle"]: + model = VALLE( + params.decoder_dim, + params.nhead, + params.num_decoder_layers, + norm_first=params.norm_first, + add_prenet=params.add_prenet, + prefix_mode=params.prefix_mode, + share_embedding=params.share_embedding, + nar_scale_factor=params.scale_factor, + prepend_bos=params.prepend_bos, + num_quantizers=params.num_quantizers, + ) + else: + assert params.model_name in ["Transformer"] + model = Transformer( + params.decoder_dim, + params.nhead, + params.num_decoder_layers, + norm_first=params.norm_first, + add_prenet=params.add_prenet, + scaling_xformers=params.scaling_xformers, + ) + + return model diff --git a/models/macros.py b/models/macros.py new file mode 100644 index 0000000000000000000000000000000000000000..cbc54966f43b2ef27d87c3b4bc69cb866d2b8fd0 --- /dev/null +++ b/models/macros.py @@ -0,0 +1,11 @@ +# Text +NUM_TEXT_TOKENS = 2048 + +# Audio +NUM_AUDIO_TOKENS = 1024 # EnCodec RVQ bins +NUM_MEL_BINS = 100 # BigVGAN bigvgan_24khz_100band + + +# Speaker +NUM_SPEAKER_CLASSES = 4096 +SPEAKER_EMBEDDING_DIM = 64 diff --git a/models/transformer.py b/models/transformer.py new file mode 100644 index 0000000000000000000000000000000000000000..8dca92debeb9c08e8fd98ef0e51857ffee140ea6 --- /dev/null +++ b/models/transformer.py @@ -0,0 +1,394 @@ +# Copyright 2023 (authors: Feiteng Li) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from functools import partial +from typing import Any, Dict, List, Tuple, Union + +import torch +import torch.nn as nn +import torch.nn.functional as F +# from icefall.utils import make_pad_mask +# from torchmetrics.classification import BinaryAccuracy + +from models.vallex import Transpose +from modules.embedding import SinePositionalEmbedding, TokenEmbedding +from modules.scaling import BalancedDoubleSwish, ScaledLinear +from modules.transformer import ( + BalancedBasicNorm, + IdentityNorm, + TransformerDecoderLayer, + TransformerEncoder, + TransformerEncoderLayer, +) + +from .macros import NUM_MEL_BINS, NUM_TEXT_TOKENS +from .visualizer import visualize + +IdentityNorm = IdentityNorm + + +class Transformer(nn.Module): + """It implements seq2seq Transformer TTS for debug(No StopPredictor and SpeakerEmbeding) + Neural Speech Synthesis with Transformer Network + https://arxiv.org/abs/1809.08895 + """ + + def __init__( + self, + d_model: int, + nhead: int, + num_layers: int, + norm_first: bool = True, + add_prenet: bool = False, + scaling_xformers: bool = False, + ): + """ + Args: + d_model: + The number of expected features in the input (required). + nhead: + The number of heads in the multiheadattention models (required). + num_layers: + The number of sub-decoder-layers in the decoder (required). + """ + super().__init__() + self.text_embedding = TokenEmbedding(d_model, NUM_TEXT_TOKENS) # W_x + + if add_prenet: + self.encoder_prenet = nn.Sequential( + Transpose(), + nn.Conv1d(d_model, d_model, kernel_size=5, padding="same"), + nn.BatchNorm1d(d_model), + nn.ReLU(), + nn.Dropout(0.5), + nn.Conv1d(d_model, d_model, kernel_size=5, padding="same"), + nn.BatchNorm1d(d_model), + nn.ReLU(), + nn.Dropout(0.5), + nn.Conv1d(d_model, d_model, kernel_size=5, padding="same"), + nn.BatchNorm1d(d_model), + nn.ReLU(), + nn.Dropout(0.5), + Transpose(), + nn.Linear(d_model, d_model), + ) + + self.decoder_prenet = nn.Sequential( + nn.Linear(NUM_MEL_BINS, 256), + nn.ReLU(), + nn.Dropout(0.5), + nn.Linear(256, 256), + nn.ReLU(), + nn.Dropout(0.5), + nn.Linear(256, d_model), + ) + + assert scaling_xformers is False # TODO: update this block + else: + self.encoder_prenet = nn.Identity() + if scaling_xformers: + self.decoder_prenet = ScaledLinear(NUM_MEL_BINS, d_model) + else: + self.decoder_prenet = nn.Linear(NUM_MEL_BINS, d_model) + + self.encoder_position = SinePositionalEmbedding( + d_model, + dropout=0.1, + scale=False, + ) + self.decoder_position = SinePositionalEmbedding( + d_model, dropout=0.1, scale=False + ) + + if scaling_xformers: + self.encoder = TransformerEncoder( + TransformerEncoderLayer( + d_model, + nhead, + dim_feedforward=d_model * 4, + dropout=0.1, + batch_first=True, + norm_first=norm_first, + linear1_self_attention_cls=ScaledLinear, + linear2_self_attention_cls=partial( + ScaledLinear, initial_scale=0.01 + ), + linear1_feedforward_cls=ScaledLinear, + linear2_feedforward_cls=partial( + ScaledLinear, initial_scale=0.01 + ), + activation=partial( + BalancedDoubleSwish, + channel_dim=-1, + max_abs=10.0, + min_prob=0.25, + ), + layer_norm_cls=IdentityNorm, + ), + num_layers=num_layers, + norm=BalancedBasicNorm(d_model) if norm_first else None, + ) + + self.decoder = nn.TransformerDecoder( + TransformerDecoderLayer( + d_model, + nhead, + dim_feedforward=d_model * 4, + dropout=0.1, + batch_first=True, + norm_first=norm_first, + linear1_self_attention_cls=ScaledLinear, + linear2_self_attention_cls=partial( + ScaledLinear, initial_scale=0.01 + ), + linear1_feedforward_cls=ScaledLinear, + linear2_feedforward_cls=partial( + ScaledLinear, initial_scale=0.01 + ), + activation=partial( + BalancedDoubleSwish, + channel_dim=-1, + max_abs=10.0, + min_prob=0.25, + ), + layer_norm_cls=IdentityNorm, + ), + num_layers=num_layers, + norm=BalancedBasicNorm(d_model) if norm_first else None, + ) + + self.predict_layer = ScaledLinear(d_model, NUM_MEL_BINS) + self.stop_layer = nn.Linear(d_model, 1) + else: + self.encoder = nn.TransformerEncoder( + nn.TransformerEncoderLayer( + d_model, + nhead, + dim_feedforward=d_model * 4, + activation=F.relu, + dropout=0.1, + batch_first=True, + norm_first=norm_first, + ), + num_layers=num_layers, + norm=nn.LayerNorm(d_model) if norm_first else None, + ) + + self.decoder = nn.TransformerDecoder( + nn.TransformerDecoderLayer( + d_model, + nhead, + dim_feedforward=d_model * 4, + activation=F.relu, + dropout=0.1, + batch_first=True, + norm_first=norm_first, + ), + num_layers=num_layers, + norm=nn.LayerNorm(d_model) if norm_first else None, + ) + + self.predict_layer = nn.Linear(d_model, NUM_MEL_BINS) + self.stop_layer = nn.Linear(d_model, 1) + + self.stop_accuracy_metric = BinaryAccuracy( + threshold=0.5, multidim_average="global" + ) + + # self.apply(self._init_weights) + + # def _init_weights(self, module): + # if isinstance(module, (nn.Linear)): + # module.weight.data.normal_(mean=0.0, std=0.02) + # if isinstance(module, nn.Linear) and module.bias is not None: + # module.bias.data.zero_() + # elif isinstance(module, nn.LayerNorm): + # module.bias.data.zero_() + # module.weight.data.fill_(1.0) + # elif isinstance(module, nn.Embedding): + # module.weight.data.normal_(mean=0.0, std=0.02) + + def forward( + self, + x: torch.Tensor, + x_lens: torch.Tensor, + y: torch.Tensor, + y_lens: torch.Tensor, + reduction: str = "sum", + train_stage: int = 0, + **kwargs, + ) -> Tuple[torch.Tensor, Union[torch.Tensor, None]]: + """ + Args: + x: + A 2-D tensor of shape (N, S). + x_lens: + A 1-D tensor of shape (N,). It contains the number of tokens in `x` + before padding. + y: + A 3-D tensor of shape (N, T, 8). + y_lens: + A 1-D tensor of shape (N,). It contains the number of tokens in `x` + before padding. + train_stage: + Not used in this model. + Returns: + Return the predicted audio code matrix, cross-entropy loss and Top-10 accuracy. + """ + del train_stage + + assert x.ndim == 2, x.shape + assert x_lens.ndim == 1, x_lens.shape + assert y.ndim == 3, y.shape + assert y_lens.ndim == 1, y_lens.shape + + assert torch.all(x_lens > 0) + + # NOTE: x has been padded in TextTokenCollater + x_mask = make_pad_mask(x_lens).to(x.device) + + x = self.text_embedding(x) + x = self.encoder_prenet(x) + x = self.encoder_position(x) + x = self.encoder(x, src_key_padding_mask=x_mask) + + total_loss, metrics = 0.0, {} + + y_mask = make_pad_mask(y_lens).to(y.device) + y_mask_float = y_mask.type(torch.float32) + data_mask = 1.0 - y_mask_float.unsqueeze(-1) + + # Training + # AR Decoder + def pad_y(y): + y = F.pad(y, (0, 0, 1, 0, 0, 0), value=0).detach() + # inputs, targets + return y[:, :-1], y[:, 1:] + + y, targets = pad_y(y * data_mask) # mask padding as zeros + + y_emb = self.decoder_prenet(y) + y_pos = self.decoder_position(y_emb) + + y_len = y_lens.max() + tgt_mask = torch.triu( + torch.ones(y_len, y_len, device=y.device, dtype=torch.bool), + diagonal=1, + ) + y_dec = self.decoder( + y_pos, + x, + tgt_mask=tgt_mask, + memory_key_padding_mask=x_mask, + ) + + predict = self.predict_layer(y_dec) + # loss + total_loss = F.mse_loss(predict, targets, reduction=reduction) + + logits = self.stop_layer(y_dec).squeeze(-1) + stop_loss = F.binary_cross_entropy_with_logits( + logits, + y_mask_float.detach(), + weight=1.0 + y_mask_float.detach() * 4.0, + reduction=reduction, + ) + metrics["stop_loss"] = stop_loss.detach() + + stop_accuracy = self.stop_accuracy_metric( + (torch.sigmoid(logits) >= 0.5).type(torch.int64), + y_mask.type(torch.int64), + ) + # icefall MetricsTracker.norm_items() + metrics["stop_accuracy"] = stop_accuracy.item() * y_lens.sum().type( + torch.float32 + ) + + return ((x, predict), total_loss + 100.0 * stop_loss, metrics) + + def inference( + self, + x: torch.Tensor, + x_lens: torch.Tensor, + y: Any = None, + **kwargs, + ) -> torch.Tensor: + """ + Args: + x: + A 2-D tensor of shape (1, S). + x_lens: + A 1-D tensor of shape (1,). It contains the number of tokens in `x` + before padding. + Returns: + Return the predicted audio code matrix and cross-entropy loss. + """ + assert x.ndim == 2, x.shape + assert x_lens.ndim == 1, x_lens.shape + + assert torch.all(x_lens > 0) + + x_mask = make_pad_mask(x_lens).to(x.device) + + x = self.text_embedding(x) + x = self.encoder_prenet(x) + x = self.encoder_position(x) + x = self.encoder(x, src_key_padding_mask=x_mask) + + x_mask = make_pad_mask(x_lens).to(x.device) + + # AR Decoder + # TODO: Managing decoder steps avoid repetitive computation + y = torch.zeros( + [x.shape[0], 1, NUM_MEL_BINS], dtype=torch.float32, device=x.device + ) + while True: + y_emb = self.decoder_prenet(y) + y_pos = self.decoder_position(y_emb) + + tgt_mask = torch.triu( + torch.ones( + y.shape[1], y.shape[1], device=y.device, dtype=torch.bool + ), + diagonal=1, + ) + + y_dec = self.decoder( + y_pos, + x, + tgt_mask=tgt_mask, + memory_mask=None, + memory_key_padding_mask=x_mask, + ) + predict = self.predict_layer(y_dec[:, -1:]) + + logits = self.stop_layer(y_dec[:, -1:]) > 0 # sigmoid(0.0) = 0.5 + if y.shape[1] > x_lens.max() * 10 or all(logits.cpu().numpy()): + print( + f"TransformerTTS EOS [Text {x_lens[0]} -> Audio {y.shape[1]}]" + ) + break + + y = torch.concat([y, predict], dim=1) + + return y[:, 1:] + + def visualize( + self, + predicts: Tuple[torch.Tensor], + batch: Dict[str, Union[List, torch.Tensor]], + output_dir: str, + limit: int = 4, + ) -> None: + visualize(predicts, batch, output_dir, limit=limit) diff --git a/models/vallex.py b/models/vallex.py new file mode 100644 index 0000000000000000000000000000000000000000..f705453ef2e4e80b25cf463c03e0e58b2de50b21 --- /dev/null +++ b/models/vallex.py @@ -0,0 +1,1353 @@ +# Copyright 2023 (authors: Feiteng Li) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import random +from typing import Dict, Iterator, List, Tuple, Union + +import numpy as np +import torch +import torch.nn as nn +import torch.nn.functional as F + +from data.input_strategies import PromptedFeatures +from modules.embedding import SinePositionalEmbedding, TokenEmbedding +from modules.transformer import ( + AdaptiveLayerNorm, + LayerNorm, + TransformerDecoderLayer, + TransformerEncoder, + TransformerEncoderLayer, +) + +from .macros import NUM_AUDIO_TOKENS, NUM_TEXT_TOKENS +from .visualizer import visualize +from train_utils.utils import make_pad_mask +from torchmetrics.classification import MulticlassAccuracy + + +class Transpose(nn.Identity): + """(N, T, D) -> (N, D, T)""" + + def forward(self, input: torch.Tensor) -> torch.Tensor: + return input.transpose(1, 2) + + +# NOTE: There are two ways to implement the model +# 1) [VALL-F] standard TransformerDecoder, use x as memory +# 2) [VALL-E] modified TransformerDecoder like GPT-x(e.g. causal TransformerEncoder), +# use x as the prefix of decoder inputs +class VALLF(nn.Module): + """It implements https://arxiv.org/abs/2301.02111 + "Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers" + """ + + def __init__( + self, + d_model: int, + nhead: int, + num_layers: int, + norm_first: bool = True, + add_prenet: bool = False, + decoder_cls: Union[ + nn.TransformerDecoder, nn.TransformerEncoder + ] = nn.TransformerDecoder, + decoder_layer_cls: Union[ + TransformerDecoderLayer, TransformerEncoderLayer + ] = TransformerDecoderLayer, + prefix_mode: int = 0, + share_embedding: bool = True, + nar_scale_factor: float = 1.0, + prepend_bos: bool = True, + num_quantizers: int = 8, + ): + """ + Args: + d_model: + The number of expected features in the input (required). + nhead: + The number of heads in the multiheadattention models (required). + num_layers: + The number of sub-decoder-layers in the decoder (required). + """ + super().__init__() + nar_d_model = int(d_model * nar_scale_factor) + + self.ar_text_embedding = TokenEmbedding(d_model, NUM_TEXT_TOKENS) # W_x + self.nar_text_embedding = TokenEmbedding(nar_d_model, NUM_TEXT_TOKENS) + + # ID NUM_AUDIO_TOKENS -> PAD + # ID NUM_AUDIO_TOKENS + 1 -> BOS + self.ar_audio_prepend_bos = prepend_bos + self.ar_audio_embedding = TokenEmbedding( + d_model, NUM_AUDIO_TOKENS + 1 + int(prepend_bos) + ) + + # PreNet + if add_prenet: + self.ar_text_prenet = nn.Sequential( + Transpose(), + nn.Conv1d(d_model, d_model, kernel_size=5, padding="same"), + nn.BatchNorm1d(d_model), + nn.ReLU(), + nn.Dropout(0.5), + nn.Conv1d(d_model, d_model, kernel_size=5, padding="same"), + nn.BatchNorm1d(d_model), + nn.ReLU(), + nn.Dropout(0.5), + nn.Conv1d(d_model, d_model, kernel_size=5, padding="same"), + nn.BatchNorm1d(d_model), + nn.ReLU(), + nn.Dropout(0.5), + Transpose(), + nn.Linear(d_model, d_model), + ) + + self.ar_audio_prenet = nn.Sequential( + nn.Linear(d_model, 256), + nn.ReLU(), + nn.Dropout(0.25), + nn.Linear(256, 256), + nn.ReLU(), + nn.Dropout(0.25), + nn.Linear(256, d_model), + ) + else: + self.ar_text_prenet = nn.Identity() + self.ar_audio_prenet = nn.Identity() + + self.ar_text_position = SinePositionalEmbedding( + d_model, + dropout=0.1, + scale=False, + alpha=True, + ) + self.ar_audio_position = SinePositionalEmbedding( + d_model, + dropout=0.1, + scale=False, + alpha=True, + ) + + self.ar_decoder = decoder_cls( + decoder_layer_cls( + d_model, + nhead, + dim_feedforward=d_model * 4, + dropout=0.1, + batch_first=True, + norm_first=norm_first, + ), + num_layers=num_layers, + norm=LayerNorm(d_model) if norm_first else None, + ) + self.ar_predict_layer = nn.Linear( + d_model, NUM_AUDIO_TOKENS + 1, bias=False + ) + + self.ar_accuracy_metric = MulticlassAccuracy( + NUM_AUDIO_TOKENS + 1, + top_k=10, + average="micro", + multidim_average="global", + ignore_index=NUM_AUDIO_TOKENS, + ) + + self.rng = random.Random(0) + self.num_heads = nhead + self.prefix_mode = prefix_mode + self.num_quantizers = num_quantizers + + assert num_quantizers >= 1 + if num_quantizers > 1: + self.nar_audio_embeddings = nn.ModuleList( + [TokenEmbedding(nar_d_model, NUM_AUDIO_TOKENS + 1)] + + [ + TokenEmbedding(nar_d_model, NUM_AUDIO_TOKENS) + for i in range(num_quantizers - 1) + ] + ) # W_a + + # PreNet + if add_prenet: + self.nar_text_prenet = nn.Sequential( + Transpose(), + nn.Conv1d( + nar_d_model, nar_d_model, kernel_size=5, padding="same" + ), + nn.BatchNorm1d(nar_d_model), + nn.ReLU(), + nn.Dropout(0.5), + nn.Conv1d( + nar_d_model, nar_d_model, kernel_size=5, padding="same" + ), + nn.BatchNorm1d(nar_d_model), + nn.ReLU(), + nn.Dropout(0.5), + nn.Conv1d( + nar_d_model, nar_d_model, kernel_size=5, padding="same" + ), + nn.BatchNorm1d(nar_d_model), + nn.ReLU(), + nn.Dropout(0.5), + Transpose(), + nn.Linear(nar_d_model, nar_d_model), + ) + self.nar_audio_prenet = nn.Sequential( + nn.Linear(nar_d_model, 256), + nn.ReLU(), + nn.Dropout(0.25), + nn.Linear(256, 256), + nn.ReLU(), + nn.Dropout(0.25), + nn.Linear(256, nar_d_model), + ) + else: + self.nar_text_prenet = nn.Identity() + self.nar_audio_prenet = nn.Identity() + + self.nar_text_position = SinePositionalEmbedding( + nar_d_model, + dropout=0.0, + scale=False, + alpha=False, + ) + self.nar_audio_position = SinePositionalEmbedding( + nar_d_model, + dropout=0.1, + scale=False, + alpha=False, + ) + + self.nar_decoder = decoder_cls( + decoder_layer_cls( + nar_d_model, + int(nhead * nar_scale_factor), + dim_feedforward=nar_d_model * 4, + dropout=0.1, + batch_first=True, + norm_first=norm_first, + adaptive_layer_norm=True, + ), + num_layers=int(num_layers * nar_scale_factor), + norm=AdaptiveLayerNorm( + nar_d_model, norm=nn.LayerNorm(nar_d_model) + ) + if norm_first + else None, + ) + self.nar_predict_layers = nn.ModuleList( + [ + nn.Linear(nar_d_model, NUM_AUDIO_TOKENS, bias=False) + for i in range(num_quantizers - 1) + ] + ) + self.nar_stage_embeddings = nn.ModuleList( + [ + TokenEmbedding(nar_d_model, 1) + for i in range(num_quantizers - 1) + ] + ) + + if share_embedding: + # We share the parameters of the output projection layer with the parameters of the acoustic embedding Wa + # NOTE(Feiteng): In the experiment, this undermines accuracy + # self.ar_predict_layer.weight = self.ar_audio_embedding.weight + + # We also share the parameters of the acoustic embedding layer and the output prediction layer, + # which means the weights of the j-th prediction layer are the same as the (j + 1)-th acoustic embedding layer. + for j in range(0, num_quantizers - 2): + self.nar_predict_layers[ + j + ].weight = self.nar_audio_embeddings[j + 2].weight + + self.nar_accuracy_metric = MulticlassAccuracy( + NUM_AUDIO_TOKENS + 1, + top_k=10, + average="micro", + multidim_average="global", + ignore_index=NUM_AUDIO_TOKENS, + ) + + def stage_parameters(self, stage: int = 1) -> Iterator[nn.Parameter]: + assert stage > 0 + if stage == 1: + for name, param in self.named_parameters(): + if name.startswith("ar_"): + print(f" AR parameter: {name}") + yield param + + if stage == 2: + for name, param in self.named_parameters(): + if name.startswith("nar_"): + print(f"NAR parameter: {name}") + yield param + + def stage_named_parameters( + self, stage: int = 1 + ) -> Iterator[Tuple[str, nn.Parameter]]: + assert stage > 0 + if stage == 1: + for pair in self.named_parameters(): + if pair[0].startswith("ar_"): + yield pair + + if stage == 2: + for pair in self.named_parameters(): + if pair[0].startswith("nar_"): + yield pair + + def pad_y_eos(self, y, y_mask_int, eos_id): + targets = F.pad(y, (0, 1), value=0) + eos_id * F.pad( + y_mask_int, (0, 1), value=1 + ) + # inputs, targets + if self.ar_audio_prepend_bos: + return ( + F.pad(targets[:, :-1], (1, 0), value=NUM_AUDIO_TOKENS + 1), + targets, + ) + + return targets[:, :-1], targets[:, 1:] + + def _prepare_prompts(self, y, y_lens, codes, nar_stage, y_prompts_codes, prefix_mode): + # 5.1 For the NAR acoustic prompt tokens, we select a random segment waveform of 3 seconds + # from the same utterance. + # We implement this differently. + if prefix_mode == 0: + # no prefix + prefix_len = 0 + y_emb = self.nar_audio_embeddings[0](y) + for j in range(1, nar_stage): + # Formula (4) (5) + y_emb = y_emb + self.nar_audio_embeddings[j](codes[..., j]) + elif prefix_mode == 1: + # prefix at begining + int_low = (0.25 * y_lens.min()).type(torch.int64).item() + prefix_len = torch.randint(0, int_low * 2, size=()).item() + prefix_len = min(prefix_len, 225) # 24000/320 * 3s = 225 frames + + y_prompts = self.nar_audio_embeddings[0](y[:, :prefix_len]) + y_emb = self.nar_audio_embeddings[0](y[:, prefix_len:]) + for j in range(1, self.num_quantizers): + y_prompts += self.nar_audio_embeddings[j]( + codes[:, :prefix_len, j] + ) + if j < nar_stage: + y_emb += self.nar_audio_embeddings[j]( + codes[:, prefix_len:, j] + ) + y_emb = torch.concat([y_prompts, y_emb], axis=1) + elif prefix_mode in [2, 4]: + if prefix_mode == 2: + # random prefix + prefix_len = min(225, int(0.25 * y_lens.min().item())) + + y_prompts_codes = [] + for b in range(codes.shape[0]): + start = self.rng.randint(0, y_lens[b].item() - prefix_len) + y_prompts_codes.append( + torch.clone(codes[b, start : start + prefix_len]) + ) + codes[ + b, start : start + prefix_len, nar_stage + ] = NUM_AUDIO_TOKENS + y_prompts_codes = torch.stack(y_prompts_codes, dim=0) + else: + prefix_len = y_prompts_codes.shape[1] + + y_prompts = self.nar_audio_embeddings[0](y_prompts_codes[..., 0]) + y_emb = self.nar_audio_embeddings[0](y) + for j in range(1, self.num_quantizers): + y_prompts += self.nar_audio_embeddings[j]( + y_prompts_codes[..., j] + ) + if j < nar_stage: + y_emb += self.nar_audio_embeddings[j](codes[..., j]) + y_emb = torch.concat([y_prompts, y_emb], axis=1) + else: + raise ValueError + + return y_emb, prefix_len + + def forward( + self, + x: torch.Tensor, + x_lens: torch.Tensor, + y: Union[torch.Tensor, PromptedFeatures], + y_lens: Union[torch.Tensor, PromptedFeatures], + reduction: str = "sum", + train_stage: int = 0, + **kwargs, + ) -> Tuple[torch.Tensor, Union[torch.Tensor, None]]: + """ + Args: + x: + A 2-D tensor of shape (N, S). + x_lens: + A 1-D tensor of shape (N,). It contains the number of tokens in `x` + before padding. + y: + A 3-D tensor of shape (N, T, 8). + y_lens: + A 1-D tensor of shape (N,). It contains the number of tokens in `x` + before padding. + train_stage: + 0: AR & NAR modules, 1: AR modules, 2: NAR modules + Returns: + Return the predicted audio code matrix, cross-entropy loss and Top-10 accuracy. + """ + assert x.ndim == 2, x.shape + assert x_lens.ndim == 1, x_lens.shape + + y_prompts_codes = None + if isinstance(y, PromptedFeatures): + y_prompts_codes, y = y.data + prompts_len, y_lens = y_lens.data + assert prompts_len.min() == prompts_len.max() + assert self.prefix_mode == 4 + y_prompts_codes = y_prompts_codes.type(torch.int64) + + assert y.ndim == 3, y.shape + assert y_lens.ndim == 1, y_lens.shape + + # NOTE: x has been padded in TextTokenCollater + x_mask = make_pad_mask(x_lens).to(x.device) + + text = x + x = self.ar_text_embedding(text) + x = self.ar_text_prenet(x) + x = self.ar_text_position(x) + + total_loss, metrics = 0.0, {} + + y_mask = make_pad_mask(y_lens).to(y.device) + y_mask_int = y_mask.type(torch.int64) + + codes = y.type(torch.int64) * (1 - y_mask_int.unsqueeze(dim=-1)) + + # Training + # AR Decoder + y, targets = self.pad_y_eos( + codes[..., 0], y_mask_int, eos_id=NUM_AUDIO_TOKENS + ) + + if train_stage in [0, 1]: + y_emb = self.ar_audio_embedding(y) + y_emb = self.ar_audio_prenet(y_emb) + y_pos = self.ar_audio_position(y_emb) + + ar_y_mask = y_mask + if self.ar_audio_prepend_bos: + ar_y_mask = F.pad(y_mask, (1, 0), value=False) + + y_len = y_lens.max() + int(self.ar_audio_prepend_bos) + tgt_mask = torch.triu( + torch.ones(y_len, y_len, device=y.device, dtype=torch.bool), + diagonal=1, + ) + y_dec, _ = self.ar_decoder( + (y_pos, None), + x, + tgt_mask=tgt_mask, + tgt_key_padding_mask=ar_y_mask, + memory_mask=None, + memory_key_padding_mask=x_mask, + ) + logits = self.ar_predict_layer(y_dec).permute(0, 2, 1) + # loss + total_loss = F.cross_entropy(logits, targets, reduction=reduction) + metrics["ArTop10Accuracy"] = self.ar_accuracy_metric( + logits.detach(), targets + ).item() * y_lens.sum().type(torch.float32) + + if self.num_quantizers == 1: + return ((x, codes), total_loss, metrics) + + # Non-AR Decoders + if self.ar_audio_prepend_bos: + y = y[:, 1:] + + if train_stage in [0, 2]: + num_nar_layers = self.num_quantizers - 1 + nar_stage = self.rng.choices( + [_k for _k in range(1, self.num_quantizers)], + weights=[1.0 / num_nar_layers] * num_nar_layers, + k=1, + )[0] + + x = self.nar_text_embedding(text) + x = self.nar_text_prenet(x) + x = self.nar_text_position(x) + + y_emb, prefix_len = self._prepare_prompts( + y, y_lens, codes, nar_stage, y_prompts_codes, self.prefix_mode + ) + + y_len = y_lens.max() + targets = codes[..., nar_stage] + NUM_AUDIO_TOKENS * y_mask_int + if self.prefix_mode in [2, 4]: + targets = targets + y_mask = F.pad(y_mask, (y_emb.shape[1] - y_len, 0), value=False) + elif self.prefix_mode == 1: + targets = targets[:, prefix_len:] + else: + assert prefix_len == 0 + + y_pos = self.nar_audio_prenet(y_emb) + y_pos = self.nar_audio_position(y_pos) + + y_dec, _ = self.nar_decoder( + (y_pos, self.nar_stage_embeddings[nar_stage - 1].weight), + x, + tgt_mask=None, + tgt_key_padding_mask=y_mask, + memory_mask=None, + memory_key_padding_mask=x_mask, + ) + if self.prefix_mode != 0: + y_dec = y_dec[:, prefix_len:] + if self.prefix_mode == 4: + prefix_len = 0 # reset for Top10Accuracy metric + + logits = self.nar_predict_layers[nar_stage - 1](y_dec).permute( + 0, 2, 1 + ) + # loss + total_length = (y_lens).sum().type(torch.float32) + total_loss += ( + F.cross_entropy( + logits, + targets, + ignore_index=NUM_AUDIO_TOKENS, + reduction=reduction, + ) + * (total_length / (total_length - prefix_len * x.shape[0])) + ) + metrics["NarTop10Accuracy"] = ( + self.nar_accuracy_metric( + F.pad( + logits.detach(), + (0, 0, 0, 1, 0, 0), + value=logits.min().cpu().item(), + ), + targets, + ).item() + * total_length + ) + + if train_stage == 0: + total_loss = total_loss / 2.0 + print("total_loss:", total_loss) + + return ((x, codes), total_loss, metrics) + + def inference( + self, + x: torch.Tensor, + x_lens: torch.Tensor, + y: torch.Tensor, + enroll_x_lens: Union[torch.Tensor, None] = None, + top_k: int = -100, + temperature: float = 1.0, + ) -> torch.Tensor: + """ + Args: + x: + A 2-D tensor of shape (1, S). + x_lens: + A 1-D tensor of shape (1,). It contains the number of tokens in `x` + before padding. + y: + A 3-D tensor of shape (1, T, 8). + top_k: (`optional`) int + The number of highest probability tokens to keep for top-k-filtering. Default to -100. + temperature: (`optional`) float + The value used to module the next token probabilities. Must be strictly positive. Default to 1.0. + Returns: + Return the predicted audio code matrix and cross-entropy loss. + """ + assert x.ndim == 2, x.shape + assert x_lens.ndim == 1, x_lens.shape + assert y.ndim == 3, y.shape + assert y.shape[0] == 1, y.shape + + assert torch.all(x_lens > 0) + + text = x + x = self.ar_text_embedding(text) + x = self.ar_text_prenet(x) + x = self.ar_text_position(x) + # NOTE: x has been padded in TextTokenCollater + x_mask = make_pad_mask(x_lens).to(x.device) + + prompts = y + prefix_len = y.shape[1] + + # AR Decoder + # TODO: Managing decoder steps avoid repetitive computation + y = prompts[..., 0] + if self.ar_audio_prepend_bos: + y = F.pad(y, (1, 0), value=NUM_AUDIO_TOKENS + 1) + + while True: + y_emb = self.ar_audio_embedding(y) + y_emb = self.ar_audio_prenet(y_emb) + y_pos = self.ar_audio_position(y_emb) + + tgt_mask = torch.triu( + torch.ones( + y.shape[1], y.shape[1], device=y.device, dtype=torch.bool + ), + diagonal=1, + ) + + y_dec, _ = self.ar_decoder( + (y_pos, None), + x, + tgt_mask=tgt_mask, + memory_mask=None, + memory_key_padding_mask=x_mask, + ) + logits = self.ar_predict_layer(y_dec[:, -1]) + samples = topk_sampling( + logits, top_k=top_k, top_p=1.0, temperature=temperature + ) + + if ( + torch.argmax(logits, dim=-1)[0] == NUM_AUDIO_TOKENS + or samples[0, 0] == NUM_AUDIO_TOKENS + or (y.shape[1] - prefix_len) > x_lens.max() * 16 + ): + if prompts.shape[1] == y.shape[1]: + raise SyntaxError( + "well trained model shouldn't reach here." + ) + + print(f"VALL-F EOS [{prefix_len} -> {y.shape[1]}]") + break + + y = torch.concat([y, samples], dim=1) + + codes = [y[:, prefix_len + int(self.ar_audio_prepend_bos) :]] + if self.num_quantizers == 1: + return torch.stack(codes, dim=-1) + + # Non-AR Decoders + y_emb = self.nar_audio_embeddings[0]( + y[:, int(self.ar_audio_prepend_bos) :] + ) + if self.prefix_mode in [2, 4]: # Exclude enrolled_phonemes + enrolled_len = enroll_x_lens.max().item() + # SOS + Synthesis Text + EOS + text = torch.concat( + [ + text[:, :1], + text[:, enrolled_len - 1 :], + ], + dim=1, + ) + assert text.shape[0] == 1 + + x = self.nar_text_embedding(text) + x = self.nar_text_prenet(x) + x = self.nar_text_position(x) + + if self.prefix_mode != 0: + for j in range(1, self.num_quantizers): + y_emb[:, :prefix_len] += self.nar_audio_embeddings[j]( + prompts[..., j] + ) + + for i, (predict_layer, embedding_layer) in enumerate( + zip( + self.nar_predict_layers, + self.nar_audio_embeddings[1:], + ) + ): + y_pos = self.nar_audio_prenet(y_emb) + y_pos = self.nar_audio_position(y_pos) + y_dec, _ = self.nar_decoder( + (y_pos, self.nar_stage_embeddings[i].weight), + x, + tgt_mask=None, + memory_mask=None, + memory_key_padding_mask=None, + ) + logits = predict_layer(y_dec[:, prefix_len:]) + samples = torch.argmax(logits, dim=-1) + codes.append(samples) + # Formula (4) (5) + if i < 6: + if self.prefix_mode == 0: + y_emb[:, :prefix_len] += embedding_layer( + prompts[..., i + 1] + ) + y_emb[:, prefix_len:] += embedding_layer(samples) + + assert len(codes) == self.num_quantizers + return torch.stack(codes, dim=-1) + + def visualize( + self, + predicts: Tuple[torch.Tensor], + batch: Dict[str, Union[List, torch.Tensor]], + output_dir: str, + limit: int = 4, + ) -> None: + visualize(predicts, batch, output_dir, limit=limit) + + +class VALLE(VALLF): + """It implements https://arxiv.org/abs/2301.02111 + "Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers" + """ + + def __init__( + self, + d_model: int, + nhead: int, + num_layers: int, + norm_first: bool = True, + add_prenet: bool = False, + prefix_mode: int = 0, + share_embedding: bool = True, + nar_scale_factor: float = 1.0, + **kwargs, + ): + """ + Args: + d_model: + The number of expected features in the input (required). + nhead: + The number of heads in the multiheadattention models (required). + num_layers: + The number of sub-decoder-layers in the decoder (required). + """ + super(VALLE, self).__init__( + d_model, + nhead, + num_layers, + norm_first=norm_first, + add_prenet=add_prenet, + decoder_cls=TransformerEncoder, + decoder_layer_cls=TransformerEncoderLayer, + prefix_mode=prefix_mode, + share_embedding=share_embedding, + nar_scale_factor=nar_scale_factor, + **kwargs, + ) + self.language_ID = { + 'en': 0, + 'zh': 1, + 'ja': 2, + 'vi': 3 + } + self.ar_language_embedding = TokenEmbedding(d_model, 3) + self.nar_language_embedding = TokenEmbedding(d_model, 3) + + def forward( + self, + x: torch.Tensor, + x_lens: torch.Tensor, + y: Union[torch.Tensor, PromptedFeatures], + y_lens: Union[torch.Tensor, PromptedFeatures], + reduction: str = "sum", + train_stage: int = 0, + **kwargs, + ) -> Tuple[torch.Tensor, Union[torch.Tensor, None]]: + """ + Args: + x: + A 2-D tensor of shape (N, S). + x_lens: + A 1-D tensor of shape (N,). It contains the number of tokens in `x` + before padding. + y: + A 3-D tensor of shape (N, T, 8). + y_lens: + A 1-D tensor of shape (N,). It contains the number of tokens in `x` + before padding. + train_stage: + 0: AR & NAR modules, 1: AR modules, 2: NAR modules + Returns: + Return the predicted audio code matrix, cross-entropy loss and Top-10 accuracy. + """ + assert x.ndim == 2, x.shape + assert x_lens.ndim == 1, x_lens.shape + + y_prompts_codes = None + if isinstance(y, PromptedFeatures): + y_prompts_codes, y = y.data + prompts_len, y_lens = y_lens.data + assert prompts_len.min() == prompts_len.max() + assert self.prefix_mode == 4 + y_prompts_codes = y_prompts_codes.type(torch.int64) + + assert y.ndim == 3, y.shape + assert y_lens.ndim == 1, y_lens.shape + + # NOTE: x has been padded in TextTokenCollater + x_mask = make_pad_mask(x_lens).to(x.device) + y_mask = make_pad_mask(y_lens).to(y.device) + y_mask_int = y_mask.type(torch.int64) + + text = x + codes = y.type(torch.int64) * (1 - y_mask_int.unsqueeze(dim=-1)) + + y, targets = self.pad_y_eos( + codes[..., 0], y_mask_int, eos_id=NUM_AUDIO_TOKENS + ) + + x_len = x_lens.max() + + metrics = {} + total_loss = 0.0 + + xy_padding_mask = torch.concat([x_mask, y_mask], dim=1) + if self.ar_audio_prepend_bos: + ar_xy_padding_mask = torch.concat( + [x_mask, F.pad(y_mask, (1, 0), value=False)], dim=1 + ) + else: + ar_xy_padding_mask = xy_padding_mask + # AR Decoder + if train_stage in [0, 1]: + x = self.ar_text_embedding(text) + x = self.ar_text_prenet(x) + x = self.ar_text_position(x) + + y_len = y_lens.max() + int(self.ar_audio_prepend_bos) + + x_attn_mask = F.pad( + torch.zeros((x_len, x_len), dtype=torch.bool, device=x.device), + (0, y_len), + value=True, + ) + y_attn_mask = F.pad( + torch.triu( + torch.ones(y_len, y_len, dtype=torch.bool, device=x.device), + diagonal=1, + ), + (x_len, 0), + value=False, + ) + xy_attn_mask = torch.concat([x_attn_mask, y_attn_mask], dim=0) + + # merge key padding and attention masks + bsz, src_len = x.shape[0], x_len + y_len + _xy_padding_mask = ( + ar_xy_padding_mask.view(bsz, 1, 1, src_len) + .expand(-1, self.num_heads, -1, -1) + .reshape(bsz * self.num_heads, 1, src_len) + ) + xy_attn_mask = xy_attn_mask.logical_or(_xy_padding_mask) + + new_attn_mask = torch.zeros_like(xy_attn_mask, dtype=x.dtype) + new_attn_mask.masked_fill_(xy_attn_mask, float("-inf")) + xy_attn_mask = new_attn_mask + + y_emb = self.ar_audio_embedding(y) + y_emb = self.ar_audio_prenet(y_emb) + y_pos = self.ar_audio_position(y_emb) + + xy_pos = torch.concat([x, y_pos], dim=1) + + xy_dec, _ = self.ar_decoder( + (xy_pos, None), + mask=xy_attn_mask, + # src_key_padding_mask=xy_padding_mask, + # is_causal=True, + ) + logits = self.ar_predict_layer(xy_dec[:, x_len:]).permute(0, 2, 1) + # loss + total_loss = F.cross_entropy(logits, targets, reduction=reduction) + + metrics["ArTop10Accuracy"] = self.ar_accuracy_metric( + logits.detach(), targets + ).item() * y_lens.sum().type(torch.float32) + + if self.num_quantizers == 1: + return ((x, codes), total_loss, metrics) + + # Non-AR Decoders + if self.ar_audio_prepend_bos: + y = y[:, 1:] + if train_stage in [0, 2]: + num_nar_layers = self.num_quantizers - 1 + nar_stage = self.rng.choices( + [_k for _k in range(1, self.num_quantizers)], + weights=[1.0 / num_nar_layers] * num_nar_layers, + k=1, + )[0] + + x = self.nar_text_embedding(text) + x = self.nar_text_prenet(x) + x = self.nar_text_position(x) + + y_emb, prefix_len = self._prepare_prompts( + y, y_lens, codes, nar_stage, y_prompts_codes, self.prefix_mode + ) + + y_len = y_lens.max() + targets = codes[..., nar_stage] + NUM_AUDIO_TOKENS * y_mask_int + if self.prefix_mode in [2, 4]: + xy_padding_mask = torch.concat( + [ + x_mask, + F.pad(y_mask, (y_emb.shape[1] - y_len, 0), value=False), + ], + dim=1, + ) + elif self.prefix_mode == 1: + targets = targets[:, prefix_len:] + + y_pos = self.nar_audio_prenet(y_emb) + y_pos = self.nar_audio_position(y_pos) + xy_pos = torch.concat([x, y_pos], dim=1) + xy_dec, _ = self.nar_decoder( + (xy_pos, self.nar_stage_embeddings[nar_stage - 1].weight), + src_key_padding_mask=xy_padding_mask, + # is_causal=False, + ) + xy_dec = xy_dec[:, x_lens.max() + prefix_len :] + if self.prefix_mode == 4: + prefix_len = 0 # reset for Top10Accuracy metric + logits = self.nar_predict_layers[nar_stage - 1](xy_dec).permute( + 0, 2, 1 + ) + + # loss + total_length = (y_lens).sum().type(torch.float32) + total_loss += ( + F.cross_entropy( + logits, + targets, + ignore_index=NUM_AUDIO_TOKENS, + reduction=reduction, + ) + * (total_length / (total_length - prefix_len * x.shape[0])) + ) + metrics["NarTop10Accuracy"] = ( + self.nar_accuracy_metric( + F.pad( + logits.detach(), + (0, 0, 0, 1, 0, 0), + value=logits.min().cpu().item(), + ), + targets, + ).item() + * total_length + ) + + if train_stage == 0: + total_loss = total_loss / 2.0 + + return ((x, codes), total_loss, metrics) + + def inference( + self, + x: torch.Tensor, + x_lens: torch.Tensor, + y: torch.Tensor, + enroll_x_lens: torch.Tensor, + top_k: int = -100, + temperature: float = 1.0, + prompt_language: str = None, + text_language: str = None, + best_of: int = 1, + length_penalty: float = 1.0, + return_worst: bool = False, + ) -> torch.Tensor: + """ + Args: + x: + A 2-D tensor of shape (1, S). + x_lens: + A 1-D tensor of shape (1,). It contains the number of tokens in `x` + before padding. + y: + A 3-D tensor of shape (1, T, 8). + top_k: (`optional`) int + The number of highest probability tokens to keep for top-k-filtering. Default to -100. + temperature: (`optional`) float + The value used to module the next token probabilities. Must be strictly positive. Default to 1.0. + Returns: + Return the predicted audio code matrix. + """ + assert x.ndim == 2, x.shape + assert x_lens.ndim == 1, x_lens.shape + assert y.ndim == 3, y.shape + assert y.shape[0] == 1, y.shape + + assert torch.all(x_lens > 0) + + # NOTE: x has been padded in TextTokenCollater + text = x + x = self.ar_text_embedding(text) + # Add language embedding + prompt_language_id = torch.LongTensor(np.array([self.language_ID[prompt_language]])).to(x.device) + if isinstance(text_language, str): + text_language_id = torch.LongTensor(np.array([self.language_ID[text_language]])).to(x.device) + elif isinstance(text_language, List): + text_language_id = torch.LongTensor(np.array([self.language_ID[tl] for tl in text_language])).to(x.device) + x[:, :enroll_x_lens, :] += self.ar_language_embedding(prompt_language_id) + x[:, enroll_x_lens:, :] += self.ar_language_embedding(text_language_id) + x = self.ar_text_prenet(x) + x = self.ar_text_position(x) + + text_len = x_lens.max() + prompts = y + prefix_len = y.shape[1] + + # AR Decoder + # TODO: Managing decoder steps avoid repetitive computation + y = prompts[..., 0] + if self.ar_audio_prepend_bos: + y = F.pad(y, (1, 0), value=NUM_AUDIO_TOKENS + 1) + + x_len = x_lens.max() + x_attn_mask = torch.zeros((x_len, x_len), dtype=torch.bool) + + kv_cache = None + use_kv_caching = True + + sum_logprobs = torch.zeros(best_of, device=y.device) # implement batch decoding here + x = x.repeat(best_of, 1, 1) + y = y.repeat(best_of, 1) + while True: + y_emb = self.ar_audio_embedding(y) + y_emb = self.ar_audio_prenet(y_emb) + y_pos = self.ar_audio_position(y_emb) + xy_pos = torch.concat([x, y_pos], dim=1) + + y_len = y.shape[1] + x_attn_mask_pad = F.pad( + x_attn_mask, + (0, y_len), + value=True, + ) + y_attn_mask = F.pad( + torch.triu( + torch.ones(y_len, y_len, dtype=torch.bool), diagonal=1 + ), + (x_len, 0), + value=False, + ) + xy_attn_mask = torch.concat( + [x_attn_mask_pad, y_attn_mask], dim=0 + ).to(y.device) + + + if use_kv_caching and kv_cache is not None: + xy_pos = xy_pos[:, [-1]] + else: + pass + + xy_dec, kv_cache = self.ar_decoder.infer( + xy_pos, + mask=xy_attn_mask, + past_kv=kv_cache, + use_cache=use_kv_caching, + ) + # xy_dec, _ = self.ar_decoder( + # (xy_pos, None), + # mask=xy_attn_mask, + # ) + + logits = self.ar_predict_layer(xy_dec[:, -1]) + samples, current_logprobs = topk_sampling( + logits, top_k=top_k, top_p=1, temperature=temperature + ) + sum_logprobs += current_logprobs * (y[:, -1] != NUM_AUDIO_TOKENS) + samples[y[:, -1] == NUM_AUDIO_TOKENS] = NUM_AUDIO_TOKENS + completed = (samples[:, -1] == NUM_AUDIO_TOKENS).all() + if ( + completed + or (y.shape[1] - prompts.shape[1]) > x_lens.max() * 16 + ): + if prompts.shape[1] == y.shape[1]: + raise SyntaxError( + "well trained model shouldn't reach here." + ) + lengths = torch.sum(y != NUM_AUDIO_TOKENS, dim=1) + avg_logprobs = sum_logprobs / lengths ** length_penalty + # choose the best beam according to sum_logprobs + best_beam = y[torch.argmax(avg_logprobs), :] + worst_beam = y[torch.argmin(avg_logprobs), :] + # strip all eos tokens + best_beam = best_beam[best_beam != NUM_AUDIO_TOKENS] + worst_beam = worst_beam[worst_beam != NUM_AUDIO_TOKENS] + if return_worst: + y = worst_beam.unsqueeze(0) + else: + y = best_beam.unsqueeze(0) + print(f"VALL-E EOS [{prompts.shape[1]} -> {y.shape[1]}]") + break + + y = torch.concat([y, samples], dim=1) + + codes = [y[:, prefix_len + int(self.ar_audio_prepend_bos) :]] + if self.num_quantizers == 1: + return torch.stack(codes, dim=-1) + + # Non-AR Decoders + y_emb = self.nar_audio_embeddings[0]( + y[:, int(self.ar_audio_prepend_bos) :] + ) + + if self.prefix_mode in [2, 4]: # Exclude enrolled_phonemes + enrolled_len = enroll_x_lens.max().item() + # SOS + Synthesis Text + EOS + text = torch.concat( + [ + text[:, :1], + text[:, enrolled_len - 1 :], + ], + dim=1, + ) + text_len = text_len - (enrolled_len - 2) + assert text.shape[0] == 1 + + x = self.nar_text_embedding(text) + # Add language embedding + prompt_language_id = torch.LongTensor(np.array([self.language_ID[prompt_language]])).to(x.device) + if isinstance(text_language, str): + text_language_id = torch.LongTensor(np.array([self.language_ID[text_language]])).to(x.device) + elif isinstance(text_language, List): + text_language_id = torch.LongTensor(np.array([self.language_ID[tl] for tl in text_language])).to(x.device) + x[:, :enroll_x_lens, :] += self.nar_language_embedding(prompt_language_id) + x[:, enroll_x_lens:, :] += self.nar_language_embedding(text_language_id) + x = self.nar_text_prenet(x) + x = self.nar_text_position(x) + + if self.prefix_mode == 0: + for i, (predict_layer, embedding_layer) in enumerate( + zip( + self.nar_predict_layers, + self.nar_audio_embeddings[1:], + ) + ): + y_pos = self.nar_audio_prenet(y_emb) + y_pos = self.nar_audio_position(y_pos) + xy_pos = torch.concat([x, y_pos], dim=1) + + xy_dec, _ = self.nar_decoder( + (xy_pos, self.nar_stage_embeddings[i].weight) + ) + logits = predict_layer(xy_dec[:, text_len + prefix_len :]) + + samples = torch.argmax(logits, dim=-1) + codes.append(samples) + + if i < self.num_quantizers - 2: + y_emb[:, :prefix_len] += embedding_layer( + prompts[..., i + 1] + ) + y_emb[:, prefix_len:] += embedding_layer(samples) + else: + for j in range(1, self.num_quantizers): + y_emb[:, :prefix_len] += self.nar_audio_embeddings[j]( + prompts[..., j] + ) + + for i, (predict_layer, embedding_layer) in enumerate( + zip( + self.nar_predict_layers, + self.nar_audio_embeddings[1:], + ) + ): + y_pos = self.nar_audio_prenet(y_emb) + y_pos = self.nar_audio_position(y_pos) + xy_pos = torch.concat([x, y_pos], dim=1) + + xy_dec, _ = self.nar_decoder( + (xy_pos, self.nar_stage_embeddings[i].weight) + ) + logits = predict_layer(xy_dec[:, text_len + prefix_len :]) + + samples = torch.argmax(logits, dim=-1) + codes.append(samples) + + if i < self.num_quantizers - 2: + y_emb[:, prefix_len:] += embedding_layer(samples) + + assert len(codes) == self.num_quantizers + return torch.stack(codes, dim=-1) + + def continual( + self, + x: torch.Tensor, + x_lens: torch.Tensor, + y: torch.Tensor, + ) -> torch.Tensor: + """ + Args: + x: + A 2-D tensor of shape (1, S). + x_lens: + A 1-D tensor of shape (1,). It contains the number of tokens in `x` + before padding. + y: + A 3-D tensor of shape (1, T, 8). + Returns: + Return the predicted audio code matrix. + """ + assert x.ndim == 2, x.shape + assert x_lens.ndim == 1, x_lens.shape + assert y.ndim == 3, y.shape + assert y.shape[0] == 1, y.shape + + assert torch.all(x_lens > 0) + assert self.num_quantizers == 8 + + # NOTE: x has been padded in TextTokenCollater + text = x + x = self.ar_text_embedding(text) + x = self.ar_text_prenet(x) + x = self.ar_text_position(x) + + text_len = x_lens.max() + + prefix_len = min(int(y.shape[1] * 0.5), 3 * 75) + + # AR Decoder + prompts = y[:, :prefix_len] + + codes = [y[:, prefix_len:, 0]] + # Non-AR Decoders + x = self.nar_text_embedding(text) + x = self.nar_text_prenet(x) + x = self.nar_text_position(x) + + y_emb = self.nar_audio_embeddings[0](y[..., 0]) + + if self.prefix_mode == 0: + for i, (predict_layer, embedding_layer) in enumerate( + zip( + self.nar_predict_layers, + self.nar_audio_embeddings[1:], + ) + ): + y_pos = self.nar_audio_position(y_emb) + y_pos = self.nar_audio_prenet(y_pos) + xy_pos = torch.concat([x, y_pos], dim=1) + + xy_dec, _ = self.nar_decoder( + (xy_pos, self.nar_stage_embeddings[i].weight) + ) + logits = predict_layer(xy_dec[:, text_len + prefix_len :]) + + samples = torch.argmax(logits, dim=-1) + codes.append(samples) + + if i < 6: + y_emb[:, :prefix_len] += embedding_layer( + prompts[..., i + 1] + ) + y_emb[:, prefix_len:] += embedding_layer(samples) + else: + for j in range(1, 8): + y_emb[:, :prefix_len] += self.nar_audio_embeddings[j]( + prompts[..., j] + ) + + for i, (predict_layer, embedding_layer) in enumerate( + zip( + self.nar_predict_layers, + self.nar_audio_embeddings[1:], + ) + ): + y_pos = self.nar_audio_prenet(y_emb) + y_pos = self.nar_audio_position(y_pos) + xy_pos = torch.concat([x, y_pos], dim=1) + + xy_dec, _ = self.nar_decoder( + (xy_pos, self.nar_stage_embeddings[i].weight) + ) + logits = predict_layer(xy_dec[:, text_len + prefix_len :]) + + samples = torch.argmax(logits, dim=-1) + codes.append(samples) + + if i < 6: + y_emb[:, prefix_len:] += embedding_layer(samples) + + assert len(codes) == 8 + return torch.stack(codes, dim=-1) + + +# https://github.com/microsoft/unilm/blob/master/xtune/src/transformers/modeling_utils.py +def top_k_top_p_filtering( + logits, top_k=0, top_p=1.0, filter_value=-float("Inf"), min_tokens_to_keep=1 +): + """Filter a distribution of logits using top-k and/or nucleus (top-p) filtering + Args: + logits: logits distribution shape (batch size, vocabulary size) + if top_k > 0: keep only top k tokens with highest probability (top-k filtering). + if top_p < 1.0: keep the top tokens with cumulative probability >= top_p (nucleus filtering). + Nucleus filtering is described in Holtzman et al. (http://arxiv.org/abs/1904.09751) + Make sure we keep at least min_tokens_to_keep per batch example in the output + From: https://gist.github.com/thomwolf/1a5a29f6962089e871b94cbd09daf317 + """ + if top_k > 0: + top_k = min( + max(top_k, min_tokens_to_keep), logits.size(-1) + ) # Safety check + # Remove all tokens with a probability less than the last token of the top-k + indices_to_remove = logits < torch.topk(logits, top_k)[0][..., -1, None] + logits[indices_to_remove] = filter_value + + if top_p < 1.0: + sorted_logits, sorted_indices = torch.sort(logits, descending=True) + cumulative_probs = torch.cumsum( + F.softmax(sorted_logits, dim=-1), dim=-1 + ) + + # Remove tokens with cumulative probability above the threshold (token with 0 are kept) + sorted_indices_to_remove = cumulative_probs > top_p + if min_tokens_to_keep > 1: + # Keep at least min_tokens_to_keep (set to min_tokens_to_keep-1 because we add the first one below) + sorted_indices_to_remove[..., :min_tokens_to_keep] = 0 + # Shift the indices to the right to keep also the first token above the threshold + sorted_indices_to_remove[..., 1:] = sorted_indices_to_remove[ + ..., :-1 + ].clone() + sorted_indices_to_remove[..., 0] = 0 + + # scatter sorted tensors to original indexing + indices_to_remove = sorted_indices_to_remove.scatter( + 1, sorted_indices, sorted_indices_to_remove + ) + logits[indices_to_remove] = filter_value + return logits + + +def topk_sampling(logits, top_k=10, top_p=1.0, temperature=1.0): + # temperature: (`optional`) float + # The value used to module the next token probabilities. Must be strictly positive. Default to 1.0. + # top_k: (`optional`) int + # The number of highest probability vocabulary tokens to keep for top-k-filtering. Between 1 and infinity. Default to 50. + # top_p: (`optional`) float + # The cumulative probability of parameter highest probability vocabulary tokens to keep for nucleus sampling. Must be between 0 and 1. Default to 1. + + # Temperature (higher temperature => more likely to sample low probability tokens) + if temperature != 1.0: + logits = logits / temperature + # Top-p/top-k filtering + logits = top_k_top_p_filtering(logits, top_k=top_k, top_p=top_p) + # Sample + token = torch.multinomial(F.softmax(logits, dim=-1), num_samples=1) + logprobs = F.log_softmax(logits.float(), dim=-1) + current_logprobs = logprobs[torch.arange(logprobs.shape[0]), token.squeeze(1)] + return token, current_logprobs diff --git a/models/visualizer.py b/models/visualizer.py new file mode 100644 index 0000000000000000000000000000000000000000..160390fdfacf905c614a4db0cb84af8bda04907d --- /dev/null +++ b/models/visualizer.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 +# Copyright 2023 (authors: Feiteng Li) +# +# See ../../../../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +from typing import Dict, List, Tuple, Union + +import matplotlib.pyplot as plt +import numpy as np +import torch + + +def visualize( + predicts: Tuple[torch.Tensor], + batch: Dict[str, Union[List, torch.Tensor]], + output_dir: str, + limit: int = 4, +) -> None: + text_tokens = batch["text_tokens"].to("cpu").detach().numpy() + text_tokens_lens = batch["text_tokens_lens"].to("cpu").detach().numpy() + audio_features = batch["audio_features"].to("cpu").detach().numpy() + audio_features_lens = ( + batch["audio_features_lens"].to("cpu").detach().numpy() + ) + assert text_tokens.ndim == 2 + + utt_ids, texts = batch["utt_id"], batch["text"] + + encoder_outputs = predicts[0].to("cpu").type(torch.float32).detach().numpy() + decoder_outputs = predicts[1] + if isinstance(decoder_outputs, list): + decoder_outputs = decoder_outputs[-1] + decoder_outputs = ( + decoder_outputs.to("cpu").type(torch.float32).detach().numpy() + ) + + vmin, vmax = 0, 1024 # Encodec + if decoder_outputs.dtype == np.float32: + vmin, vmax = -6, 0 # Fbank + + num_figures = 3 + for b, (utt_id, text) in enumerate(zip(utt_ids[:limit], texts[:limit])): + _ = plt.figure(figsize=(14, 8 * num_figures)) + + S = text_tokens_lens[b] + T = audio_features_lens[b] + + # encoder + plt.subplot(num_figures, 1, 1) + plt.title(f"Text: {text}") + plt.imshow( + X=np.transpose(encoder_outputs[b]), + cmap=plt.get_cmap("jet"), + aspect="auto", + interpolation="nearest", + ) + plt.gca().invert_yaxis() + plt.axvline(x=S - 0.4, linewidth=2, color="r") + plt.xlabel("Encoder Output") + plt.colorbar() + + # decoder + plt.subplot(num_figures, 1, 2) + plt.imshow( + X=np.transpose(decoder_outputs[b]), + cmap=plt.get_cmap("jet"), + aspect="auto", + interpolation="nearest", + vmin=vmin, + vmax=vmax, + ) + plt.gca().invert_yaxis() + plt.axvline(x=T - 0.4, linewidth=2, color="r") + plt.xlabel("Decoder Output") + plt.colorbar() + + # target + plt.subplot(num_figures, 1, 3) + plt.imshow( + X=np.transpose(audio_features[b]), + cmap=plt.get_cmap("jet"), + aspect="auto", + interpolation="nearest", + vmin=vmin, + vmax=vmax, + ) + plt.gca().invert_yaxis() + plt.axvline(x=T - 0.4, linewidth=2, color="r") + plt.xlabel("Decoder Target") + plt.colorbar() + + plt.savefig(f"{output_dir}/{utt_id}.png") + plt.close() diff --git a/modules/__init__.py b/modules/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/modules/activation.py b/modules/activation.py new file mode 100644 index 0000000000000000000000000000000000000000..e51c8eb49a378b039ed819820444f784fdc52dba --- /dev/null +++ b/modules/activation.py @@ -0,0 +1,612 @@ +from typing import Optional, Tuple, List +import math + +import torch +from torch import Tensor +from torch.nn import Linear, Module +from torch.nn import functional as F +from torch.nn.init import constant_, xavier_normal_, xavier_uniform_ +from torch.nn.modules.linear import NonDynamicallyQuantizableLinear +from torch.nn.parameter import Parameter + +def _in_projection_packed( + q: Tensor, + k: Tensor, + v: Tensor, + w: Tensor, + b: Optional[Tensor] = None, +) -> List[Tensor]: + r""" + Performs the in-projection step of the attention operation, using packed weights. + Output is a triple containing projection tensors for query, key and value. + + Args: + q, k, v: query, key and value tensors to be projected. For self-attention, + these are typically the same tensor; for encoder-decoder attention, + k and v are typically the same tensor. (We take advantage of these + identities for performance if they are present.) Regardless, q, k and v + must share a common embedding dimension; otherwise their shapes may vary. + w: projection weights for q, k and v, packed into a single tensor. Weights + are packed along dimension 0, in q, k, v order. + b: optional projection biases for q, k and v, packed into a single tensor + in q, k, v order. + + Shape: + Inputs: + - q: :math:`(..., E)` where E is the embedding dimension + - k: :math:`(..., E)` where E is the embedding dimension + - v: :math:`(..., E)` where E is the embedding dimension + - w: :math:`(E * 3, E)` where E is the embedding dimension + - b: :math:`E * 3` where E is the embedding dimension + + Output: + - in output list :math:`[q', k', v']`, each output tensor will have the + same shape as the corresponding input tensor. + """ + E = q.size(-1) + if k is v: + if q is k: + # self-attention + return F.linear(q, w, b).chunk(3, dim=-1) + else: + # encoder-decoder attention + w_q, w_kv = w.split([E, E * 2]) + if b is None: + b_q = b_kv = None + else: + b_q, b_kv = b.split([E, E * 2]) + return (F.linear(q, w_q, b_q),) + F.linear(k, w_kv, b_kv).chunk(2, dim=-1) + else: + w_q, w_k, w_v = w.chunk(3) + if b is None: + b_q = b_k = b_v = None + else: + b_q, b_k, b_v = b.chunk(3) + return F.linear(q, w_q, b_q), F.linear(k, w_k, b_k), F.linear(v, w_v, b_v) + +def _scaled_dot_product_attention( + q: Tensor, + k: Tensor, + v: Tensor, + attn_mask: Optional[Tensor] = None, + dropout_p: float = 0.0, +) -> Tuple[Tensor, Tensor]: + r""" + Computes scaled dot product attention on query, key and value tensors, using + an optional attention mask if passed, and applying dropout if a probability + greater than 0.0 is specified. + Returns a tensor pair containing attended values and attention weights. + + Args: + q, k, v: query, key and value tensors. See Shape section for shape details. + attn_mask: optional tensor containing mask values to be added to calculated + attention. May be 2D or 3D; see Shape section for details. + dropout_p: dropout probability. If greater than 0.0, dropout is applied. + + Shape: + - q: :math:`(B, Nt, E)` where B is batch size, Nt is the target sequence length, + and E is embedding dimension. + - key: :math:`(B, Ns, E)` where B is batch size, Ns is the source sequence length, + and E is embedding dimension. + - value: :math:`(B, Ns, E)` where B is batch size, Ns is the source sequence length, + and E is embedding dimension. + - attn_mask: either a 3D tensor of shape :math:`(B, Nt, Ns)` or a 2D tensor of + shape :math:`(Nt, Ns)`. + + - Output: attention values have shape :math:`(B, Nt, E)`; attention weights + have shape :math:`(B, Nt, Ns)` + """ + B, Nt, E = q.shape + q = q / math.sqrt(E) + # (B, Nt, E) x (B, E, Ns) -> (B, Nt, Ns) + if attn_mask is not None: + attn = torch.baddbmm(attn_mask, q, k.transpose(-2, -1)) + else: + attn = torch.bmm(q, k.transpose(-2, -1)) + + attn = F.softmax(attn, dim=-1) + if dropout_p > 0.0: + attn = F.dropout(attn, p=dropout_p) + # (B, Nt, Ns) x (B, Ns, E) -> (B, Nt, E) + output = torch.bmm(attn, v) + return output, attn + +def multi_head_attention_forward( + x, + ipw, + ipb, + opw, + opb, + n_head, + attn_mask, + past_kv=None, + use_cache=False, +): + # x = x.transpose(1, 0) + # tgt_len, bsz, embed_dim = x.shape + # head_dim = embed_dim // n_head + # q, k, v = _in_projection_packed(x, x, x, ipw, ipb) + # q = q.contiguous().view(tgt_len, bsz * n_head, head_dim).transpose(0, 1) + # k = k.contiguous().view(k.shape[0], bsz * n_head, head_dim).transpose(0, 1) + # v = v.contiguous().view(v.shape[0], bsz * n_head, head_dim).transpose(0, 1) + + # new_attn_mask = torch.zeros_like(attn_mask, dtype=q.dtype) + # new_attn_mask.masked_fill_(attn_mask, float("-inf")) + # attn_mask = new_attn_mask + # + # attn_output, attn_output_weights = _scaled_dot_product_attention(q, k, v, attn_mask, 0.0) + # attn_output = attn_output.transpose(0, 1).contiguous().view(tgt_len * bsz, embed_dim) + # attn_output = torch._C._nn.linear(attn_output, opw, opb) + # attn_output = attn_output.view(tgt_len, bsz, attn_output.size(1)) + + B, T, C = x.size() + + q, k, v = torch._C._nn.linear(x, ipw, ipb).chunk(3, dim=-1) + k = k.view(B, T, n_head, C // n_head).transpose(1, 2) # (B, nh, T, hs) + q = q.view(B, T, n_head, C // n_head).transpose(1, 2) # (B, nh, T, hs) + v = v.view(B, T, n_head, C // n_head).transpose(1, 2) # (B, nh, T, hs) + if past_kv is not None: + past_key = past_kv[0] + past_value = past_kv[1] + k = torch.cat((past_key, k), dim=-2) + v = torch.cat((past_value, v), dim=-2) + + FULL_T = k.shape[-2] + + if use_cache is True: + present = (k, v) + else: + present = None + + att = (q @ k.transpose(-2, -1)) * (1.0 / math.sqrt(k.size(-1))) + att = att.masked_fill(attn_mask[FULL_T - T:FULL_T, :FULL_T], float('-inf')) + att = F.softmax(att, dim=-1) + y = att @ v # (B, nh, T, T) x (B, nh, T, hs) -> (B, nh, T, hs) + y = y.transpose(1, 2).contiguous().view(B, T, C) # re-assemble all head outputs side by side + y = torch._C._nn.linear(y, opw, opb) + return (y, present) + + +class MultiheadAttention(Module): + r"""Allows the model to jointly attend to information + from different representation subspaces as described in the paper: + `Attention Is All You Need `_. + + Multi-Head Attention is defined as: + + .. math:: + \text{MultiHead}(Q, K, V) = \text{Concat}(head_1,\dots,head_h)W^O + + where :math:`head_i = \text{Attention}(QW_i^Q, KW_i^K, VW_i^V)`. + + ``forward()`` will use a special optimized implementation if all of the following + conditions are met: + + - self attention is being computed (i.e., ``query``, ``key``, and ``value`` are the same tensor. This + restriction will be loosened in the future.) + - Either autograd is disabled (using ``torch.inference_mode`` or ``torch.no_grad``) or no tensor argument ``requires_grad`` + - training is disabled (using ``.eval()``) + - dropout is 0 + - ``add_bias_kv`` is ``False`` + - ``add_zero_attn`` is ``False`` + - ``batch_first`` is ``True`` and the input is batched + - ``kdim`` and ``vdim`` are equal to ``embed_dim`` + - at most one of ``key_padding_mask`` or ``attn_mask`` is passed + - if a `NestedTensor `_ is passed, neither ``key_padding_mask`` + nor ``attn_mask`` is passed + + If the optimized implementation is in use, a + `NestedTensor `_ can be passed for + ``query``/``key``/``value`` to represent padding more efficiently than using a + padding mask. In this case, a `NestedTensor `_ + will be returned, and an additional speedup proportional to the fraction of the input + that is padding can be expected. + + Args: + embed_dim: Total dimension of the model. + num_heads: Number of parallel attention heads. Note that ``embed_dim`` will be split + across ``num_heads`` (i.e. each head will have dimension ``embed_dim // num_heads``). + dropout: Dropout probability on ``attn_output_weights``. Default: ``0.0`` (no dropout). + bias: If specified, adds bias to input / output projection layers. Default: ``True``. + add_bias_kv: If specified, adds bias to the key and value sequences at dim=0. Default: ``False``. + add_zero_attn: If specified, adds a new batch of zeros to the key and value sequences at dim=1. + Default: ``False``. + kdim: Total number of features for keys. Default: ``None`` (uses ``kdim=embed_dim``). + vdim: Total number of features for values. Default: ``None`` (uses ``vdim=embed_dim``). + batch_first: If ``True``, then the input and output tensors are provided + as (batch, seq, feature). Default: ``False`` (seq, batch, feature). + + Examples:: + + >>> # xdoctest: +SKIP + >>> multihead_attn = nn.MultiheadAttention(embed_dim, num_heads) + >>> attn_output, attn_output_weights = multihead_attn(query, key, value) + + """ + __constants__ = ["batch_first"] + bias_k: Optional[torch.Tensor] + bias_v: Optional[torch.Tensor] + + def __init__( + self, + embed_dim, + num_heads, + dropout=0.0, + bias=True, + add_bias_kv=False, + add_zero_attn=False, + kdim=None, + vdim=None, + batch_first=False, + linear1_cls=Linear, + linear2_cls=Linear, + device=None, + dtype=None, + ) -> None: + factory_kwargs = {"device": device, "dtype": dtype} + super(MultiheadAttention, self).__init__() + self.embed_dim = embed_dim + self.kdim = kdim if kdim is not None else embed_dim + self.vdim = vdim if vdim is not None else embed_dim + self._qkv_same_embed_dim = ( + self.kdim == embed_dim and self.vdim == embed_dim + ) + + self.num_heads = num_heads + self.dropout = dropout + self.batch_first = batch_first + self.head_dim = embed_dim // num_heads + assert ( + self.head_dim * num_heads == self.embed_dim + ), "embed_dim must be divisible by num_heads" + + if add_bias_kv: + self.bias_k = Parameter( + torch.empty((1, 1, embed_dim), **factory_kwargs) + ) + self.bias_v = Parameter( + torch.empty((1, 1, embed_dim), **factory_kwargs) + ) + else: + self.bias_k = self.bias_v = None + + if linear1_cls == Linear: + if not self._qkv_same_embed_dim: + self.q_proj_weight = Parameter( + torch.empty((embed_dim, embed_dim), **factory_kwargs) + ) + self.k_proj_weight = Parameter( + torch.empty((embed_dim, self.kdim), **factory_kwargs) + ) + self.v_proj_weight = Parameter( + torch.empty((embed_dim, self.vdim), **factory_kwargs) + ) + self.register_parameter("in_proj_weight", None) + else: + self.in_proj_weight = Parameter( + torch.empty((3 * embed_dim, embed_dim), **factory_kwargs) + ) + self.register_parameter("q_proj_weight", None) + self.register_parameter("k_proj_weight", None) + self.register_parameter("v_proj_weight", None) + + if bias: + self.in_proj_bias = Parameter( + torch.empty(3 * embed_dim, **factory_kwargs) + ) + else: + self.register_parameter("in_proj_bias", None) + self.out_proj = NonDynamicallyQuantizableLinear( + embed_dim, embed_dim, bias=bias, **factory_kwargs + ) + + self._reset_parameters() + else: + if not self._qkv_same_embed_dim: + raise NotImplementedError + else: + self.in_proj_linear = linear1_cls( + embed_dim, 3 * embed_dim, bias=bias, **factory_kwargs + ) + self.in_proj_weight = self.in_proj_linear.weight + + self.register_parameter("q_proj_weight", None) + self.register_parameter("k_proj_weight", None) + self.register_parameter("v_proj_weight", None) + + if bias: + self.in_proj_bias = self.in_proj_linear.bias + else: + self.register_parameter("in_proj_bias", None) + + self.out_proj = linear2_cls( + embed_dim, embed_dim, bias=bias, **factory_kwargs + ) + + if self.bias_k is not None: + xavier_normal_(self.bias_k) + if self.bias_v is not None: + xavier_normal_(self.bias_v) + + self.add_zero_attn = add_zero_attn + + def _reset_parameters(self): + if self._qkv_same_embed_dim: + xavier_uniform_(self.in_proj_weight) + else: + xavier_uniform_(self.q_proj_weight) + xavier_uniform_(self.k_proj_weight) + xavier_uniform_(self.v_proj_weight) + + if self.in_proj_bias is not None: + constant_(self.in_proj_bias, 0.0) + constant_(self.out_proj.bias, 0.0) + + if self.bias_k is not None: + xavier_normal_(self.bias_k) + if self.bias_v is not None: + xavier_normal_(self.bias_v) + + def __setstate__(self, state): + # Support loading old MultiheadAttention checkpoints generated by v1.1.0 + if "_qkv_same_embed_dim" not in state: + state["_qkv_same_embed_dim"] = True + + super(MultiheadAttention, self).__setstate__(state) + + def forward( + self, + query: Tensor, + key: Tensor, + value: Tensor, + key_padding_mask: Optional[Tensor] = None, + need_weights: bool = True, + attn_mask: Optional[Tensor] = None, + average_attn_weights: bool = True, + ) -> Tuple[Tensor, Optional[Tensor]]: + r""" + Args: + query: Query embeddings of shape :math:`(L, E_q)` for unbatched input, :math:`(L, N, E_q)` when ``batch_first=False`` + or :math:`(N, L, E_q)` when ``batch_first=True``, where :math:`L` is the target sequence length, + :math:`N` is the batch size, and :math:`E_q` is the query embedding dimension ``embed_dim``. + Queries are compared against key-value pairs to produce the output. + See "Attention Is All You Need" for more details. + key: Key embeddings of shape :math:`(S, E_k)` for unbatched input, :math:`(S, N, E_k)` when ``batch_first=False`` + or :math:`(N, S, E_k)` when ``batch_first=True``, where :math:`S` is the source sequence length, + :math:`N` is the batch size, and :math:`E_k` is the key embedding dimension ``kdim``. + See "Attention Is All You Need" for more details. + value: Value embeddings of shape :math:`(S, E_v)` for unbatched input, :math:`(S, N, E_v)` when + ``batch_first=False`` or :math:`(N, S, E_v)` when ``batch_first=True``, where :math:`S` is the source + sequence length, :math:`N` is the batch size, and :math:`E_v` is the value embedding dimension ``vdim``. + See "Attention Is All You Need" for more details. + key_padding_mask: If specified, a mask of shape :math:`(N, S)` indicating which elements within ``key`` + to ignore for the purpose of attention (i.e. treat as "padding"). For unbatched `query`, shape should be :math:`(S)`. + Binary and byte masks are supported. + For a binary mask, a ``True`` value indicates that the corresponding ``key`` value will be ignored for + the purpose of attention. For a float mask, it will be directly added to the corresponding ``key`` value. + need_weights: If specified, returns ``attn_output_weights`` in addition to ``attn_outputs``. + Default: ``True``. + attn_mask: If specified, a 2D or 3D mask preventing attention to certain positions. Must be of shape + :math:`(L, S)` or :math:`(N\cdot\text{num\_heads}, L, S)`, where :math:`N` is the batch size, + :math:`L` is the target sequence length, and :math:`S` is the source sequence length. A 2D mask will be + broadcasted across the batch while a 3D mask allows for a different mask for each entry in the batch. + Binary, byte, and float masks are supported. For a binary mask, a ``True`` value indicates that the + corresponding position is not allowed to attend. For a byte mask, a non-zero value indicates that the + corresponding position is not allowed to attend. For a float mask, the mask values will be added to + the attention weight. + average_attn_weights: If true, indicates that the returned ``attn_weights`` should be averaged across + heads. Otherwise, ``attn_weights`` are provided separately per head. Note that this flag only has an + effect when ``need_weights=True``. Default: ``True`` (i.e. average weights across heads) + + Outputs: + - **attn_output** - Attention outputs of shape :math:`(L, E)` when input is unbatched, + :math:`(L, N, E)` when ``batch_first=False`` or :math:`(N, L, E)` when ``batch_first=True``, + where :math:`L` is the target sequence length, :math:`N` is the batch size, and :math:`E` is the + embedding dimension ``embed_dim``. + - **attn_output_weights** - Only returned when ``need_weights=True``. If ``average_attn_weights=True``, + returns attention weights averaged across heads of shape :math:`(L, S)` when input is unbatched or + :math:`(N, L, S)`, where :math:`N` is the batch size, :math:`L` is the target sequence length, and + :math:`S` is the source sequence length. If ``average_attn_weights=False``, returns attention weights per + head of shape :math:`(\text{num\_heads}, L, S)` when input is unbatched or :math:`(N, \text{num\_heads}, L, S)`. + + .. note:: + `batch_first` argument is ignored for unbatched inputs. + """ + is_batched = query.dim() == 3 + if key_padding_mask is not None: + _kpm_dtype = key_padding_mask.dtype + if _kpm_dtype != torch.bool and not torch.is_floating_point( + key_padding_mask + ): + raise AssertionError( + "only bool and floating types of key_padding_mask are supported" + ) + why_not_fast_path = "" + if not is_batched: + why_not_fast_path = f"input not batched; expected query.dim() of 3 but got {query.dim()}" + elif query is not key or key is not value: + # When lifting this restriction, don't forget to either + # enforce that the dtypes all match or test cases where + # they don't! + why_not_fast_path = "non-self attention was used (query, key, and value are not the same Tensor)" + elif ( + self.in_proj_bias is not None + and query.dtype != self.in_proj_bias.dtype + ): + why_not_fast_path = f"dtypes of query ({query.dtype}) and self.in_proj_bias ({self.in_proj_bias.dtype}) don't match" + elif ( + self.in_proj_weight is not None + and query.dtype != self.in_proj_weight.dtype + ): + # this case will fail anyway, but at least they'll get a useful error message. + why_not_fast_path = f"dtypes of query ({query.dtype}) and self.in_proj_weight ({self.in_proj_weight.dtype}) don't match" + elif self.training: + why_not_fast_path = "training is enabled" + elif not self.batch_first: + why_not_fast_path = "batch_first was not True" + elif self.bias_k is not None: + why_not_fast_path = "self.bias_k was not None" + elif self.bias_v is not None: + why_not_fast_path = "self.bias_v was not None" + elif self.dropout: + why_not_fast_path = f"dropout was {self.dropout}, required zero" + elif self.add_zero_attn: + why_not_fast_path = "add_zero_attn was enabled" + elif not self._qkv_same_embed_dim: + why_not_fast_path = "_qkv_same_embed_dim was not True" + elif attn_mask is not None: + why_not_fast_path = "attn_mask was not None" + elif query.is_nested and key_padding_mask is not None: + why_not_fast_path = ( + "key_padding_mask is not supported with NestedTensor input" + ) + elif self.num_heads % 2 == 1: + why_not_fast_path = "num_heads is odd" + elif torch.is_autocast_enabled(): + why_not_fast_path = "autocast is enabled" + + if not why_not_fast_path: + tensor_args = ( + query, + key, + value, + self.in_proj_weight, + self.in_proj_bias, + self.out_proj.weight, + self.out_proj.bias, + ) + # We have to use list comprehensions below because TorchScript does not support + # generator expressions. + if torch.overrides.has_torch_function(tensor_args): + why_not_fast_path = "some Tensor argument has_torch_function" + elif not all( + [ + (x is None or x.is_cuda or "cpu" in str(x.device)) + for x in tensor_args + ] + ): + why_not_fast_path = ( + "some Tensor argument is neither CUDA nor CPU" + ) + elif torch.is_grad_enabled() and any( + [x is not None and x.requires_grad for x in tensor_args] + ): + why_not_fast_path = ( + "grad is enabled and at least one of query or the " + "input/output projection weights or biases requires_grad" + ) + if not why_not_fast_path: + return torch._native_multi_head_attention( + query, + key, + value, + self.embed_dim, + self.num_heads, + self.in_proj_weight, + self.in_proj_bias, + self.out_proj.weight, + self.out_proj.bias, + key_padding_mask + if key_padding_mask is not None + else attn_mask, + need_weights, + average_attn_weights, + 1 + if key_padding_mask is not None + else 0 + if attn_mask is not None + else None, + ) + + any_nested = query.is_nested or key.is_nested or value.is_nested + assert not any_nested, ( + "MultiheadAttention does not support NestedTensor outside of its fast path. " + + f"The fast path was not hit because {why_not_fast_path}" + ) + + if self.batch_first and is_batched: + # make sure that the transpose op does not affect the "is" property + if key is value: + if query is key: + query = key = value = query.transpose(1, 0) + else: + query, key = [x.transpose(1, 0) for x in (query, key)] + value = key + else: + query, key, value = [ + x.transpose(1, 0) for x in (query, key, value) + ] + + if not self._qkv_same_embed_dim: + attn_output, attn_output_weights = F.multi_head_attention_forward( + query, + key, + value, + self.embed_dim, + self.num_heads, + self.in_proj_weight, + self.in_proj_bias, + self.bias_k, + self.bias_v, + self.add_zero_attn, + self.dropout, + self.out_proj.weight, + self.out_proj.bias, + training=self.training, + key_padding_mask=key_padding_mask, + need_weights=need_weights, + attn_mask=attn_mask, + use_separate_proj_weight=True, + q_proj_weight=self.q_proj_weight, + k_proj_weight=self.k_proj_weight, + v_proj_weight=self.v_proj_weight, + average_attn_weights=average_attn_weights, + ) + else: + attn_output, attn_output_weights = F.multi_head_attention_forward( + query, + key, + value, + self.embed_dim, + self.num_heads, + self.in_proj_weight, + self.in_proj_bias, + self.bias_k, + self.bias_v, + self.add_zero_attn, + self.dropout, + self.out_proj.weight, + self.out_proj.bias, + training=self.training, + key_padding_mask=key_padding_mask, + need_weights=need_weights, + attn_mask=attn_mask, + average_attn_weights=average_attn_weights, + ) + if self.batch_first and is_batched: + return attn_output.transpose(1, 0), attn_output_weights + else: + return attn_output, attn_output_weights + + def infer(self, + x: Tensor, + key_padding_mask: Optional[Tensor] = None, + need_weights: bool = True, + attn_mask: Optional[Tensor] = None, + average_attn_weights: bool = True, + past_kv = None, + use_cache = False + ): + # x = x.transpose(1, 0) + y, kv = multi_head_attention_forward( + x=x, + ipw=self.in_proj_weight, + ipb=self.in_proj_bias, + opw=self.out_proj.weight, + opb=self.out_proj.bias, + n_head=self.num_heads, + attn_mask=attn_mask, + past_kv=past_kv, + use_cache=use_cache, + ) + return (y, kv) diff --git a/modules/embedding.py b/modules/embedding.py new file mode 100644 index 0000000000000000000000000000000000000000..17f6c316da3de6a432f4d43f9563800fdb6d58c4 --- /dev/null +++ b/modules/embedding.py @@ -0,0 +1,97 @@ +# Copyright 2023 (authors: Feiteng Li) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import math + +import torch +import torch.nn as nn + + +class TokenEmbedding(nn.Module): + def __init__( + self, + dim_model: int, + vocab_size: int, + dropout: float = 0.0, + ): + super().__init__() + + self.vocab_size = vocab_size + self.dim_model = dim_model + + self.dropout = torch.nn.Dropout(p=dropout) + self.word_embeddings = nn.Embedding(self.vocab_size, self.dim_model) + + @property + def weight(self) -> torch.Tensor: + return self.word_embeddings.weight + + def embedding(self, index: int) -> torch.Tensor: + return self.word_embeddings.weight[index : index + 1] + + def forward(self, x: torch.Tensor): + X = self.word_embeddings(x) + X = self.dropout(X) + + return X + + +class SinePositionalEmbedding(nn.Module): + def __init__( + self, + dim_model: int, + dropout: float = 0.0, + scale: bool = False, + alpha: bool = False, + ): + super().__init__() + self.dim_model = dim_model + self.x_scale = math.sqrt(dim_model) if scale else 1.0 + self.alpha = nn.Parameter(torch.ones(1), requires_grad=alpha) + self.dropout = torch.nn.Dropout(p=dropout) + + self.reverse = False + self.pe = None + self.extend_pe(torch.tensor(0.0).expand(1, 4000)) + + def extend_pe(self, x): + """Reset the positional encodings.""" + if self.pe is not None: + if self.pe.size(1) >= x.size(1): + if self.pe.dtype != x.dtype or self.pe.device != x.device: + self.pe = self.pe.to(dtype=x.dtype, device=x.device) + return + pe = torch.zeros(x.size(1), self.dim_model) + if self.reverse: + position = torch.arange( + x.size(1) - 1, -1, -1.0, dtype=torch.float32 + ).unsqueeze(1) + else: + position = torch.arange( + 0, x.size(1), dtype=torch.float32 + ).unsqueeze(1) + div_term = torch.exp( + torch.arange(0, self.dim_model, 2, dtype=torch.float32) + * -(math.log(10000.0) / self.dim_model) + ) + pe[:, 0::2] = torch.sin(position * div_term) + pe[:, 1::2] = torch.cos(position * div_term) + pe = pe.unsqueeze(0) + self.pe = pe.to(device=x.device, dtype=x.dtype).detach() + + def forward(self, x: torch.Tensor) -> torch.Tensor: + self.extend_pe(x) + output = x.unsqueeze(-1) if x.ndim == 2 else x + output = output * self.x_scale + self.alpha * self.pe[:, : x.size(1)] + return self.dropout(output) diff --git a/modules/optim.py b/modules/optim.py new file mode 100644 index 0000000000000000000000000000000000000000..8e590836de83d7de8a70e85fb53f59d4440e05f7 --- /dev/null +++ b/modules/optim.py @@ -0,0 +1,1105 @@ +# Copyright 2022 Xiaomi Corp. (authors: Daniel Povey) +# +# See ../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import contextlib +import logging +import random +from collections import defaultdict +from typing import List, Optional, Tuple, Union + +import torch +from lhotse.utils import fix_random_seed +from torch import Tensor +from torch.optim import Optimizer + + +class BatchedOptimizer(Optimizer): + """ + This class adds to class Optimizer the capability to optimize parameters in batches: + it will stack the parameters and their grads for you so the optimizer can work + on tensors with an extra leading dimension. This is intended for speed with GPUs, + as it reduces the number of kernels launched in the optimizer. + + Args: + params: + """ + + def __init__(self, params, defaults): + super(BatchedOptimizer, self).__init__(params, defaults) + + @contextlib.contextmanager + def batched_params(self, param_group, group_params_names): + """ + This function returns (technically, yields) a list of + of tuples (p, state), where + p is a `fake` parameter that is stacked (over axis 0) from real parameters + that share the same shape, and its gradient is also stacked; + `state` is the state corresponding to this batch of parameters + (it will be physically located in the "state" for one of the real + parameters, the last one that has any particular shape and dtype). + + This function is decorated as a context manager so that it can + write parameters back to their "real" locations. + + The idea is, instead of doing: + + for p in group["params"]: + state = self.state[p] + ... + + you can do: + + with self.batched_params(group["params"]) as batches: + for p, state, p_names in batches: + ... + + + Args: + group: a parameter group, which is a list of parameters; should be + one of self.param_groups. + group_params_names: name for each parameter in group, + which is List[str]. + """ + batches = defaultdict( + list + ) # `batches` maps from tuple (dtype_as_str,*shape) to list of nn.Parameter + batches_names = defaultdict( + list + ) # `batches` maps from tuple (dtype_as_str,*shape) to list of str + + assert len(param_group) == len(group_params_names) + for p, named_p in zip(param_group, group_params_names): + key = (str(p.dtype), *p.shape) + batches[key].append(p) + batches_names[key].append(named_p) + + batches_names_keys = list(batches_names.keys()) + sorted_idx = sorted( + range(len(batches_names)), key=lambda i: batches_names_keys[i] + ) + batches_names = [ + batches_names[batches_names_keys[idx]] for idx in sorted_idx + ] + batches = [batches[batches_names_keys[idx]] for idx in sorted_idx] + + stacked_params_dict = dict() + + # turn batches into a list, in deterministic order. + # tuples will contain tuples of (stacked_param, state, stacked_params_names), + # one for each batch in `batches`. + tuples = [] + + for batch, batch_names in zip(batches, batches_names): + p = batch[0] + # we arbitrarily store the state in the + # state corresponding to the 1st parameter in the + # group. class Optimizer will take care of saving/loading state. + state = self.state[p] + p_stacked = torch.stack(batch) + grad = torch.stack( + [ + torch.zeros_like(p) if p.grad is None else p.grad + for p in batch + ] + ) + p_stacked.grad = grad + stacked_params_dict[key] = p_stacked + tuples.append((p_stacked, state, batch_names)) + + yield tuples # <-- calling code will do the actual optimization here! + + for ((stacked_params, _state, _names), batch) in zip(tuples, batches): + for i, p in enumerate(batch): # batch is list of Parameter + p.copy_(stacked_params[i]) + + +class ScaledAdam(BatchedOptimizer): + """ + Implements 'Scaled Adam', a variant of Adam where we scale each parameter's update + proportional to the norm of that parameter; and also learn the scale of the parameter, + in log space, subject to upper and lower limits (as if we had factored each parameter as + param = underlying_param * log_scale.exp()) + + + Args: + params: The parameters or param_groups to optimize (like other Optimizer subclasses) + lr: The learning rate. We will typically use a learning rate schedule that starts + at 0.03 and decreases over time, i.e. much higher than other common + optimizers. + clipping_scale: (e.g. 2.0) + A scale for gradient-clipping: if specified, the normalized gradients + over the whole model will be clipped to have 2-norm equal to + `clipping_scale` times the median 2-norm over the most recent period + of `clipping_update_period` minibatches. By "normalized gradients", + we mean after multiplying by the rms parameter value for this tensor + [for non-scalars]; this is appropriate because our update is scaled + by this quantity. + betas: beta1,beta2 are momentum constants for regular momentum, and moving sum-sq grad. + Must satisfy 0 < beta <= beta2 < 1. + scalar_lr_scale: A scaling factor on the learning rate, that we use to update the + scale of each parameter tensor and scalar parameters of the mode.. + If each parameter were decomposed + as p * p_scale.exp(), where (p**2).mean().sqrt() == 1.0, scalar_lr_scale + would be a the scaling factor on the learning rate of p_scale. + eps: A general-purpose epsilon to prevent division by zero + param_min_rms: Minimum root-mean-square value of parameter tensor, for purposes of + learning the scale on the parameters (we'll constrain the rms of each non-scalar + parameter tensor to be >= this value) + param_max_rms: Maximum root-mean-square value of parameter tensor, for purposes of + learning the scale on the parameters (we'll constrain the rms of each non-scalar + parameter tensor to be <= this value) + scalar_max: Maximum absolute value for scalar parameters (applicable if your + model has any parameters with numel() == 1). + size_update_period: The periodicity, in steps, with which we update the size (scale) + of the parameter tensor. This is provided to save a little time + in the update. + clipping_update_period: if clipping_scale is specified, this is the period + """ + + def __init__( + self, + params, + lr=3e-02, + clipping_scale=None, + betas=(0.9, 0.98), + scalar_lr_scale=0.1, + eps=1.0e-08, + param_min_rms=1.0e-05, + param_max_rms=3.0, + scalar_max=10.0, + size_update_period=4, + clipping_update_period=100, + parameters_names=None, + show_dominant_parameters=True, + ): + + assert parameters_names is not None, ( + "Please prepare parameters_names," + "which is a List[List[str]]. Each List[str] is for a group" + "and each str is for a parameter" + ) + defaults = dict( + lr=lr, + clipping_scale=clipping_scale, + betas=betas, + scalar_lr_scale=scalar_lr_scale, + eps=eps, + param_min_rms=param_min_rms, + param_max_rms=param_max_rms, + scalar_max=scalar_max, + size_update_period=size_update_period, + clipping_update_period=clipping_update_period, + ) + + super(ScaledAdam, self).__init__(params, defaults) + assert len(self.param_groups) == len(parameters_names) + self.parameters_names = parameters_names + self.show_dominant_parameters = show_dominant_parameters + + def __setstate__(self, state): + super(ScaledAdam, self).__setstate__(state) + + @torch.no_grad() + def step(self, closure=None): + """Performs a single optimization step. + + Arguments: + closure (callable, optional): A closure that reevaluates the model + and returns the loss. + """ + loss = None + if closure is not None: + with torch.enable_grad(): + loss = closure() + + batch = True + + for group, group_params_names in zip( + self.param_groups, self.parameters_names + ): + + with self.batched_params( + group["params"], group_params_names + ) as batches: + + # batches is list of pairs (stacked_param, state). stacked_param is like + # a regular parameter, and will have a .grad, but the 1st dim corresponds to + # a stacking dim, it is not a real dim. + + if ( + len(batches[0][1]) == 0 + ): # if len(first state) == 0: not yet initialized + clipping_scale = 1 + else: + clipping_scale = self._get_clipping_scale(group, batches) + + for p, state, _ in batches: + # Perform optimization step. + # grad is not going to be None, we handled that when creating the batches. + grad = p.grad + if grad.is_sparse: + raise RuntimeError( + "ScaledAdam optimizer does not support sparse gradients" + ) + # State initialization + if len(state) == 0: + self._init_state(group, p, state) + + self._step_one_batch(group, p, state, clipping_scale) + + return loss + + def _init_state(self, group: dict, p: Tensor, state: dict): + """ + Initializes state dict for parameter 'p'. Assumes that dim 0 of tensor p + is actually the batch dimension, corresponding to batched-together + parameters of a given shape. + + + Args: + group: Dict to look up configuration values. + p: The parameter that we are initializing the state for + state: Dict from string to whatever state we are initializing + """ + size_update_period = group["size_update_period"] + + state["step"] = 0 + + kwargs = {"device": p.device, "dtype": p.dtype} + + # 'delta' implements conventional momentum. There are + # several different kinds of update going on, so rather than + # compute "exp_avg" like in Adam, we store and decay a + # parameter-change "delta", which combines all forms of + # update. this is equivalent to how it's done in Adam, + # except for the first few steps. + state["delta"] = torch.zeros_like( + p, memory_format=torch.preserve_format + ) + + batch_size = p.shape[0] + numel = p.numel() // batch_size + numel = p.numel() + + if numel > 1: + # "param_rms" just periodically records the scalar root-mean-square value of + # the parameter tensor. + # it has a shape like (batch_size, 1, 1, 1, 1) + param_rms = ( + (p ** 2).mean(dim=list(range(1, p.ndim)), keepdim=True).sqrt() + ) + state["param_rms"] = param_rms + + state["scale_exp_avg_sq"] = torch.zeros_like(param_rms) + state["scale_grads"] = torch.zeros( + size_update_period, *param_rms.shape, **kwargs + ) + + # exp_avg_sq is the weighted sum of scaled gradients. as in Adam. + state["exp_avg_sq"] = torch.zeros_like( + p, memory_format=torch.preserve_format + ) + + def _get_clipping_scale( + self, group: dict, tuples: List[Tuple[Tensor, dict, List[str]]] + ) -> float: + """ + Returns a scalar factor <= 1.0 that dictates gradient clipping, i.e. we will scale the gradients + by this amount before applying the rest of the update. + + Args: + group: the parameter group, an item in self.param_groups + tuples: a list of tuples of (param, state, param_names) + where param is a batched set of parameters, + with a .grad (1st dim is batch dim) + and state is the state-dict where optimization parameters are kept. + param_names is a List[str] while each str is name for a parameter + in batched set of parameters "param". + """ + assert len(tuples) >= 1 + clipping_scale = group["clipping_scale"] + (first_p, first_state, _) = tuples[0] + step = first_state["step"] + if clipping_scale is None or step == 0: + # no clipping. return early on step == 0 because the other + # parameters' state won't have been initialized yet. + return 1.0 + clipping_update_period = group["clipping_update_period"] + + tot_sumsq = torch.tensor(0.0, device=first_p.device) + for (p, state, param_names) in tuples: + grad = p.grad + if grad.is_sparse: + raise RuntimeError( + "ScaledAdam optimizer does not support sparse gradients" + ) + if p.numel() == p.shape[0]: # a batch of scalars + tot_sumsq += ( + grad ** 2 + ).sum() # sum() to change shape [1] to [] + else: + tot_sumsq += ((grad * state["param_rms"]) ** 2).sum() + + tot_norm = tot_sumsq.sqrt() + if "model_norms" not in first_state: + first_state["model_norms"] = torch.zeros( + clipping_update_period, device=p.device + ) + first_state["model_norms"][step % clipping_update_period] = tot_norm + + if step % clipping_update_period == 0: + # Print some stats. + # We don't reach here if step == 0 because we would have returned + # above. + sorted_norms = first_state["model_norms"].sort()[0].to("cpu") + quartiles = [] + for n in range(0, 5): + index = min( + clipping_update_period - 1, + (clipping_update_period // 4) * n, + ) + quartiles.append(sorted_norms[index].item()) + + median = quartiles[2] + threshold = clipping_scale * median + first_state["model_norm_threshold"] = threshold + percent_clipped = ( + first_state["num_clipped"] * 100.0 / clipping_update_period + if "num_clipped" in first_state + else 0.0 + ) + first_state["num_clipped"] = 0 + quartiles = " ".join(["%.3e" % x for x in quartiles]) + logging.info( + f"Clipping_scale={clipping_scale}, grad-norm quartiles {quartiles}, " + f"threshold={threshold:.3e}, percent-clipped={percent_clipped:.1f}" + ) + + if step < clipping_update_period: + return 1.0 # We have not yet estimated a norm to clip to. + else: + try: + model_norm_threshold = first_state["model_norm_threshold"] + except KeyError: + logging.info( + "Warning: model_norm_threshold not in state: possibly " + "you changed config when restarting, adding clipping_scale option?" + ) + return 1.0 + ans = min(1.0, (model_norm_threshold / (tot_norm + 1.0e-20)).item()) + if ans < 1.0: + first_state["num_clipped"] += 1 + if ans < 0.1: + logging.warn( + f"Scaling gradients by {ans}, model_norm_threshold={model_norm_threshold}" + ) + if self.show_dominant_parameters: + assert p.shape[0] == len(param_names) + self._show_gradient_dominating_parameter(tuples, tot_sumsq) + return ans + + def _show_gradient_dominating_parameter( + self, tuples: List[Tuple[Tensor, dict, List[str]]], tot_sumsq: Tensor + ): + """ + Show information of parameter wihch dominanting tot_sumsq. + + Args: + tuples: a list of tuples of (param, state, param_names) + where param is a batched set of parameters, + with a .grad (1st dim is batch dim) + and state is the state-dict where optimization parameters are kept. + param_names is a List[str] while each str is name for a parameter + in batched set of parameters "param". + tot_sumsq: sumsq of all parameters. Though it's could be calculated + from tuples, we still pass it to save some time. + """ + all_sumsq_orig = {} + for (p, state, batch_param_names) in tuples: + # p is a stacked batch parameters. + batch_grad = p.grad + if p.numel() == p.shape[0]: # a batch of scalars + batch_sumsq_orig = batch_grad ** 2 + # Dummpy values used by following `zip` statement. + batch_rms_orig = torch.ones(p.shape[0]) + else: + batch_rms_orig = state["param_rms"] + batch_sumsq_orig = ((batch_grad * batch_rms_orig) ** 2).sum( + dim=list(range(1, batch_grad.ndim)) + ) + + for name, sumsq_orig, rms, grad in zip( + batch_param_names, batch_sumsq_orig, batch_rms_orig, batch_grad + ): + + proportion_orig = sumsq_orig / tot_sumsq + all_sumsq_orig[name] = (proportion_orig, sumsq_orig, rms, grad) + + assert torch.isclose( + sum([value[0] for value in all_sumsq_orig.values()]).cpu(), + torch.tensor(1.0), + ) + sorted_by_proportion = { + k: v + for k, v in sorted( + all_sumsq_orig.items(), + key=lambda item: item[1][0], + reverse=True, + ) + } + dominant_param_name = next(iter(sorted_by_proportion)) + ( + dominant_proportion, + dominant_sumsq, + dominant_rms, + dominant_grad, + ) = sorted_by_proportion[dominant_param_name] + logging.info( + f"Parameter Dominanting tot_sumsq {dominant_param_name}" + f" with proportion {dominant_proportion:.2f}," + f" where dominant_sumsq=(grad_sumsq*orig_rms_sq)" + f"={dominant_sumsq:.3e}," + f" grad_sumsq = {(dominant_grad**2).sum():.3e}," + f" orig_rms_sq={(dominant_rms**2).item():.3e}" + ) + + def _step_one_batch( + self, group: dict, p: Tensor, state: dict, clipping_scale: float + ): + """ + Do the step for one parameter, which is actually going to be a batch of + `real` parameters, with dim 0 as the batch dim. + Args: + group: dict to look up configuration values + p: parameter to update (actually multiple parameters stacked together + as a batch) + state: state-dict for p, to look up the optimizer state + """ + lr = group["lr"] + size_update_period = group["size_update_period"] + beta1 = group["betas"][0] + + grad = p.grad + if clipping_scale != 1.0: + grad = grad * clipping_scale + step = state["step"] + delta = state["delta"] + + delta.mul_(beta1) + batch_size = p.shape[0] + numel = p.numel() // batch_size + if numel > 1: + # Update the size/scale of p, and set param_rms + scale_grads = state["scale_grads"] + scale_grads[step % size_update_period] = (p * grad).sum( + dim=list(range(1, p.ndim)), keepdim=True + ) + if step % size_update_period == size_update_period - 1: + param_rms = state["param_rms"] # shape: (batch_size, 1, 1, ..) + param_rms.copy_( + (p ** 2) + .mean(dim=list(range(1, p.ndim)), keepdim=True) + .sqrt() + ) + if step > 0: + # self._size_update() learns the overall scale on the + # parameter, by shrinking or expanding it. + self._size_update(group, scale_grads, p, state) + + if numel == 1: + # For parameters with 1 element we just use regular Adam. + # Updates delta. + self._step_scalar(group, p, state) + else: + self._step(group, p, state) + + state["step"] = step + 1 + + def _size_update( + self, group: dict, scale_grads: Tensor, p: Tensor, state: dict + ) -> None: + """ + Called only where p.numel() > 1, this updates the scale of the parameter. + If we imagine: p = underlying_param * scale.exp(), and we are doing + gradient descent on underlying param and on scale, this function does the update + on `scale`. + + Args: + group: dict to look up configuration values + scale_grads: a tensor of shape (size_update_period, batch_size, 1, 1,...) containing + grads w.r.t. the scales. + p: The parameter to update + state: The state-dict of p + """ + + param_rms = state["param_rms"] + beta1, beta2 = group["betas"] + size_lr = group["lr"] * group["scalar_lr_scale"] + param_min_rms = group["param_min_rms"] + param_max_rms = group["param_max_rms"] + eps = group["eps"] + step = state["step"] + batch_size = p.shape[0] + + size_update_period = scale_grads.shape[0] + # correct beta2 for the size update period: we will have + # faster decay at this level. + beta2_corr = beta2 ** size_update_period + + scale_exp_avg_sq = state[ + "scale_exp_avg_sq" + ] # shape: (batch_size, 1, 1, ..) + scale_exp_avg_sq.mul_(beta2_corr).add_( + (scale_grads ** 2).mean( + dim=0 + ), # mean over dim `size_update_period` + alpha=1 - beta2_corr, + ) # shape is (batch_size, 1, 1, ...) + + # The 1st time we reach here is when size_step == 1. + size_step = (step + 1) // size_update_period + bias_correction2 = 1 - beta2_corr ** size_step + # we don't bother with bias_correction1; this will help prevent divergence + # at the start of training. + + denom = scale_exp_avg_sq.sqrt() + eps + + scale_step = ( + -size_lr + * (bias_correction2 ** 0.5) + * scale_grads.sum(dim=0) + / denom + ) + + is_too_small = param_rms < param_min_rms + is_too_large = param_rms > param_max_rms + + # when the param gets too small, just don't shrink it any further. + scale_step.masked_fill_(is_too_small, 0.0) + # when it gets too large, stop it from getting any larger. + scale_step.masked_fill_(is_too_large, -size_lr * size_update_period) + delta = state["delta"] + # the factor of (1-beta1) relates to momentum. + delta.add_(p * scale_step, alpha=(1 - beta1)) + + def _step(self, group: dict, p: Tensor, state: dict): + """ + This function does the core update of self.step(), in the case where the members of + the batch have more than 1 element. + + Args: + group: A dict which will be used to look up configuration values + p: The parameter to be updated + grad: The grad of p + state: The state-dict corresponding to parameter p + + This function modifies p. + """ + grad = p.grad + lr = group["lr"] + beta1, beta2 = group["betas"] + eps = group["eps"] + param_min_rms = group["param_min_rms"] + step = state["step"] + + exp_avg_sq = state["exp_avg_sq"] + exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=(1 - beta2)) + + this_step = state["step"] - ( + state["zero_step"] if "zero_step" in state else 0 + ) + bias_correction2 = 1 - beta2 ** (this_step + 1) + if bias_correction2 < 0.99: + # note: not in-place. + exp_avg_sq = exp_avg_sq * (1.0 / bias_correction2) + + denom = exp_avg_sq.sqrt() + denom += eps + grad = grad / denom + + alpha = -lr * (1 - beta1) * state["param_rms"].clamp(min=param_min_rms) + + delta = state["delta"] + delta.add_(grad * alpha) + p.add_(delta) + + def _step_scalar(self, group: dict, p: Tensor, state: dict): + """ + A simplified form of the core update for scalar tensors, where we cannot get a good + estimate of the parameter rms. + """ + beta1, beta2 = group["betas"] + scalar_max = group["scalar_max"] + eps = group["eps"] + lr = group["lr"] * group["scalar_lr_scale"] + grad = p.grad + + exp_avg_sq = state["exp_avg_sq"] # shape: (batch_size,) + exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1 - beta2) + + # bias_correction2 is like in Adam. Don't bother with bias_correction1; + # slower update at the start will help stability anyway. + bias_correction2 = 1 - beta2 ** (state["step"] + 1) + denom = (exp_avg_sq / bias_correction2).sqrt() + eps + + delta = state["delta"] + delta.add_(grad / denom, alpha=-lr * (1 - beta1)) + p.clamp_(min=-scalar_max, max=scalar_max) + p.add_(delta) + + +class LRScheduler(object): + """ + Base-class for learning rate schedulers where the learning-rate depends on both the + batch and the epoch. + """ + + def __init__(self, optimizer: Optimizer, verbose: bool = False): + # Attach optimizer + if not isinstance(optimizer, Optimizer): + raise TypeError( + "{} is not an Optimizer".format(type(optimizer).__name__) + ) + self.optimizer = optimizer + self.verbose = verbose + + for group in optimizer.param_groups: + group.setdefault("base_lr", group["lr"]) + + self.base_lrs = [group["base_lr"] for group in optimizer.param_groups] + + self.epoch = 0 + self.batch = 0 + + def state_dict(self): + """Returns the state of the scheduler as a :class:`dict`. + + It contains an entry for every variable in self.__dict__ which + is not the optimizer. + """ + return { + "base_lrs": self.base_lrs, + "epoch": self.epoch, + "batch": self.batch, + } + + def load_state_dict(self, state_dict): + """Loads the schedulers state. + + Args: + state_dict (dict): scheduler state. Should be an object returned + from a call to :meth:`state_dict`. + """ + self.__dict__.update(state_dict) + + def get_last_lr(self) -> List[float]: + """Return last computed learning rate by current scheduler. Will be a list of float.""" + return self._last_lr + + def get_lr(self): + # Compute list of learning rates from self.epoch and self.batch and + # self.base_lrs; this must be overloaded by the user. + # e.g. return [some_formula(self.batch, self.epoch, base_lr) for base_lr in self.base_lrs ] + raise NotImplementedError + + def step_batch(self, batch: Optional[int] = None) -> None: + # Step the batch index, or just set it. If `batch` is specified, it + # must be the batch index from the start of training, i.e. summed over + # all epochs. + # You can call this in any order; if you don't provide 'batch', it should + # of course be called once per batch. + if batch is not None: + self.batch = batch + else: + self.batch = self.batch + 1 + self._set_lrs() + + def step_epoch(self, epoch: Optional[int] = None): + # Step the epoch index, or just set it. If you provide the 'epoch' arg, + # you should call this at the start of the epoch; if you don't provide the 'epoch' + # arg, you should call it at the end of the epoch. + if epoch is not None: + self.epoch = epoch + else: + self.epoch = self.epoch + 1 + self._set_lrs() + + def _set_lrs(self): + values = self.get_lr() + assert len(values) == len(self.optimizer.param_groups) + + for i, data in enumerate(zip(self.optimizer.param_groups, values)): + param_group, lr = data + param_group["lr"] = lr + self.print_lr(self.verbose, i, lr) + self._last_lr = [group["lr"] for group in self.optimizer.param_groups] + + def print_lr(self, is_verbose, group, lr): + """Display the current learning rate.""" + if is_verbose: + logging.info( + f"Epoch={self.epoch}, batch={self.batch}: adjusting learning rate" + f" of group {group} to {lr:.4e}." + ) + + +class Eden(LRScheduler): + """ + Eden scheduler. + The basic formula (before warmup) is: + lr = base_lr * (((batch**2 + lr_batches**2) / lr_batches**2) ** -0.25 * + (((epoch**2 + lr_epochs**2) / lr_epochs**2) ** -0.25)) * warmup + where `warmup` increases from linearly 0.5 to 1 over `warmup_batches` batches + and then stays constant at 1. + + + E.g. suggest base_lr = 0.04 (passed to optimizer) if used with ScaledAdam + + Args: + optimizer: the optimizer to change the learning rates on + lr_batches: the number of batches after which we start significantly + decreasing the learning rate, suggest 5000. + lr_epochs: the number of epochs after which we start significantly + decreasing the learning rate, suggest 6 if you plan to do e.g. + 20 to 40 epochs, but may need smaller number if dataset is huge + and you will do few epochs. + """ + + def __init__( + self, + optimizer: Optimizer, + lr_batches: Union[int, float], + lr_epochs: Union[int, float], + warmup_batches: Union[int, float] = 500.0, + verbose: bool = False, + ): + super(Eden, self).__init__(optimizer, verbose) + self.lr_batches = lr_batches + self.lr_epochs = lr_epochs + self.warmup_batches = warmup_batches + + def get_lr(self): + factor = ( + (self.batch ** 2 + self.lr_batches ** 2) / self.lr_batches ** 2 + ) ** -0.25 * ( + ((self.epoch ** 2 + self.lr_epochs ** 2) / self.lr_epochs ** 2) + ** -0.25 + ) + warmup_factor = ( + 1.0 + if self.batch >= self.warmup_batches + else 0.5 + 0.5 * (self.batch / self.warmup_batches) + ) + + return [x * factor * warmup_factor for x in self.base_lrs] + + +def _test_eden(): + m = torch.nn.Linear(100, 100) + optim = ScaledAdam(m.parameters(), lr=0.03) + + scheduler = Eden(optim, lr_batches=100, lr_epochs=2, verbose=True) + + for epoch in range(10): + scheduler.step_epoch(epoch) # sets epoch to `epoch` + + for step in range(20): + x = torch.randn(200, 100).detach() + x.requires_grad = True + y = m(x) + dy = torch.randn(200, 100).detach() + f = (y * dy).sum() + f.backward() + + optim.step() + scheduler.step_batch() + optim.zero_grad() + + logging.info(f"last lr = {scheduler.get_last_lr()}") + logging.info(f"state dict = {scheduler.state_dict()}") + + +# This is included mostly as a baseline for ScaledAdam. +class Eve(Optimizer): + """ + Implements Eve algorithm. This is a modified version of AdamW with a special + way of setting the weight-decay / shrinkage-factor, which is designed to make the + rms of the parameters approach a particular target_rms (default: 0.1). This is + for use with networks with 'scaled' versions of modules (see scaling.py), which + will be close to invariant to the absolute scale on the parameter matrix. + + The original Adam algorithm was proposed in `Adam: A Method for Stochastic Optimization`_. + The AdamW variant was proposed in `Decoupled Weight Decay Regularization`_. + Eve is unpublished so far. + + Arguments: + params (iterable): iterable of parameters to optimize or dicts defining + parameter groups + lr (float, optional): learning rate (default: 1e-3) + betas (Tuple[float, float], optional): coefficients used for computing + running averages of gradient and its square (default: (0.9, 0.999)) + eps (float, optional): term added to the denominator to improve + numerical stability (default: 1e-8) + weight_decay (float, optional): weight decay coefficient (default: 3e-4; + this value means that the weight would decay significantly after + about 3k minibatches. Is not multiplied by learning rate, but + is conditional on RMS-value of parameter being > target_rms. + target_rms (float, optional): target root-mean-square value of + parameters, if they fall below this we will stop applying weight decay. + + + .. _Adam: A Method for Stochastic Optimization: + https://arxiv.org/abs/1412.6980 + .. _Decoupled Weight Decay Regularization: + https://arxiv.org/abs/1711.05101 + .. _On the Convergence of Adam and Beyond: + https://openreview.net/forum?id=ryQu7f-RZ + """ + + def __init__( + self, + params, + lr=1e-3, + betas=(0.9, 0.98), + eps=1e-8, + weight_decay=1e-3, + target_rms=0.1, + ): + if not 0.0 <= lr: + raise ValueError("Invalid learning rate: {}".format(lr)) + if not 0.0 <= eps: + raise ValueError("Invalid epsilon value: {}".format(eps)) + if not 0.0 <= betas[0] < 1.0: + raise ValueError( + "Invalid beta parameter at index 0: {}".format(betas[0]) + ) + if not 0.0 <= betas[1] < 1.0: + raise ValueError( + "Invalid beta parameter at index 1: {}".format(betas[1]) + ) + if not 0 <= weight_decay <= 0.1: + raise ValueError( + "Invalid weight_decay value: {}".format(weight_decay) + ) + if not 0 < target_rms <= 10.0: + raise ValueError("Invalid target_rms value: {}".format(target_rms)) + defaults = dict( + lr=lr, + betas=betas, + eps=eps, + weight_decay=weight_decay, + target_rms=target_rms, + ) + super(Eve, self).__init__(params, defaults) + + def __setstate__(self, state): + super(Eve, self).__setstate__(state) + + @torch.no_grad() + def step(self, closure=None): + """Performs a single optimization step. + + Arguments: + closure (callable, optional): A closure that reevaluates the model + and returns the loss. + """ + loss = None + if closure is not None: + with torch.enable_grad(): + loss = closure() + + for group in self.param_groups: + for p in group["params"]: + if p.grad is None: + continue + + # Perform optimization step + grad = p.grad + if grad.is_sparse: + raise RuntimeError( + "AdamW does not support sparse gradients" + ) + + state = self.state[p] + + # State initialization + if len(state) == 0: + state["step"] = 0 + # Exponential moving average of gradient values + state["exp_avg"] = torch.zeros_like( + p, memory_format=torch.preserve_format + ) + # Exponential moving average of squared gradient values + state["exp_avg_sq"] = torch.zeros_like( + p, memory_format=torch.preserve_format + ) + + exp_avg, exp_avg_sq = state["exp_avg"], state["exp_avg_sq"] + + beta1, beta2 = group["betas"] + + state["step"] += 1 + bias_correction1 = 1 - beta1 ** state["step"] + bias_correction2 = 1 - beta2 ** state["step"] + + # Decay the first and second moment running average coefficient + exp_avg.mul_(beta1).add_(grad, alpha=1 - beta1) + exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1 - beta2) + denom = (exp_avg_sq.sqrt() * (bias_correction2 ** -0.5)).add_( + group["eps"] + ) + + step_size = group["lr"] / bias_correction1 + target_rms = group["target_rms"] + weight_decay = group["weight_decay"] + + if p.numel() > 1: + # avoid applying this weight-decay on "scaling factors" + # (which are scalar). + is_above_target_rms = p.norm() > ( + target_rms * (p.numel() ** 0.5) + ) + p.mul_(1 - (weight_decay * is_above_target_rms)) + + p.addcdiv_(exp_avg, denom, value=-step_size) + + # if random.random() < 0.0005: + # step = (exp_avg / denom) * step_size + # logging.info( + # f"Delta rms = {(step**2).mean().item()}, shape = {step.shape}" + # ) + + return loss + + +def _test_scaled_adam(hidden_dim: int): + import timeit + + from scaling import ScaledLinear + + E = 100 + B = 4 + T = 2 + logging.info("in test_eve_cain") + # device = torch.device('cuda') + device = torch.device("cpu") + dtype = torch.float32 + + fix_random_seed(42) + # these input_magnitudes and output_magnitudes are to test that + # Abel is working as we expect and is able to adjust scales of + # different dims differently. + input_magnitudes = (1.0 * torch.randn(E, dtype=dtype, device=device)).exp() + output_magnitudes = (1.0 * torch.randn(E, dtype=dtype, device=device)).exp() + + for iter in [1, 0]: + fix_random_seed(42) + Linear = torch.nn.Linear if iter == 0 else ScaledLinear + + m = torch.nn.Sequential( + Linear(E, hidden_dim), + torch.nn.PReLU(), + Linear(hidden_dim, hidden_dim), + torch.nn.PReLU(), + Linear(hidden_dim, E), + ).to(device) + + train_pairs = [ + ( + 100.0 + * torch.randn(B, T, E, device=device, dtype=dtype) + * input_magnitudes, + torch.randn(B, T, E, device=device, dtype=dtype) + * output_magnitudes, + ) + for _ in range(20) + ] + + if iter == 0: + optim = Eve(m.parameters(), lr=0.003) + elif iter == 1: + optim = ScaledAdam(m.parameters(), lr=0.03, clipping_scale=2.0) + scheduler = Eden(optim, lr_batches=200, lr_epochs=5, verbose=False) + + start = timeit.default_timer() + avg_loss = 0.0 + for epoch in range(180): + scheduler.step_epoch() + # if epoch == 100 and iter in [2,3]: + # optim.reset_speedup() # check it doesn't crash. + + # if epoch == 130: + # opts = diagnostics.TensorDiagnosticOptions( + # 2 ** 22 + # ) # allow 4 megabytes per sub-module + # diagnostic = diagnostics.attach_diagnostics(m, opts) + + for n, (x, y) in enumerate(train_pairs): + y_out = m(x) + loss = ((y_out - y) ** 2).mean() * 100.0 + if epoch == 0 and n == 0: + avg_loss = loss.item() + else: + avg_loss = 0.98 * avg_loss + 0.02 * loss.item() + if n == 0 and epoch % 5 == 0: + # norm1 = '%.2e' % (m[0].weight**2).mean().sqrt().item() + # norm1b = '%.2e' % (m[0].bias**2).mean().sqrt().item() + # norm2 = '%.2e' % (m[2].weight**2).mean().sqrt().item() + # norm2b = '%.2e' % (m[2].bias**2).mean().sqrt().item() + # scale1 = '%.2e' % (m[0].weight_scale.exp().item()) + # scale1b = '%.2e' % (m[0].bias_scale.exp().item()) + # scale2 = '%.2e' % (m[2].weight_scale.exp().item()) + # scale2b = '%.2e' % (m[2].bias_scale.exp().item()) + lr = scheduler.get_last_lr()[0] + logging.info( + f"Iter {iter}, epoch {epoch}, batch {n}, avg_loss {avg_loss:.4g}, lr={lr:.4e}" + ) # , norms={norm1,norm1b,norm2,norm2b}") # scales={scale1,scale1b,scale2,scale2b} + loss.log().backward() + optim.step() + optim.zero_grad() + scheduler.step_batch() + + # diagnostic.print_diagnostics() + + stop = timeit.default_timer() + logging.info(f"Iter={iter}, Time taken: {stop - start}") + + logging.info(f"last lr = {scheduler.get_last_lr()}") + # logging.info("state dict = ", scheduler.state_dict()) + # logging.info("optim state_dict = ", optim.state_dict()) + logging.info(f"input_magnitudes = {input_magnitudes}") + logging.info(f"output_magnitudes = {output_magnitudes}") + + +if __name__ == "__main__": + torch.set_num_threads(1) + torch.set_num_interop_threads(1) + logging.getLogger().setLevel(logging.INFO) + import subprocess + + s = subprocess.check_output( + "git status -uno .; git log -1; git diff HEAD .", shell=True + ) + logging.info(s) + import sys + + if len(sys.argv) > 1: + hidden_dim = int(sys.argv[1]) + else: + hidden_dim = 200 + + _test_scaled_adam(hidden_dim) + _test_eden() diff --git a/modules/scaling.py b/modules/scaling.py new file mode 100644 index 0000000000000000000000000000000000000000..e944cf53fae615526754de3f1e225014a2874bfb --- /dev/null +++ b/modules/scaling.py @@ -0,0 +1,1401 @@ +# Copyright 2022 Xiaomi Corp. (authors: Daniel Povey) +# +# See ../../../../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import collections +import logging +import random +import math +from functools import reduce +from itertools import repeat +from typing import Optional, Tuple, Union + +import torch +import torch.nn as nn +import torch.nn.functional as F +from torch import Tensor +from torch.nn import Embedding as ScaledEmbedding + +from utils import Transpose + + +class ActivationBalancerFunction(torch.autograd.Function): + @staticmethod + def forward( + ctx, + x: Tensor, + scale_factor: Tensor, + sign_factor: Optional[Tensor], + channel_dim: int, + ) -> Tensor: + if channel_dim < 0: + channel_dim += x.ndim + ctx.channel_dim = channel_dim + xgt0 = x > 0 + if sign_factor is None: + ctx.save_for_backward(xgt0, scale_factor) + else: + ctx.save_for_backward(xgt0, scale_factor, sign_factor) + return x + + @staticmethod + def backward(ctx, x_grad: Tensor) -> Tuple[Tensor, None, None, None]: + if len(ctx.saved_tensors) == 3: + xgt0, scale_factor, sign_factor = ctx.saved_tensors + for _ in range(ctx.channel_dim, x_grad.ndim - 1): + scale_factor = scale_factor.unsqueeze(-1) + sign_factor = sign_factor.unsqueeze(-1) + factor = sign_factor + scale_factor * (xgt0.to(x_grad.dtype) - 0.5) + else: + xgt0, scale_factor = ctx.saved_tensors + for _ in range(ctx.channel_dim, x_grad.ndim - 1): + scale_factor = scale_factor.unsqueeze(-1) + factor = scale_factor * (xgt0.to(x_grad.dtype) - 0.5) + neg_delta_grad = x_grad.abs() * factor + return ( + x_grad - neg_delta_grad, + None, + None, + None, + ) + + +def _compute_scale_factor( + x: Tensor, + channel_dim: int, + min_abs: float, + max_abs: float, + gain_factor: float, + max_factor: float, +) -> Tensor: + if channel_dim < 0: + channel_dim += x.ndim + sum_dims = [d for d in range(x.ndim) if d != channel_dim] + x_abs_mean = torch.mean(x.abs(), dim=sum_dims).to(torch.float32) + + if min_abs == 0.0: + below_threshold = 0.0 + else: + # below_threshold is 0 if x_abs_mean > min_abs, can be at most max_factor if + # x_abs)_mean , min_abs. + below_threshold = ( + (min_abs - x_abs_mean) * (gain_factor / min_abs) + ).clamp(min=0, max=max_factor) + + above_threshold = ((x_abs_mean - max_abs) * (gain_factor / max_abs)).clamp( + min=0, max=max_factor + ) + + return below_threshold - above_threshold + + +def _compute_sign_factor( + x: Tensor, + channel_dim: int, + min_positive: float, + max_positive: float, + gain_factor: float, + max_factor: float, +) -> Tensor: + if channel_dim < 0: + channel_dim += x.ndim + sum_dims = [d for d in range(x.ndim) if d != channel_dim] + proportion_positive = torch.mean((x > 0).to(torch.float32), dim=sum_dims) + if min_positive == 0.0: + factor1 = 0.0 + else: + # 0 if proportion_positive >= min_positive, else can be + # as large as max_factor. + factor1 = ( + (min_positive - proportion_positive) * (gain_factor / min_positive) + ).clamp_(min=0, max=max_factor) + + if max_positive == 1.0: + factor2 = 0.0 + else: + # 0 if self.proportion_positive <= max_positive, else can be + # as large as -max_factor. + factor2 = ( + (proportion_positive - max_positive) + * (gain_factor / (1.0 - max_positive)) + ).clamp_(min=0, max=max_factor) + sign_factor = factor1 - factor2 + # require min_positive != 0 or max_positive != 1: + assert not isinstance(sign_factor, float) + return sign_factor + + +class ActivationScaleBalancerFunction(torch.autograd.Function): + """ + This object is used in class ActivationBalancer when the user specified + min_positive=0, max_positive=1, so there are no constraints on the signs + of the activations and only the absolute value has a constraint. + """ + + @staticmethod + def forward( + ctx, + x: Tensor, + sign_factor: Tensor, + scale_factor: Tensor, + channel_dim: int, + ) -> Tensor: + if channel_dim < 0: + channel_dim += x.ndim + ctx.channel_dim = channel_dim + xgt0 = x > 0 + ctx.save_for_backward(xgt0, sign_factor, scale_factor) + return x + + @staticmethod + def backward(ctx, x_grad: Tensor) -> Tuple[Tensor, None, None, None]: + xgt0, sign_factor, scale_factor = ctx.saved_tensors + for _ in range(ctx.channel_dim, x_grad.ndim - 1): + sign_factor = sign_factor.unsqueeze(-1) + scale_factor = scale_factor.unsqueeze(-1) + + factor = sign_factor + scale_factor * (xgt0.to(x_grad.dtype) - 0.5) + neg_delta_grad = x_grad.abs() * factor + return ( + x_grad - neg_delta_grad, + None, + None, + None, + ) + + +class RandomClampFunction(torch.autograd.Function): + @staticmethod + def forward( + ctx, + x: Tensor, + min: Optional[float], + max: Optional[float], + prob: float, + reflect: float, + ) -> Tensor: + x_clamped = torch.clamp(x, min=min, max=max) + mask = torch.rand_like(x) < prob + ans = torch.where(mask, x_clamped, x) + if x.requires_grad: + ctx.save_for_backward(ans == x) + ctx.reflect = reflect + if reflect != 0.0: + ans = ans * (1.0 + reflect) - (x * reflect) + return ans + + @staticmethod + def backward( + ctx, ans_grad: Tensor + ) -> Tuple[Tensor, None, None, None, None]: + (is_same,) = ctx.saved_tensors + x_grad = ans_grad * is_same.to(ans_grad.dtype) + reflect = ctx.reflect + if reflect != 0.0: + x_grad = x_grad * (1.0 + reflect) - (ans_grad * reflect) + return x_grad, None, None, None, None + + +def random_clamp( + x: Tensor, + min: Optional[float] = None, + max: Optional[float] = None, + prob: float = 0.5, + reflect: float = 0.0, +): + return RandomClampFunction.apply(x, min, max, prob, reflect) + + +def random_cast_to_half(x: Tensor, min_abs: float = 5.0e-06) -> Tensor: + """ + A randomized way of casting a floating point value to half precision. + """ + if x.dtype == torch.float16: + return x + x_abs = x.abs() + is_too_small = x_abs < min_abs + # for elements where is_too_small is true, random_val will contain +-min_abs with + # probability (x.abs() / min_abs), and 0.0 otherwise. [so this preserves expectations, + # for those elements]. + random_val = min_abs * x.sign() * (torch.rand_like(x) * min_abs < x_abs) + return torch.where(is_too_small, random_val, x).to(torch.float16) + + +class RandomGradFunction(torch.autograd.Function): + """ + Does nothing in forward pass; in backward pass, gets rid of very small grads using + randomized approach that preserves expectations (intended to reduce roundoff). + """ + + @staticmethod + def forward(ctx, x: Tensor, min_abs: float) -> Tensor: + ctx.min_abs = min_abs + return x + + @staticmethod + def backward(ctx, ans_grad: Tensor) -> Tuple[Tensor, None]: + if ans_grad.dtype == torch.float16: + return ( + random_cast_to_half( + ans_grad.to(torch.float32), min_abs=ctx.min_abs + ), + None, + ) + else: + return ans_grad, None + + +class RandomGrad(torch.nn.Module): + """ + Gets rid of very small gradients using an expectation-preserving method, intended to increase + accuracy of training when using amp (automatic mixed precision) + """ + + def __init__(self, min_abs: float = 5.0e-06): + super(RandomGrad, self).__init__() + self.min_abs = min_abs + + def forward(self, x: Tensor): + if ( + torch.jit.is_scripting() + or not self.training + or torch.jit.is_tracing() + ): + return x + else: + return RandomGradFunction.apply(x, self.min_abs) + + +class SoftmaxFunction(torch.autograd.Function): + """ + Tries to handle half-precision derivatives in a randomized way that should + be more accurate for training than the default behavior. + """ + + @staticmethod + def forward(ctx, x: Tensor, dim: int): + ans = x.softmax(dim=dim) + # if x dtype is float16, x.softmax() returns a float32 because + # (presumably) that op does not support float16, and autocast + # is enabled. + if torch.is_autocast_enabled(): + ans = ans.to(torch.float16) + ctx.save_for_backward(ans) + ctx.x_dtype = x.dtype + ctx.dim = dim + return ans + + @staticmethod + def backward(ctx, ans_grad: Tensor): + (ans,) = ctx.saved_tensors + with torch.cuda.amp.autocast(enabled=False): + ans_grad = ans_grad.to(torch.float32) + ans = ans.to(torch.float32) + x_grad = ans_grad * ans + x_grad = x_grad - ans * x_grad.sum(dim=ctx.dim, keepdim=True) + return x_grad, None + + +def softmax(x: Tensor, dim: int): + if torch.jit.is_scripting() or torch.jit.is_tracing(): + return x.softmax(dim) + + return SoftmaxFunction.apply(x, dim) + + +class MaxEigLimiterFunction(torch.autograd.Function): + @staticmethod + def forward( + ctx, + x: Tensor, + coeffs: Tensor, + direction: Tensor, + channel_dim: int, + grad_scale: float, + ) -> Tensor: + ctx.channel_dim = channel_dim + ctx.grad_scale = grad_scale + ctx.save_for_backward(x.detach(), coeffs.detach(), direction.detach()) + return x + + @staticmethod + def backward(ctx, x_grad, *args): + with torch.enable_grad(): + (x_orig, coeffs, new_direction) = ctx.saved_tensors + x_orig.requires_grad = True + num_channels = x_orig.shape[ctx.channel_dim] + x = x_orig.transpose(ctx.channel_dim, -1).reshape(-1, num_channels) + new_direction.requires_grad = False + x = x - x.mean(dim=0) + x_var = (x ** 2).mean() + x_residual = x - coeffs * new_direction + x_residual_var = (x_residual ** 2).mean() + # `variance_proportion` is the proportion of the variance accounted for + # by the top eigen-direction. This is to be minimized. + variance_proportion = (x_var - x_residual_var) / (x_var + 1.0e-20) + variance_proportion.backward() + x_orig_grad = x_orig.grad + x_extra_grad = ( + x_orig.grad + * ctx.grad_scale + * x_grad.norm() + / (x_orig_grad.norm() + 1.0e-20) + ) + return x_grad + x_extra_grad.detach(), None, None, None, None + + +class BasicNorm(torch.nn.Module): + """ + This is intended to be a simpler, and hopefully cheaper, replacement for + LayerNorm. The observation this is based on, is that Transformer-type + networks, especially with pre-norm, sometimes seem to set one of the + feature dimensions to a large constant value (e.g. 50), which "defeats" + the LayerNorm because the output magnitude is then not strongly dependent + on the other (useful) features. Presumably the weight and bias of the + LayerNorm are required to allow it to do this. + + So the idea is to introduce this large constant value as an explicit + parameter, that takes the role of the "eps" in LayerNorm, so the network + doesn't have to do this trick. We make the "eps" learnable. + + Args: + num_channels: the number of channels, e.g. 512. + channel_dim: the axis/dimension corresponding to the channel, + interprted as an offset from the input's ndim if negative. + shis is NOT the num_channels; it should typically be one of + {-2, -1, 0, 1, 2, 3}. + eps: the initial "epsilon" that we add as ballast in: + scale = ((input_vec**2).mean() + epsilon)**-0.5 + Note: our epsilon is actually large, but we keep the name + to indicate the connection with conventional LayerNorm. + learn_eps: if true, we learn epsilon; if false, we keep it + at the initial value. + eps_min: float + eps_max: float + """ + + def __init__( + self, + num_channels: int, + channel_dim: int = -1, # CAUTION: see documentation. + eps: float = 0.25, + learn_eps: bool = True, + eps_min: float = -3.0, + eps_max: float = 3.0, + ) -> None: + super(BasicNorm, self).__init__() + self.num_channels = num_channels + self.channel_dim = channel_dim + if learn_eps: + self.eps = nn.Parameter(torch.tensor(eps).log().detach()) + else: + self.register_buffer("eps", torch.tensor(eps).log().detach()) + self.eps_min = eps_min + self.eps_max = eps_max + + def forward(self, x: Tensor) -> Tensor: + assert x.shape[self.channel_dim] == self.num_channels + eps = self.eps + if self.training and random.random() < 0.25: + # with probability 0.25, in training mode, clamp eps between the min + # and max; this will encourage it to learn parameters within the + # allowed range by making parameters that are outside the allowed + # range noisy. + + # gradients to allow the parameter to get back into the allowed + # region if it happens to exit it. + eps = eps.clamp(min=self.eps_min, max=self.eps_max) + scales = ( + torch.mean(x ** 2, dim=self.channel_dim, keepdim=True) + eps.exp() + ) ** -0.5 + return x * scales + + +def ScaledLinear(*args, initial_scale: float = 1.0, **kwargs) -> nn.Linear: + """ + Behaves like a constructor of a modified version of nn.Linear + that gives an easy way to set the default initial parameter scale. + + Args: + Accepts the standard args and kwargs that nn.Linear accepts + e.g. in_features, out_features, bias=False. + + initial_scale: you can override this if you want to increase + or decrease the initial magnitude of the module's output + (affects the initialization of weight_scale and bias_scale). + Another option, if you want to do something like this, is + to re-initialize the parameters. + """ + ans = nn.Linear(*args, **kwargs) + with torch.no_grad(): + ans.weight[:] *= initial_scale + if ans.bias is not None: + torch.nn.init.uniform_( + ans.bias, -0.1 * initial_scale, 0.1 * initial_scale + ) + return ans + + +def ScaledConv1d( + *args, + initial_scale: float = 1.0, + kernel_size: int = 3, + padding: str = "same", + **kwargs, +) -> nn.Conv1d: + """ + Behaves like a constructor of a modified version of nn.Conv1d + that gives an easy way to set the default initial parameter scale. + + Args: + Accepts the standard args and kwargs that nn.Linear accepts + e.g. in_features, out_features, bias=False. + + initial_scale: you can override this if you want to increase + or decrease the initial magnitude of the module's output + (affects the initialization of weight_scale and bias_scale). + Another option, if you want to do something like this, is + to re-initialize the parameters. + """ + ans = nn.Conv1d(*args, kernel_size=kernel_size, padding=padding, **kwargs) + with torch.no_grad(): + ans.weight[:] *= initial_scale + if ans.bias is not None: + torch.nn.init.uniform_( + ans.bias, -0.1 * initial_scale, 0.1 * initial_scale + ) + return ans + + +def TransposeScaledConv1d( + *args, + initial_scale: float = 1.0, + kernel_size: int = 3, + padding: str = "same", + **kwargs, +) -> nn.Sequential: + """ + Transpose -> ScaledConv1d + """ + return nn.Sequential( + Transpose(), + ScaledConv1d( + *args, + initial_scale=initial_scale, + kernel_size=kernel_size, + padding=padding, + **kwargs, + ), + ) + + +def ScaledConv1dTranspose( + *args, + initial_scale: float = 1.0, + kernel_size: int = 3, + padding: str = "same", + **kwargs, +) -> nn.Sequential: + """ + Transpose -> ScaledConv1d + """ + return nn.Sequential( + ScaledConv1d( + *args, + initial_scale=initial_scale, + kernel_size=kernel_size, + padding=padding, + **kwargs, + ), + Transpose(), + ) + + +def TransposeConv1d( + *args, kernel_size: int = 3, padding: str = "same", **kwargs +) -> nn.Sequential: + """ + Transpose -> Conv1d + """ + return nn.Sequential( + Transpose(), + nn.Conv1d(*args, kernel_size=kernel_size, padding=padding, **kwargs), + ) + + +def Conv1dTranspose( + *args, kernel_size: int = 3, padding: str = "same", **kwargs +) -> nn.Sequential: + """ + ScaledConv1d -> Transpose + """ + return nn.Sequential( + nn.Conv1d(*args, kernel_size=kernel_size, padding=padding, **kwargs), + Transpose(), + ) + + +class SRLinear(nn.Linear): + """https://arxiv.org/abs/2303.06296 + Stabilizing Transformer Training by Preventing Attention Entropy Collapse + """ + + def __init__(self, in_features, out_features, bias=True, **kwargs): + super().__init__(in_features, out_features, bias=bias, **kwargs) + self.register_buffer( + "u", nn.functional.normalize(torch.randn(in_features), dim=0) + ) + with torch.no_grad(): + sigma = self.get_sigma() + self.register_buffer("spectral_norm", sigma) + self.sigma = nn.Parameter(torch.ones(1)) + + def get_sigma(self): + with torch.no_grad(): + u = self.u + v = self.weight.mv(u) + v = nn.functional.normalize(v, dim=0) + u = self.weight.T.mv(v) + u = nn.functional.normalize(u, dim=0) + self.u.data.copy_(u) + return torch.einsum("c,cd,d->", v, self.weight, u) + + def get_weight(self): + sigma = self.get_sigma() + if self.training: + self.spectral_norm.data.copy_(sigma) + weight = (self.sigma / sigma) * self.weight + return weight + + def forward(self, x): + return nn.functional.linear(x, self.get_weight(), self.bias) + + +class SRConv1d(SRLinear): + def __init__( + self, + in_features, + out_features, + kernel_size, + stride: int = 1, + padding: str = "same", + bias: bool = True, + **kwargs, + ): + in_features = in_features * kernel_size + super().__init__(in_features, out_features, bias=bias, **kwargs) + nn.init.kaiming_uniform_(self.weight, a=math.sqrt(5)) + self.kernel_size = kernel_size + self.stride = stride + self.padding = padding + + def forward(self, x): + in_features = self.in_features // self.kernel_size + weight = self.get_weight().view( + self.out_features, in_features, self.kernel_size + ) + return nn.functional.conv1d( + x, weight, bias=self.bias, stride=self.stride, padding=self.padding + ) + + +def TransposeSRConv1d( + *args, kernel_size: int = 3, padding: str = "same", **kwargs +) -> nn.Sequential: + """ + Transpose -> SRConv1d + """ + return nn.Sequential( + Transpose(), + SRConv1d(*args, kernel_size=kernel_size, padding=padding, **kwargs), + ) + + +def SRConv1dTranspose( + *args, kernel_size: int = 3, padding: str = "same", **kwargs +) -> nn.Sequential: + """ + SRConv1d -> Transpose + """ + return nn.Sequential( + SRConv1d(*args, kernel_size=kernel_size, padding=padding, **kwargs), + Transpose(), + ) + + +class ActivationBalancer(torch.nn.Module): + """ + Modifies the backpropped derivatives of a function to try to encourage, for + each channel, that it is positive at least a proportion `threshold` of the + time. It does this by multiplying negative derivative values by up to + (1+max_factor), and positive derivative values by up to (1-max_factor), + interpolated from 1 at the threshold to those extremal values when none + of the inputs are positive. + + Args: + num_channels: the number of channels + channel_dim: the dimension/axis corresponding to the channel, e.g. + -1, 0, 1, 2; will be interpreted as an offset from x.ndim if negative. + min_positive: the minimum, per channel, of the proportion of the time + that (x > 0), below which we start to modify the derivatives. + max_positive: the maximum, per channel, of the proportion of the time + that (x > 0), above which we start to modify the derivatives. + max_factor: the maximum factor by which we modify the derivatives for + either the sign constraint or the magnitude constraint; + e.g. with max_factor=0.02, the the derivatives would be multiplied by + values in the range [0.98..1.02]. + sign_gain_factor: determines the 'gain' with which we increase the + change in gradient once the constraints on min_positive and max_positive + are violated. + scale_gain_factor: determines the 'gain' with which we increase the + change in gradient once the constraints on min_abs and max_abs + are violated. + min_abs: the minimum average-absolute-value difference from the mean + value per channel, which we allow, before we start to modify + the derivatives to prevent this. + max_abs: the maximum average-absolute-value difference from the mean + value per channel, which we allow, before we start to modify + the derivatives to prevent this. + min_prob: determines the minimum probability with which we modify the + gradients for the {min,max}_positive and {min,max}_abs constraints, + on each forward(). This is done randomly to prevent all layers + from doing it at the same time. Early in training we may use + higher probabilities than this; it will decay to this value. + """ + + def __init__( + self, + num_channels: int, + channel_dim: int, + min_positive: float = 0.05, + max_positive: float = 0.95, + max_factor: float = 0.04, + sign_gain_factor: float = 0.01, + scale_gain_factor: float = 0.02, + min_abs: float = 0.2, + max_abs: float = 100.0, + min_prob: float = 0.1, + ): + super(ActivationBalancer, self).__init__() + self.num_channels = num_channels + self.channel_dim = channel_dim + self.min_positive = min_positive + self.max_positive = max_positive + self.max_factor = max_factor + self.min_abs = min_abs + self.max_abs = max_abs + self.min_prob = min_prob + self.sign_gain_factor = sign_gain_factor + self.scale_gain_factor = scale_gain_factor + + # count measures how many times the forward() function has been called. + # We occasionally sync this to a tensor called `count`, that exists to + # make sure it is synced to disk when we load and save the model. + self.cpu_count = 0 + self.register_buffer("count", torch.tensor(0, dtype=torch.int64)) + + def forward(self, x: Tensor) -> Tensor: + if ( + torch.jit.is_scripting() + or not x.requires_grad + or torch.jit.is_tracing() + ): + return _no_op(x) + + count = self.cpu_count + self.cpu_count += 1 + + if random.random() < 0.01: + # Occasionally sync self.cpu_count with self.count. + # count affects the decay of 'prob'. don't do this on every iter, + # because syncing with the GPU is slow. + self.cpu_count = max(self.cpu_count, self.count.item()) + self.count.fill_(self.cpu_count) + + # the prob of doing some work exponentially decreases from 0.5 till it hits + # a floor at min_prob (==0.1, by default) + prob = max(self.min_prob, 0.5 ** (1 + (count / 4000.0))) + + if random.random() < prob: + sign_gain_factor = 0.5 + if self.min_positive != 0.0 or self.max_positive != 1.0: + sign_factor = _compute_sign_factor( + x, + self.channel_dim, + self.min_positive, + self.max_positive, + gain_factor=self.sign_gain_factor / prob, + max_factor=self.max_factor, + ) + else: + sign_factor = None + + scale_factor = _compute_scale_factor( + x.detach(), + self.channel_dim, + min_abs=self.min_abs, + max_abs=self.max_abs, + gain_factor=self.scale_gain_factor / prob, + max_factor=self.max_factor, + ) + return ActivationBalancerFunction.apply( + x, + scale_factor, + sign_factor, + self.channel_dim, + ) + else: + return _no_op(x) + + +def penalize_abs_values_gt(x: Tensor, limit: float, penalty: float) -> Tensor: + """ + Returns x unmodified, but in backprop will put a penalty for the excess of + the absolute values of elements of x over the limit "limit". E.g. if + limit == 10.0, then if x has any values over 10 it will get a penalty. + + Caution: the value of this penalty will be affected by grad scaling used + in automatic mixed precision training. For this reasons we use this, + it shouldn't really matter, or may even be helpful; we just use this + to disallow really implausible values of scores to be given to softmax. + """ + x_sign = x.sign() + over_limit = (x.abs() - limit) > 0 + # The following is a memory efficient way to penalize the absolute values of + # x that's over the limit. (The memory efficiency comes when you think + # about which items torch needs to cache for the autograd, and which ones it + # can throw away). The numerical value of aux_loss as computed here will + # actually be larger than it should be, by limit * over_limit.sum(), but it + # has the same derivative as the real aux_loss which is penalty * (x.abs() - + # limit).relu(). + aux_loss = penalty * ((x_sign * over_limit).to(torch.int8) * x) + # note: we don't do sum() here on aux)_loss, but it's as if we had done + # sum() due to how with_loss() works. + x = with_loss(x, aux_loss) + # you must use x for something, or this will be ineffective. + return x + + +def _diag(x: Tensor): # like .diag(), but works for tensors with 3 dims. + if x.ndim == 2: + return x.diag() + else: + (batch, dim, dim) = x.shape + x = x.reshape(batch, dim * dim) + x = x[:, :: dim + 1] + assert x.shape == (batch, dim) + return x + + +def _whitening_metric(x: Tensor, num_groups: int): + """ + Computes the "whitening metric", a value which will be 1.0 if all the eigenvalues of + of the centered feature covariance are the same within each group's covariance matrix + and also between groups. + Args: + x: a Tensor of shape (*, num_channels) + num_groups: the number of groups of channels, a number >=1 that divides num_channels + Returns: + Returns a scalar Tensor that will be 1.0 if the data is "perfectly white" and + greater than 1.0 otherwise. + """ + assert x.dtype != torch.float16 + x = x.reshape(-1, x.shape[-1]) + (num_frames, num_channels) = x.shape + assert num_channels % num_groups == 0 + channels_per_group = num_channels // num_groups + x = x.reshape(num_frames, num_groups, channels_per_group).transpose(0, 1) + # x now has shape (num_groups, num_frames, channels_per_group) + # subtract the mean so we use the centered, not uncentered, covariance. + # My experience has been that when we "mess with the gradients" like this, + # it's better not do anything that tries to move the mean around, because + # that can easily cause instability. + x = x - x.mean(dim=1, keepdim=True) + # x_covar: (num_groups, channels_per_group, channels_per_group) + x_covar = torch.matmul(x.transpose(1, 2), x) + x_covar_mean_diag = _diag(x_covar).mean() + # the following expression is what we'd get if we took the matrix product + # of each covariance and measured the mean of its trace, i.e. + # the same as _diag(torch.matmul(x_covar, x_covar)).mean(). + x_covarsq_mean_diag = (x_covar ** 2).sum() / ( + num_groups * channels_per_group + ) + # this metric will be >= 1.0; the larger it is, the less 'white' the data was. + metric = x_covarsq_mean_diag / (x_covar_mean_diag ** 2 + 1.0e-20) + return metric + + +class WhiteningPenaltyFunction(torch.autograd.Function): + @staticmethod + def forward( + ctx, + x: Tensor, + num_groups: int, + whitening_limit: float, + grad_scale: float, + ) -> Tensor: + ctx.save_for_backward(x) + ctx.num_groups = num_groups + ctx.whitening_limit = whitening_limit + ctx.grad_scale = grad_scale + return x + + @staticmethod + def backward(ctx, x_grad: Tensor): + (x_orig,) = ctx.saved_tensors + with torch.enable_grad(): + with torch.cuda.amp.autocast(enabled=False): + x_detached = x_orig.to(torch.float32).detach() + x_detached.requires_grad = True + + metric = _whitening_metric(x_detached, ctx.num_groups) + + if random.random() < 0.005 or __name__ == "__main__": + logging.info( + f"Whitening: num_groups={ctx.num_groups}, num_channels={x_orig.shape[-1]}, " + f"metric={metric.item():.2f} vs. limit={ctx.whitening_limit}" + ) + + (metric - ctx.whitening_limit).relu().backward() + penalty_grad = x_detached.grad + scale = ctx.grad_scale * ( + x_grad.to(torch.float32).norm() + / (penalty_grad.norm() + 1.0e-20) + ) + penalty_grad = penalty_grad * scale + return x_grad + penalty_grad.to(x_grad.dtype), None, None, None + + +class Whiten(nn.Module): + def __init__( + self, + num_groups: int, + whitening_limit: float, + prob: Union[float, Tuple[float, float]], + grad_scale: float, + ): + """ + Args: + num_groups: the number of groups to divide the channel dim into before + whitening. We will attempt to make the feature covariance + within each group, after mean subtraction, as "white" as possible, + while having the same trace across all groups. + whitening_limit: a value greater than 1.0, that dictates how much + freedom we have to violate the constraints. 1.0 would mean perfectly + white, with exactly the same trace across groups; larger values + give more freedom. E.g. 2.0. + prob: the probability with which we apply the gradient modification + (also affects the grad scale). May be supplied as a float, + or as a pair (min_prob, max_prob) + + grad_scale: determines the scale on the gradient term from this object, + relative to the rest of the gradient on the attention weights. + E.g. 0.02 (you may want to use smaller values than this if prob is large) + """ + super(Whiten, self).__init__() + assert num_groups >= 1 + assert whitening_limit >= 1 + assert grad_scale >= 0 + self.num_groups = num_groups + self.whitening_limit = whitening_limit + if isinstance(prob, float): + assert 0 < prob <= 1 + self.prob = prob + else: + (self.min_prob, self.max_prob) = prob + assert 0 < self.min_prob < self.max_prob <= 1 + self.prob = self.max_prob + + self.grad_scale = grad_scale + + def forward(self, x: Tensor) -> Tensor: + """ + In the forward pass, this function just returns the input unmodified. + In the backward pass, it will modify the gradients to ensure that the + distribution in each group has close to (lambda times I) as the covariance + after mean subtraction, with the same lambda across groups. + For whitening_limit > 1, there will be more freedom to violate this + constraint. + + Args: + x: the input of shape (*, num_channels) + + Returns: + x, unmodified. You should make sure + you use the returned value, or the graph will be freed + and nothing will happen in backprop. + """ + if ( + not x.requires_grad + or random.random() > self.prob + or self.grad_scale == 0 + ): + return _no_op(x) + else: + if hasattr(self, "min_prob") and random.random() < 0.25: + # occasionally switch between min_prob and max_prob, based on whether + # we are above or below the threshold. + if ( + _whitening_metric(x.to(torch.float32), self.num_groups) + > self.whitening_limit + ): + # there would be a change to the grad. + self.prob = self.max_prob + else: + self.prob = self.min_prob + + return WhiteningPenaltyFunction.apply( + x, self.num_groups, self.whitening_limit, self.grad_scale + ) + + +class WithLoss(torch.autograd.Function): + @staticmethod + def forward(ctx, x: Tensor, y: Tensor): + ctx.y_shape = y.shape + return x + + @staticmethod + def backward(ctx, ans_grad: Tensor): + return ans_grad, torch.ones( + ctx.y_shape, dtype=ans_grad.dtype, device=ans_grad.device + ) + + +def with_loss(x, y): + if torch.jit.is_scripting() or torch.jit.is_tracing(): + return x + # returns x but adds y.sum() to the loss function. + return WithLoss.apply(x, y) + + +def _no_op(x: Tensor) -> Tensor: + if torch.jit.is_scripting() or torch.jit.is_tracing(): + return x + else: + # a no-op function that will have a node in the autograd graph, + # to avoid certain bugs relating to backward hooks + return x.chunk(1, dim=-1)[0] + + +class Identity(torch.nn.Module): + def __init__(self): + super(Identity, self).__init__() + + def forward(self, x): + return _no_op(x) + + +class MaxEig(torch.nn.Module): + """ + Modifies the backpropped derivatives of a function to try to discourage + that any given direction in activation space accounts for more than + a specified proportion of the covariance (e.g. 0.2). + + + Args: + num_channels: the number of channels + channel_dim: the dimension/axis corresponding to the channel, e.g. + -1, 0, 1, 2; will be interpreted as an offset from x.ndim if negative. + max_var_per_eig: the maximum proportion of the variance of the + features/channels, after mean subtraction, that can come from + any given eigenvalue. + min_prob: the minimum probability with which we apply this during any invocation + of forward(), assuming last time we applied the constraint it was + not active; supplied for speed. + scale: determines the scale with which we modify the gradients, relative + to the existing / unmodified gradients + """ + + def __init__( + self, + num_channels: int, + channel_dim: int, + max_var_per_eig: float = 0.2, + min_prob: float = 0.01, + scale: float = 0.01, + ): + super(MaxEig, self).__init__() + self.num_channels = num_channels + self.channel_dim = channel_dim + self.scale = scale + assert max_var_per_eig == 0.0 or max_var_per_eig > 1.0 / num_channels + self.max_var_per_eig = max_var_per_eig + + # we figure out the dominant direction using the power method: starting with + # a random vector, keep multiplying by the covariance and renormalizing. + with torch.no_grad(): + # arbitrary.. would use randn() but want to leave the rest of the model's + # random parameters unchanged for comparison + direction = torch.arange(num_channels).to(torch.float) + direction = direction / direction.norm() + self.register_buffer("max_eig_direction", direction) + + self.min_prob = min_prob + # cur_prob is the current probability we'll use to apply the ActivationBalancer. + # We'll regress this towards prob, each time we try to apply it and it is not + # active. + self.cur_prob = 1.0 + + def forward(self, x: Tensor) -> Tensor: + if ( + torch.jit.is_scripting() + or self.max_var_per_eig <= 0 + or random.random() > self.cur_prob + or torch.jit.is_tracing() + ): + return _no_op(x) + + with torch.cuda.amp.autocast(enabled=False): + eps = 1.0e-20 + orig_x = x + x = x.to(torch.float32) + with torch.no_grad(): + x = x.transpose(self.channel_dim, -1).reshape( + -1, self.num_channels + ) + x = x - x.mean(dim=0) + new_direction, coeffs = self._find_direction_coeffs( + x, self.max_eig_direction + ) + x_var = (x ** 2).mean() + x_residual = x - coeffs * new_direction + x_residual_var = (x_residual ** 2).mean() + + # `variance_proportion` is the proportion of the variance accounted for + # by the top eigen-direction. + variance_proportion = (x_var - x_residual_var) / ( + x_var + 1.0e-20 + ) + + # ensure new direction is nonzero even if x == 0, by including `direction`. + self._set_direction( + 0.1 * self.max_eig_direction + new_direction + ) + + if random.random() < 0.01 or __name__ == "__main__": + logging.info( + f"variance_proportion = {variance_proportion.item()}, shape={tuple(orig_x.shape)}, cur_prob={self.cur_prob}" + ) + + if variance_proportion >= self.max_var_per_eig: + # The constraint is active. Note, we should quite rarely + # reach here, only near the beginning of training if we are + # starting to diverge, should this constraint be active. + cur_prob = self.cur_prob + self.cur_prob = ( + 1.0 # next time, do the update with probability 1.0. + ) + return MaxEigLimiterFunction.apply( + orig_x, coeffs, new_direction, self.channel_dim, self.scale + ) + else: + # let self.cur_prob exponentially approach self.min_prob, as + # long as the constraint is inactive. + self.cur_prob = 0.75 * self.cur_prob + 0.25 * self.min_prob + return orig_x + + def _set_direction(self, direction: Tensor): + """ + Sets self.max_eig_direction to a normalized version of `direction` + """ + direction = direction.detach() + direction = direction / direction.norm() + direction_sum = direction.sum().item() + if direction_sum - direction_sum == 0: # no inf/nan + self.max_eig_direction[:] = direction + else: + logging.info( + f"Warning: sum of direction in MaxEig is {direction_sum}, " + "num_channels={self.num_channels}, channel_dim={self.channel_dim}" + ) + + def _find_direction_coeffs( + self, x: Tensor, prev_direction: Tensor + ) -> Tuple[Tensor, Tensor, Tensor]: + """ + Figure out (an approximation to) the proportion of the variance of a set of + feature vectors that can be attributed to the top eigen-direction. + Args: + x: a Tensor of shape (num_frames, num_channels), with num_frames > 1. + prev_direction: a Tensor of shape (num_channels,), that is our previous estimate + of the top eigen-direction, or a random direction if this is the first + iteration. Does not have to be normalized, but should be nonzero. + + Returns: (cur_direction, coeffs), where: + cur_direction: a Tensor of shape (num_channels,) that is the current + estimate of the top eigen-direction. + coeffs: a Tensor of shape (num_frames, 1) that minimizes, or + approximately minimizes, (x - coeffs * cur_direction).norm() + """ + (num_frames, num_channels) = x.shape + assert num_channels > 1 and num_frames > 1 + assert prev_direction.shape == (num_channels,) + # `coeffs` are the coefficients of `prev_direction` in x. + # actually represent the coeffs up to a constant positive factor. + coeffs = (x * prev_direction).sum(dim=1, keepdim=True) + 1.0e-10 + cur_direction = (x * coeffs).sum(dim=0) / ( + (coeffs ** 2).sum() + 1.0e-20 + ) + return cur_direction, coeffs + + +class DoubleSwishFunction(torch.autograd.Function): + """ + double_swish(x) = x * torch.sigmoid(x-1) + This is a definition, originally motivated by its close numerical + similarity to swish(swish(x)), where swish(x) = x * sigmoid(x). + + Memory-efficient derivative computation: + double_swish(x) = x * s, where s(x) = torch.sigmoid(x-1) + double_swish'(x) = d/dx double_swish(x) = x * s'(x) + x' * s(x) = x * s'(x) + s(x). + Now, s'(x) = s(x) * (1-s(x)). + double_swish'(x) = x * s'(x) + s(x). + = x * s(x) * (1-s(x)) + s(x). + = double_swish(x) * (1-s(x)) + s(x) + ... so we just need to remember s(x) but not x itself. + """ + + @staticmethod + def forward(ctx, x: Tensor) -> Tensor: + requires_grad = x.requires_grad + x_dtype = x.dtype + if x.dtype == torch.float16: + x = x.to(torch.float32) + + s = torch.sigmoid(x - 1.0) + y = x * s + + if requires_grad: + deriv = y * (1 - s) + s + # notes on derivative of x * sigmoid(x - 1): + # https://www.wolframalpha.com/input?i=d%2Fdx+%28x+*+sigmoid%28x-1%29%29 + # min \simeq -0.043638. Take floor as -0.043637 so it's a lower bund + # max \simeq 1.1990. Take ceil to be 1.2 so it's an upper bound. + # the combination of "+ torch.rand_like(deriv)" and casting to torch.uint8 (which + # floors), should be expectation-preserving. + floor = -0.043637 + ceil = 1.2 + d_scaled = (deriv - floor) * ( + 255.0 / (ceil - floor) + ) + torch.rand_like(deriv) + if __name__ == "__main__": + # for self-testing only. + assert d_scaled.min() >= 0.0 + assert d_scaled.max() < 256.0 + d_int = d_scaled.to(torch.uint8) + ctx.save_for_backward(d_int) + if x.dtype == torch.float16 or torch.is_autocast_enabled(): + y = y.to(torch.float16) + return y + + @staticmethod + def backward(ctx, y_grad: Tensor) -> Tensor: + (d,) = ctx.saved_tensors + # the same constants as used in forward pass. + floor = -0.043637 + ceil = 1.2 + d = d * ((ceil - floor) / 255.0) + floor + return y_grad * d + + +class DoubleSwish(torch.nn.Module): + def forward(self, x: Tensor) -> Tensor: + """Return double-swish activation function which is an approximation to Swish(Swish(x)), + that we approximate closely with x * sigmoid(x-1). + """ + if torch.jit.is_scripting() or torch.jit.is_tracing(): + return x * torch.sigmoid(x - 1.0) + return DoubleSwishFunction.apply(x) + + +def BalancedDoubleSwish( + d_model, channel_dim=-1, max_abs=10.0, min_prob=0.25 +) -> nn.Sequential: + """ + ActivationBalancer -> DoubleSwish + """ + balancer = ActivationBalancer( + d_model, channel_dim=channel_dim, max_abs=max_abs, min_prob=min_prob + ) + return nn.Sequential( + balancer, + DoubleSwish(), + ) + + +def _test_max_eig(): + for proportion in [0.1, 0.5, 10.0]: + logging.info(f"proportion = {proportion}") + x = torch.randn(100, 128) + direction = torch.randn(128) + coeffs = torch.randn(100, 1) + x += proportion * direction * coeffs + + x.requires_grad = True + + num_channels = 128 + m = MaxEig( + num_channels, 1, 0.5, scale=0.1 # channel_dim # max_var_per_eig + ) # grad_scale + + for _ in range(4): + y = m(x) + + y_grad = torch.randn_like(x) + y.backward(gradient=y_grad) + + if proportion < 0.2: + assert torch.allclose(x.grad, y_grad, atol=1.0e-02) + elif proportion > 1.0: + assert not torch.allclose(x.grad, y_grad) + + +def _test_whiten(): + for proportion in [0.1, 0.5, 10.0]: + logging.info(f"_test_whiten(): proportion = {proportion}") + x = torch.randn(100, 128) + direction = torch.randn(128) + coeffs = torch.randn(100, 1) + x += proportion * direction * coeffs + + x.requires_grad = True + + num_channels = 128 + m = Whiten( + 1, 5.0, prob=1.0, grad_scale=0.1 # num_groups # whitening_limit, + ) # grad_scale + + for _ in range(4): + y = m(x) + + y_grad = torch.randn_like(x) + y.backward(gradient=y_grad) + + if proportion < 0.2: + assert torch.allclose(x.grad, y_grad) + elif proportion > 1.0: + assert not torch.allclose(x.grad, y_grad) + + +def _test_activation_balancer_sign(): + probs = torch.arange(0, 1, 0.01) + N = 1000 + x = 1.0 * ( + (2.0 * (torch.rand(probs.numel(), N) < probs.unsqueeze(-1))) - 1.0 + ) + x = x.detach() + x.requires_grad = True + m = ActivationBalancer( + probs.numel(), + channel_dim=0, + min_positive=0.05, + max_positive=0.95, + max_factor=0.2, + min_abs=0.0, + ) + + y_grad = torch.sign(torch.randn(probs.numel(), N)) + + y = m(x) + y.backward(gradient=y_grad) + print("_test_activation_balancer_sign: x = ", x) + print("_test_activation_balancer_sign: y grad = ", y_grad) + print("_test_activation_balancer_sign: x grad = ", x.grad) + + +def _test_activation_balancer_magnitude(): + magnitudes = torch.arange(0, 1, 0.01) + N = 1000 + x = torch.sign(torch.randn(magnitudes.numel(), N)) * magnitudes.unsqueeze( + -1 + ) + x = x.detach() + x.requires_grad = True + m = ActivationBalancer( + magnitudes.numel(), + channel_dim=0, + min_positive=0.0, + max_positive=1.0, + max_factor=0.2, + min_abs=0.2, + max_abs=0.8, + min_prob=1.0, + ) + + y_grad = torch.sign(torch.randn(magnitudes.numel(), N)) + + y = m(x) + y.backward(gradient=y_grad) + print("_test_activation_balancer_magnitude: x = ", x) + print("_test_activation_balancer_magnitude: y grad = ", y_grad) + print("_test_activation_balancer_magnitude: x grad = ", x.grad) + + +def _test_basic_norm(): + num_channels = 128 + m = BasicNorm(num_channels=num_channels, channel_dim=1) + + x = torch.randn(500, num_channels) + + y = m(x) + + assert y.shape == x.shape + x_rms = (x ** 2).mean().sqrt() + y_rms = (y ** 2).mean().sqrt() + print("x rms = ", x_rms) + print("y rms = ", y_rms) + assert y_rms < x_rms + assert y_rms > 0.5 * x_rms + + +def _test_double_swish_deriv(): + x = torch.randn(10, 12, dtype=torch.double) * 3.0 + x.requires_grad = True + m = DoubleSwish() + + tol = (1.2 - (-0.043637)) / 255.0 + torch.autograd.gradcheck(m, x, atol=tol) + + # for self-test. + x = torch.randn(1000, 1000, dtype=torch.double) * 3.0 + x.requires_grad = True + y = m(x) + + +def _test_softmax(): + a = torch.randn(2, 10, dtype=torch.float64) + b = a.clone() + a.requires_grad = True + b.requires_grad = True + a.softmax(dim=1)[:, 0].sum().backward() + print("a grad = ", a.grad) + softmax(b, dim=1)[:, 0].sum().backward() + print("b grad = ", b.grad) + assert torch.allclose(a.grad, b.grad) + + +if __name__ == "__main__": + logging.getLogger().setLevel(logging.INFO) + torch.set_num_threads(1) + torch.set_num_interop_threads(1) + _test_softmax() + _test_whiten() + _test_max_eig() + _test_activation_balancer_sign() + _test_activation_balancer_magnitude() + _test_basic_norm() + _test_double_swish_deriv() diff --git a/modules/scheduler.py b/modules/scheduler.py new file mode 100644 index 0000000000000000000000000000000000000000..df8ffb4dc9af9b97270b608f0afed828da3985ff --- /dev/null +++ b/modules/scheduler.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 +# Copyright 2023 (authors: Feiteng Li) +# +# See ../../../../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import torch + +from modules.optim import Eden + + +def calc_lr(step, dim_embed, warmup_steps): + return dim_embed ** (-0.5) * min( + step ** (-0.5), step * warmup_steps ** (-1.5) + ) + + +class NoamScheduler(torch.optim.lr_scheduler._LRScheduler): + def __init__( + self, + base_lr: float, + optimizer: torch.optim.Optimizer, + dim_embed: int, + warmup_steps: int, + last_epoch: int = -1, + verbose: bool = False, + ) -> None: + + self.dim_embed = dim_embed + self.base_lr = base_lr + self.warmup_steps = warmup_steps + self.num_param_groups = len(optimizer.param_groups) + + super().__init__(optimizer, last_epoch, verbose) + + def get_lr(self) -> float: + lr = self.base_lr * calc_lr( + self._step_count, self.dim_embed, self.warmup_steps + ) + return [lr] * self.num_param_groups + + def set_step(self, step: int): + self._step_count = step + + +def get_scheduler(params, optimizer): + if params.scheduler_name.lower() == "eden": + scheduler = Eden(optimizer, 5000, 4, warmup_batches=params.warmup_steps) + elif params.scheduler_name.lower() == "noam": + scheduler = NoamScheduler( + params.base_lr, + optimizer, + params.decoder_dim, + warmup_steps=params.warmup_steps, + ) + # scheduler.set_step(params.start_batch or params.batch_idx_train) + elif params.scheduler_name.lower() == "cosine": + scheduler = torch.optim.lr_scheduler.CosineAnnealingLR( + params.warmup_steps, + optimizer, + eta_min=params.base_lr, + ) + else: + raise NotImplementedError(f"{params.scheduler_name}") + + return scheduler diff --git a/modules/transformer.py b/modules/transformer.py new file mode 100644 index 0000000000000000000000000000000000000000..ea8826b193c5053cb8ae74312f65ac95fe440350 --- /dev/null +++ b/modules/transformer.py @@ -0,0 +1,683 @@ +import copy +import numbers +from functools import partial +from typing import Any, Callable, List, Optional, Tuple, Union + +import torch +from torch import Tensor, nn +from torch.nn import functional as F + +from .activation import MultiheadAttention +from .scaling import ActivationBalancer, BalancedDoubleSwish +from .scaling import BasicNorm as _BasicNorm + +_shape_t = Union[int, List[int], torch.Size] + + +class LayerNorm(nn.Module): + __constants__ = ["normalized_shape", "eps", "elementwise_affine"] + normalized_shape: Tuple[int, ...] + eps: float + elementwise_affine: bool + + def __init__( + self, + normalized_shape: _shape_t, + eps: float = 1e-5, + elementwise_affine: bool = True, + device=None, + dtype=None, + ) -> None: + factory_kwargs = {"device": device, "dtype": dtype} + super(LayerNorm, self).__init__() + if isinstance(normalized_shape, numbers.Integral): + # mypy error: incompatible types in assignment + normalized_shape = (normalized_shape,) # type: ignore[assignment] + self.normalized_shape = tuple(normalized_shape) # type: ignore[arg-type] + self.eps = eps + self.elementwise_affine = elementwise_affine + if self.elementwise_affine: + self.weight = nn.Parameter( + torch.empty(self.normalized_shape, **factory_kwargs) + ) + self.bias = nn.Parameter( + torch.empty(self.normalized_shape, **factory_kwargs) + ) + else: + self.register_parameter("weight", None) + self.register_parameter("bias", None) + + self.reset_parameters() + + def reset_parameters(self) -> None: + if self.elementwise_affine: + nn.init.ones_(self.weight) + nn.init.zeros_(self.bias) + + def forward(self, input: Tensor, embedding: Any = None) -> Tensor: + if isinstance(input, tuple): + input, embedding = input + return ( + F.layer_norm( + input, + self.normalized_shape, + self.weight, + self.bias, + self.eps, + ), + embedding, + ) + + assert embedding is None + return F.layer_norm( + input, self.normalized_shape, self.weight, self.bias, self.eps + ) + + def extra_repr(self) -> str: + return ( + "{normalized_shape}, eps={eps}, " + "elementwise_affine={elementwise_affine}".format(**self.__dict__) + ) + + +class AdaptiveLayerNorm(nn.Module): + r"""Adaptive Layer Normalization""" + + def __init__(self, d_model, norm) -> None: + super(AdaptiveLayerNorm, self).__init__() + self.project_layer = nn.Linear(d_model, 2 * d_model) + self.norm = norm + self.d_model = d_model + self.eps = self.norm.eps + + def forward(self, input: Tensor, embedding: Tensor = None) -> Tensor: + if isinstance(input, tuple): + input, embedding = input + weight, bias = torch.split( + self.project_layer(embedding), + split_size_or_sections=self.d_model, + dim=-1, + ) + return (weight * self.norm(input) + bias, embedding) + + weight, bias = torch.split( + self.project_layer(embedding), + split_size_or_sections=self.d_model, + dim=-1, + ) + return weight * self.norm(input) + bias + + +class BasicNorm(_BasicNorm): + def __init__( + self, + d_model: int, + eps: float = 1e-5, + device=None, + dtype=None, + ): + super(BasicNorm, self).__init__(d_model, eps=eps) + + def forward(self, input: Tensor, embedding: Any = None) -> Tensor: + if isinstance(input, tuple): + input, embedding = input + return ( + super(BasicNorm, self).forward(input), + embedding, + ) + + assert embedding is None + return super(BasicNorm, self).forward(input) + + +class BalancedBasicNorm(nn.Module): + def __init__( + self, + d_model: int, + eps: float = 1e-5, + device=None, + dtype=None, + ): + super(BalancedBasicNorm, self).__init__() + self.balancer = ActivationBalancer( + d_model, + channel_dim=-1, + min_positive=0.45, + max_positive=0.55, + max_abs=6.0, + ) + self.norm = BasicNorm(d_model, eps, device=device, dtype=dtype) + + def forward(self, input: Tensor, embedding: Any = None) -> Tensor: + if isinstance(input, tuple): + input, embedding = input + return self.norm((self.balancer(input), embedding)) + + assert embedding is None + return self.norm(self.balancer(input)) + + +class IdentityNorm(nn.Module): + def __init__( + self, + d_model: int, + eps: float = 1e-5, + device=None, + dtype=None, + ) -> None: + super(IdentityNorm, self).__init__() + + def forward(self, input: Tensor, embedding: Any = None) -> Tensor: + if isinstance(input, tuple): + return input + + assert embedding is None + return input + + +class TransformerEncoderLayer(nn.Module): + __constants__ = ["batch_first", "norm_first"] + + def __init__( + self, + d_model: int, + nhead: int, + dim_feedforward: int = 2048, + dropout: float = 0.1, + activation: Union[str, Callable[[Tensor], Tensor]] = F.relu, + batch_first: bool = False, + norm_first: bool = False, + device=None, + dtype=None, + linear1_self_attention_cls: nn.Module = nn.Linear, + linear2_self_attention_cls: nn.Module = nn.Linear, + linear1_feedforward_cls: nn.Module = nn.Linear, + linear2_feedforward_cls: nn.Module = nn.Linear, + layer_norm_cls: nn.Module = LayerNorm, + layer_norm_eps: float = 1e-5, + adaptive_layer_norm=False, + ) -> None: + factory_kwargs = {"device": device, "dtype": dtype} + super(TransformerEncoderLayer, self).__init__() + self.self_attn = MultiheadAttention( + d_model, + nhead, + dropout=dropout, + batch_first=batch_first, + linear1_cls=linear1_self_attention_cls, + linear2_cls=linear2_self_attention_cls, + **factory_kwargs, + ) + + # Implementation of Feedforward model + self.linear1 = linear1_feedforward_cls( + d_model, dim_feedforward, **factory_kwargs + ) + self.dropout = nn.Dropout(dropout) + self.linear2 = linear2_feedforward_cls( + dim_feedforward, d_model, **factory_kwargs + ) + + self.norm_first = norm_first + self.dropout1 = nn.Dropout(dropout) + self.dropout2 = nn.Dropout(dropout) + + # Legacy string support for activation function. + if isinstance(activation, str): + activation = _get_activation_fn(activation) + elif isinstance(activation, partial): + activation = activation(d_model) + elif activation == BalancedDoubleSwish: + activation = BalancedDoubleSwish(d_model) + + # # We can't test self.activation in forward() in TorchScript, + # # so stash some information about it instead. + # if activation is F.relu or isinstance(activation, torch.nn.ReLU): + # self.activation_relu_or_gelu = 1 + # elif activation is F.gelu or isinstance(activation, torch.nn.GELU): + # self.activation_relu_or_gelu = 2 + # else: + # self.activation_relu_or_gelu = 0 + self.activation = activation + + norm1 = layer_norm_cls(d_model, eps=layer_norm_eps, **factory_kwargs) + if layer_norm_cls == IdentityNorm: + norm2 = BalancedBasicNorm( + d_model, eps=layer_norm_eps, **factory_kwargs + ) + else: + norm2 = layer_norm_cls( + d_model, eps=layer_norm_eps, **factory_kwargs + ) + + if adaptive_layer_norm: + self.norm1 = AdaptiveLayerNorm(d_model, norm1) + self.norm2 = AdaptiveLayerNorm(d_model, norm2) + else: + self.norm1 = norm1 + self.norm2 = norm2 + + def __setstate__(self, state): + super(TransformerEncoderLayer, self).__setstate__(state) + if not hasattr(self, "activation"): + self.activation = F.relu + + def forward( + self, + src: Tensor, + src_mask: Optional[Tensor] = None, + src_key_padding_mask: Optional[Tensor] = None, + ) -> Tensor: + r"""Pass the input through the encoder layer. + + Args: + src: the sequence to the encoder layer (required). + src_mask: the mask for the src sequence (optional). + src_key_padding_mask: the mask for the src keys per batch (optional). + + Shape: + see the docs in Transformer class. + """ + x, stage_embedding = src, None + is_src_tuple = False + if isinstance(src, tuple): + x, stage_embedding = src + is_src_tuple = True + + if src_key_padding_mask is not None: + _skpm_dtype = src_key_padding_mask.dtype + if _skpm_dtype != torch.bool and not torch.is_floating_point( + src_key_padding_mask + ): + raise AssertionError( + "only bool and floating types of key_padding_mask are supported" + ) + + if self.norm_first: + x = x + self._sa_block( + self.norm1(x, stage_embedding), + src_mask, + src_key_padding_mask, + ) + x = x + self._ff_block(self.norm2(x, stage_embedding)) + else: + x = self.norm1( + x + self._sa_block(x, src_mask, src_key_padding_mask), + stage_embedding, + ) + x = self.norm2(x + self._ff_block(x), stage_embedding) + + if is_src_tuple: + return (x, stage_embedding) + return x + + def infer( + self, + src: Tensor, + src_mask: Optional[Tensor] = None, + src_key_padding_mask: Optional[Tensor] = None, + past_kv: Optional[Tensor] = None, + use_cache: bool = False, + ): + x, stage_embedding = src, None + is_src_tuple = False + if isinstance(src, tuple): + x, stage_embedding = src + is_src_tuple = True + + if src_key_padding_mask is not None: + _skpm_dtype = src_key_padding_mask.dtype + if _skpm_dtype != torch.bool and not torch.is_floating_point( + src_key_padding_mask + ): + raise AssertionError( + "only bool and floating types of key_padding_mask are supported" + ) + + if self.norm_first: + x_attn_out, kv = self.self_attn.infer( + self.norm1(x, stage_embedding), + attn_mask=src_mask, + key_padding_mask=src_key_padding_mask, + need_weights=False, + past_kv=past_kv, + use_cache=use_cache, + ) + x = x + x_attn_out + x = x + self._ff_block(self.norm2(x, stage_embedding)) + + if is_src_tuple: + return (x, stage_embedding) + return (x, kv) + + # self-attention block + def _sa_block( + self, + x: Tensor, + attn_mask: Optional[Tensor], + key_padding_mask: Optional[Tensor], + ) -> Tensor: + x = self.self_attn( + x, + x, + x, + attn_mask=attn_mask, + key_padding_mask=key_padding_mask, + need_weights=False, + )[0] + return self.dropout1(x) + + # feed forward block + def _ff_block(self, x: Tensor) -> Tensor: + x = self.linear2(self.dropout(self.activation(self.linear1(x)))) + return self.dropout2(x) + + +class TransformerEncoder(nn.Module): + r"""TransformerEncoder is a stack of N encoder layers. Users can build the + BERT(https://arxiv.org/abs/1810.04805) model with corresponding parameters. + + Args: + encoder_layer: an instance of the TransformerEncoderLayer() class (required). + num_layers: the number of sub-encoder-layers in the encoder (required). + norm: the layer normalization component (optional). + enable_nested_tensor: if True, input will automatically convert to nested tensor + (and convert back on output). This will improve the overall performance of + TransformerEncoder when padding rate is high. Default: ``True`` (enabled). + + Examples:: + >>> encoder_layer = TransformerEncoderLayer(d_model=512, nhead=8) + >>> transformer_encoder = TransformerEncoder(encoder_layer, num_layers=6) + >>> src = torch.rand(10, 32, 512) + >>> out = transformer_encoder(src) + """ + __constants__ = ["norm"] + + def __init__(self, encoder_layer, num_layers, norm=None): + super(TransformerEncoder, self).__init__() + self.layers = _get_clones(encoder_layer, num_layers) + self.num_layers = num_layers + self.norm = norm + + def forward( + self, + src: Tensor, + mask: Optional[Tensor] = None, + src_key_padding_mask: Optional[Tensor] = None, + return_layer_states: bool = False, + ) -> Tensor: + r"""Pass the input through the encoder layers in turn. + + Args: + src: the sequence to the encoder (required). + mask: the mask for the src sequence (optional). + src_key_padding_mask: the mask for the src keys per batch (optional). + return_layer_states: return layers' state (optional). + + Shape: + see the docs in Transformer class. + """ + if return_layer_states: + layer_states = [] # layers' output + output = src + for mod in self.layers: + output = mod( + output, + src_mask=mask, + src_key_padding_mask=src_key_padding_mask, + ) + layer_states.append(output[0]) + + if self.norm is not None: + output = self.norm(output) + + return layer_states, output + + output = src + for mod in self.layers: + output = mod( + output, src_mask=mask, src_key_padding_mask=src_key_padding_mask + ) + + if self.norm is not None: + output = self.norm(output) + + return output + + def infer( + self, + src: Tensor, + mask: Optional[Tensor] = None, + src_key_padding_mask: Optional[Tensor] = None, + return_layer_states: bool = False, + past_kv: Optional[Tensor] = None, + use_cache: bool = False, + ): + if past_kv is None: + past_length = 0 + past_kv = tuple([None] * self.num_layers) + else: + past_length = past_kv[0][0].size(-2) + new_kv = () if use_cache else None + output = src + for mod, past_layer_kv in zip(self.layers, past_kv): + output, kv = mod.infer( + output, src_mask=mask, src_key_padding_mask=src_key_padding_mask, past_kv=past_layer_kv, use_cache=use_cache + ) + if use_cache: + new_kv = new_kv + (kv,) + + if self.norm is not None: + output = self.norm(output) + + return output, new_kv + + +class TransformerDecoderLayer(nn.Module): + __constants__ = ["batch_first", "norm_first"] + + def __init__( + self, + d_model: int, + nhead: int, + dim_feedforward: int = 2048, + dropout: float = 0.1, + activation: Union[str, Callable[[Tensor], Tensor]] = F.relu, + linear1_self_attention_cls: nn.Module = nn.Linear, + linear2_self_attention_cls: nn.Module = nn.Linear, + linear1_feedforward_cls: nn.Module = nn.Linear, + linear2_feedforward_cls: nn.Module = nn.Linear, + batch_first: bool = False, + norm_first: bool = False, + device=None, + dtype=None, + layer_norm_cls: nn.Module = LayerNorm, + layer_norm_eps: float = 1e-5, + adaptive_layer_norm=False, + ) -> None: + factory_kwargs = {"device": device, "dtype": dtype} + super(TransformerDecoderLayer, self).__init__() + self.self_attn = MultiheadAttention( + d_model, + nhead, + dropout=dropout, + batch_first=batch_first, + linear1_cls=linear1_self_attention_cls, + linear2_cls=linear2_self_attention_cls, + **factory_kwargs, + ) + self.multihead_attn = MultiheadAttention( + d_model, + nhead, + dropout=dropout, + batch_first=batch_first, + linear1_cls=linear1_self_attention_cls, + linear2_cls=linear2_self_attention_cls, + **factory_kwargs, + ) + # Implementation of Feedforward model + self.linear1 = linear1_feedforward_cls( + d_model, dim_feedforward, **factory_kwargs + ) + self.dropout = nn.Dropout(dropout) + self.linear2 = linear2_feedforward_cls( + dim_feedforward, d_model, **factory_kwargs + ) + + self.norm_first = norm_first + self.dropout1 = nn.Dropout(dropout) + self.dropout2 = nn.Dropout(dropout) + self.dropout3 = nn.Dropout(dropout) + + # Legacy string support for activation function. + if isinstance(activation, str): + self.activation = _get_activation_fn(activation) + elif isinstance(activation, partial): + self.activation = activation(d_model) + elif activation == BalancedDoubleSwish: + self.activation = BalancedDoubleSwish(d_model) + else: + self.activation = activation + + if adaptive_layer_norm: + norm1 = layer_norm_cls( + d_model, eps=layer_norm_eps, **factory_kwargs + ) + norm2 = layer_norm_cls( + d_model, eps=layer_norm_eps, **factory_kwargs + ) + norm3 = layer_norm_cls( + d_model, eps=layer_norm_eps, **factory_kwargs + ) + + self.norm1 = AdaptiveLayerNorm(d_model, norm1) + self.norm2 = AdaptiveLayerNorm(d_model, norm2) + self.norm3 = AdaptiveLayerNorm(d_model, norm3) + else: + self.norm1 = layer_norm_cls( + d_model, eps=layer_norm_eps, **factory_kwargs + ) + self.norm2 = layer_norm_cls( + d_model, eps=layer_norm_eps, **factory_kwargs + ) + if layer_norm_cls == IdentityNorm: + self.norm3 = BalancedBasicNorm( + d_model, eps=layer_norm_eps, **factory_kwargs + ) + else: + self.norm3 = layer_norm_cls( + d_model, eps=layer_norm_eps, **factory_kwargs + ) + + def forward( + self, + tgt: Tensor, + memory: Tensor, + tgt_mask: Optional[Tensor] = None, + memory_mask: Optional[Tensor] = None, + tgt_key_padding_mask: Optional[Tensor] = None, + memory_key_padding_mask: Optional[Tensor] = None, + ) -> Tensor: + r"""Pass the inputs (and mask) through the decoder layer. + + Args: + tgt: the sequence to the decoder layer (required). + memory: the sequence from the last layer of the encoder (required). + tgt_mask: the mask for the tgt sequence (optional). + memory_mask: the mask for the memory sequence (optional). + tgt_key_padding_mask: the mask for the tgt keys per batch (optional). + memory_key_padding_mask: the mask for the memory keys per batch (optional). + + Shape: + see the docs in Transformer class. + """ + tgt_is_tuple = False + if isinstance(tgt, tuple): + x, stage_embedding = tgt + tgt_is_tuple = True + else: + x, stage_embedding = tgt, None + + if self.norm_first: + x = x + self._sa_block( + self.norm1(x, stage_embedding), tgt_mask, tgt_key_padding_mask + ) + x = x + self._mha_block( + self.norm2(x, stage_embedding), + memory, + memory_mask, + memory_key_padding_mask, + ) + x = x + self._ff_block(self.norm3(x, stage_embedding)) + else: + x = self.norm1( + x + self._sa_block(x, tgt_mask, tgt_key_padding_mask), + stage_embedding, + ) + x = self.norm2( + x + + self._mha_block( + x, memory, memory_mask, memory_key_padding_mask + ), + stage_embedding, + ) + x = self.norm3(x + self._ff_block(x), stage_embedding) + + if tgt_is_tuple: + return (x, stage_embedding) + return x + + # self-attention block + def _sa_block( + self, + x: Tensor, + attn_mask: Optional[Tensor], + key_padding_mask: Optional[Tensor], + ) -> Tensor: + x = self.self_attn( + x, + x, + x, + attn_mask=attn_mask, + key_padding_mask=key_padding_mask, + need_weights=False, + )[0] + return self.dropout1(x) + + # multihead attention block + def _mha_block( + self, + x: Tensor, + mem: Tensor, + attn_mask: Optional[Tensor], + key_padding_mask: Optional[Tensor], + ) -> Tensor: + x = self.multihead_attn( + x, + mem, + mem, + attn_mask=attn_mask, + key_padding_mask=key_padding_mask, + need_weights=False, + )[0] + return self.dropout2(x) + + # feed forward block + def _ff_block(self, x: Tensor) -> Tensor: + x = self.linear2(self.dropout(self.activation(self.linear1(x)))) + return self.dropout3(x) + + +def _get_clones(module, N): + return nn.ModuleList([copy.deepcopy(module) for i in range(N)]) + + +def _get_activation_fn(activation: str) -> Callable[[Tensor], Tensor]: + if activation == "relu": + return F.relu + elif activation == "gelu": + return F.gelu + + raise RuntimeError( + "activation should be relu/gelu, not {}".format(activation) + ) diff --git a/nltk_data/tokenizers/punkt/.DS_Store b/nltk_data/tokenizers/punkt/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..3d15671132023443e5cabd15df83766b8fb71f38 Binary files /dev/null and b/nltk_data/tokenizers/punkt/.DS_Store differ diff --git a/nltk_data/tokenizers/punkt/PY3/README b/nltk_data/tokenizers/punkt/PY3/README new file mode 100644 index 0000000000000000000000000000000000000000..49a637cb19b758348071ed19edb29d33ab435b33 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/README @@ -0,0 +1,98 @@ +Pretrained Punkt Models -- Jan Strunk (New version trained after issues 313 and 514 had been corrected) + +Most models were prepared using the test corpora from Kiss and Strunk (2006). Additional models have +been contributed by various people using NLTK for sentence boundary detection. + +For information about how to use these models, please confer the tokenization HOWTO: +http://nltk.googlecode.com/svn/trunk/doc/howto/tokenize.html +and chapter 3.8 of the NLTK book: +http://nltk.googlecode.com/svn/trunk/doc/book/ch03.html#sec-segmentation + +There are pretrained tokenizers for the following languages: + +File Language Source Contents Size of training corpus(in tokens) Model contributed by +======================================================================================================================================================================= +czech.pickle Czech Multilingual Corpus 1 (ECI) Lidove Noviny ~345,000 Jan Strunk / Tibor Kiss + Literarni Noviny +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +danish.pickle Danish Avisdata CD-Rom Ver. 1.1. 1995 Berlingske Tidende ~550,000 Jan Strunk / Tibor Kiss + (Berlingske Avisdata, Copenhagen) Weekend Avisen +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +dutch.pickle Dutch Multilingual Corpus 1 (ECI) De Limburger ~340,000 Jan Strunk / Tibor Kiss +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +english.pickle English Penn Treebank (LDC) Wall Street Journal ~469,000 Jan Strunk / Tibor Kiss + (American) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +estonian.pickle Estonian University of Tartu, Estonia Eesti Ekspress ~359,000 Jan Strunk / Tibor Kiss +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +finnish.pickle Finnish Finnish Parole Corpus, Finnish Books and major national ~364,000 Jan Strunk / Tibor Kiss + Text Bank (Suomen Kielen newspapers + Tekstipankki) + Finnish Center for IT Science + (CSC) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +french.pickle French Multilingual Corpus 1 (ECI) Le Monde ~370,000 Jan Strunk / Tibor Kiss + (European) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +german.pickle German Neue Zürcher Zeitung AG Neue Zürcher Zeitung ~847,000 Jan Strunk / Tibor Kiss + (Switzerland) CD-ROM + (Uses "ss" + instead of "ß") +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +greek.pickle Greek Efstathios Stamatatos To Vima (TO BHMA) ~227,000 Jan Strunk / Tibor Kiss +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +italian.pickle Italian Multilingual Corpus 1 (ECI) La Stampa, Il Mattino ~312,000 Jan Strunk / Tibor Kiss +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +norwegian.pickle Norwegian Centre for Humanities Bergens Tidende ~479,000 Jan Strunk / Tibor Kiss + (Bokmål and Information Technologies, + Nynorsk) Bergen +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +polish.pickle Polish Polish National Corpus Literature, newspapers, etc. ~1,000,000 Krzysztof Langner + (http://www.nkjp.pl/) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +portuguese.pickle Portuguese CETENFolha Corpus Folha de São Paulo ~321,000 Jan Strunk / Tibor Kiss + (Brazilian) (Linguateca) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +slovene.pickle Slovene TRACTOR Delo ~354,000 Jan Strunk / Tibor Kiss + Slovene Academy for Arts + and Sciences +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +spanish.pickle Spanish Multilingual Corpus 1 (ECI) Sur ~353,000 Jan Strunk / Tibor Kiss + (European) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +swedish.pickle Swedish Multilingual Corpus 1 (ECI) Dagens Nyheter ~339,000 Jan Strunk / Tibor Kiss + (and some other texts) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +turkish.pickle Turkish METU Turkish Corpus Milliyet ~333,000 Jan Strunk / Tibor Kiss + (Türkçe Derlem Projesi) + University of Ankara +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +The corpora contained about 400,000 tokens on average and mostly consisted of newspaper text converted to +Unicode using the codecs module. + +Kiss, Tibor and Strunk, Jan (2006): Unsupervised Multilingual Sentence Boundary Detection. +Computational Linguistics 32: 485-525. + +---- Training Code ---- + +# import punkt +import nltk.tokenize.punkt + +# Make a new Tokenizer +tokenizer = nltk.tokenize.punkt.PunktSentenceTokenizer() + +# Read in training corpus (one example: Slovene) +import codecs +text = codecs.open("slovene.plain","Ur","iso-8859-2").read() + +# Train tokenizer +tokenizer.train(text) + +# Dump pickled tokenizer +import pickle +out = open("slovene.pickle","wb") +pickle.dump(tokenizer, out) +out.close() + +--------- diff --git a/nltk_data/tokenizers/punkt/PY3/czech.pickle b/nltk_data/tokenizers/punkt/PY3/czech.pickle new file mode 100644 index 0000000000000000000000000000000000000000..e62c4b16167fc65f3d73e464f68f59568663dd7d --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/czech.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64b0734b6fbe8e8d7cac79f48d1dd9f853824e57c4e3594dadd74ba2c1d97f50 +size 1119050 diff --git a/nltk_data/tokenizers/punkt/PY3/danish.pickle b/nltk_data/tokenizers/punkt/PY3/danish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..597395f54052d39d89fd9e5dcfce778a0633f7af --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/danish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6189c7dd254e29e2bd406a7f6a4336297c8953214792466a790ea4444223ceb3 +size 1191710 diff --git a/nltk_data/tokenizers/punkt/PY3/dutch.pickle b/nltk_data/tokenizers/punkt/PY3/dutch.pickle new file mode 100644 index 0000000000000000000000000000000000000000..fc63f96dd51e24d9689bfc6a31873e8b1e799a71 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/dutch.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fda0d6a13f02e8898daec7fe923da88e25abe081bcfa755c0e015075c215fe4c +size 693759 diff --git a/nltk_data/tokenizers/punkt/PY3/english.pickle b/nltk_data/tokenizers/punkt/PY3/english.pickle new file mode 100644 index 0000000000000000000000000000000000000000..f80cfde61f08d459fcf7d0392a17c29796b7a471 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/english.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cad3758596392364e3be9803dbd7ebeda384b68937b488a01365f5551bb942c +size 406697 diff --git a/nltk_data/tokenizers/punkt/PY3/estonian.pickle b/nltk_data/tokenizers/punkt/PY3/estonian.pickle new file mode 100644 index 0000000000000000000000000000000000000000..34114d79fc9059688ae2aff00c852c7c0280008c --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/estonian.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b364f72538d17b146a98009ad239a8096ce6c0a8b02958c0bc776ecd0c58a25f +size 1499502 diff --git a/nltk_data/tokenizers/punkt/PY3/finnish.pickle b/nltk_data/tokenizers/punkt/PY3/finnish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..32d3cab7cee7f42af839526d7640c41e8c6e712b --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/finnish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a4b5ff5500ee851c456f9dd40d5fc0d8c1859c88eb3178de1317d26b7d22833 +size 1852226 diff --git a/nltk_data/tokenizers/punkt/PY3/french.pickle b/nltk_data/tokenizers/punkt/PY3/french.pickle new file mode 100644 index 0000000000000000000000000000000000000000..15eb9f852e0735235abe876a705315096aa7062f --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/french.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28e3a4cd2971989b3cb9fd3433a6f15d17981e464db2be039364313b5de94f29 +size 553575 diff --git a/nltk_data/tokenizers/punkt/PY3/german.pickle b/nltk_data/tokenizers/punkt/PY3/german.pickle new file mode 100644 index 0000000000000000000000000000000000000000..28180cd0382e4bf0627dafbce40ffe640c9551c2 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/german.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddcbbe85e2042a019b1a6e37fd8c153286c38ba201fae0f5bfd9a3f74abae25c +size 1463575 diff --git a/nltk_data/tokenizers/punkt/PY3/greek.pickle b/nltk_data/tokenizers/punkt/PY3/greek.pickle new file mode 100644 index 0000000000000000000000000000000000000000..bda22e88d55836afee8f64ca9c18727cacc9d7c9 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/greek.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85dabc44ab90a5f208ef37ff6b4892ebe7e740f71fb4da47cfd95417ca3e22fd +size 876006 diff --git a/nltk_data/tokenizers/punkt/PY3/italian.pickle b/nltk_data/tokenizers/punkt/PY3/italian.pickle new file mode 100644 index 0000000000000000000000000000000000000000..78cee51480c1e7a7c6ed33a63e73b3f90ea983bf --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/italian.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68a94007b1e4ffdc4d1a190185ca5442c3dafeb17ab39d30329e84cd74a43947 +size 615089 diff --git a/nltk_data/tokenizers/punkt/PY3/malayalam.pickle b/nltk_data/tokenizers/punkt/PY3/malayalam.pickle new file mode 100644 index 0000000000000000000000000000000000000000..780c35e0ffb8b8390c60c3766d657410a8a0861c --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/malayalam.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f8cf58acbdb7f472ac40affc13663be42dafb47c15030c11ade0444c9e0e53d +size 221207 diff --git a/nltk_data/tokenizers/punkt/PY3/norwegian.pickle b/nltk_data/tokenizers/punkt/PY3/norwegian.pickle new file mode 100644 index 0000000000000000000000000000000000000000..8c82d791ed82719d0afd2fe35cd2ba96e50b117d --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/norwegian.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ff7a46d1438b311457d15d7763060b8d3270852c1850fd788c5cee194dc4a1d +size 1181271 diff --git a/nltk_data/tokenizers/punkt/PY3/polish.pickle b/nltk_data/tokenizers/punkt/PY3/polish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..6da78bc0b08152010057e7c0a5c64bd9253180f9 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/polish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:624900ae3ddfb4854a98c5d3b8b1c9bb719975f33fee61ce1441dab9f8a00718 +size 1738386 diff --git a/nltk_data/tokenizers/punkt/PY3/portuguese.pickle b/nltk_data/tokenizers/punkt/PY3/portuguese.pickle new file mode 100644 index 0000000000000000000000000000000000000000..ec190248fd4c46bc29904463f0d94e6a88ff8137 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/portuguese.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02a0b7b25c3c7471e1791b66a31bbb530afbb0160aee4fcecf0107652067b4a1 +size 611919 diff --git a/nltk_data/tokenizers/punkt/PY3/russian.pickle b/nltk_data/tokenizers/punkt/PY3/russian.pickle new file mode 100644 index 0000000000000000000000000000000000000000..ca30476d51b8cd2d4d3d0bf2dbefb5c98240849d --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/russian.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:549762f8190024d89b511472df21a3a135eee5d9233e63ac244db737c2c61d7e +size 33020 diff --git a/nltk_data/tokenizers/punkt/PY3/slovene.pickle b/nltk_data/tokenizers/punkt/PY3/slovene.pickle new file mode 100644 index 0000000000000000000000000000000000000000..b95a018444f3d9dfa5b0c5e9ac157aa352fac415 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/slovene.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52ef2cc0ed27d79b3aa635cbbc40ad811883a75a4b8a8be1ae406972870fd864 +size 734444 diff --git a/nltk_data/tokenizers/punkt/PY3/spanish.pickle b/nltk_data/tokenizers/punkt/PY3/spanish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..e322355abaedb8e4005f0d9fad6ec4ef7db38354 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/spanish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:164a50fadc5a49f8ec7426eae11d3111ee752b48a3ef373d47745011192a5984 +size 562337 diff --git a/nltk_data/tokenizers/punkt/PY3/swedish.pickle b/nltk_data/tokenizers/punkt/PY3/swedish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..75975c08f17a0274985c418e4e38d06f51deb9f5 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/swedish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0f7d538bfd5266633b09e842cd92e9e0ac10f1d923bf211e1497972ddc47318 +size 979681 diff --git a/nltk_data/tokenizers/punkt/PY3/turkish.pickle b/nltk_data/tokenizers/punkt/PY3/turkish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..9c15a8c22a7cc7bc8de50b1e63922153189dcbd4 --- /dev/null +++ b/nltk_data/tokenizers/punkt/PY3/turkish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae68ef5863728ac5332e87eb1f6bae772ff32a13a4caa2b01a5c68103e853c5b +size 1017038 diff --git a/nltk_data/tokenizers/punkt/README b/nltk_data/tokenizers/punkt/README new file mode 100644 index 0000000000000000000000000000000000000000..49a637cb19b758348071ed19edb29d33ab435b33 --- /dev/null +++ b/nltk_data/tokenizers/punkt/README @@ -0,0 +1,98 @@ +Pretrained Punkt Models -- Jan Strunk (New version trained after issues 313 and 514 had been corrected) + +Most models were prepared using the test corpora from Kiss and Strunk (2006). Additional models have +been contributed by various people using NLTK for sentence boundary detection. + +For information about how to use these models, please confer the tokenization HOWTO: +http://nltk.googlecode.com/svn/trunk/doc/howto/tokenize.html +and chapter 3.8 of the NLTK book: +http://nltk.googlecode.com/svn/trunk/doc/book/ch03.html#sec-segmentation + +There are pretrained tokenizers for the following languages: + +File Language Source Contents Size of training corpus(in tokens) Model contributed by +======================================================================================================================================================================= +czech.pickle Czech Multilingual Corpus 1 (ECI) Lidove Noviny ~345,000 Jan Strunk / Tibor Kiss + Literarni Noviny +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +danish.pickle Danish Avisdata CD-Rom Ver. 1.1. 1995 Berlingske Tidende ~550,000 Jan Strunk / Tibor Kiss + (Berlingske Avisdata, Copenhagen) Weekend Avisen +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +dutch.pickle Dutch Multilingual Corpus 1 (ECI) De Limburger ~340,000 Jan Strunk / Tibor Kiss +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +english.pickle English Penn Treebank (LDC) Wall Street Journal ~469,000 Jan Strunk / Tibor Kiss + (American) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +estonian.pickle Estonian University of Tartu, Estonia Eesti Ekspress ~359,000 Jan Strunk / Tibor Kiss +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +finnish.pickle Finnish Finnish Parole Corpus, Finnish Books and major national ~364,000 Jan Strunk / Tibor Kiss + Text Bank (Suomen Kielen newspapers + Tekstipankki) + Finnish Center for IT Science + (CSC) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +french.pickle French Multilingual Corpus 1 (ECI) Le Monde ~370,000 Jan Strunk / Tibor Kiss + (European) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +german.pickle German Neue Zürcher Zeitung AG Neue Zürcher Zeitung ~847,000 Jan Strunk / Tibor Kiss + (Switzerland) CD-ROM + (Uses "ss" + instead of "ß") +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +greek.pickle Greek Efstathios Stamatatos To Vima (TO BHMA) ~227,000 Jan Strunk / Tibor Kiss +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +italian.pickle Italian Multilingual Corpus 1 (ECI) La Stampa, Il Mattino ~312,000 Jan Strunk / Tibor Kiss +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +norwegian.pickle Norwegian Centre for Humanities Bergens Tidende ~479,000 Jan Strunk / Tibor Kiss + (Bokmål and Information Technologies, + Nynorsk) Bergen +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +polish.pickle Polish Polish National Corpus Literature, newspapers, etc. ~1,000,000 Krzysztof Langner + (http://www.nkjp.pl/) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +portuguese.pickle Portuguese CETENFolha Corpus Folha de São Paulo ~321,000 Jan Strunk / Tibor Kiss + (Brazilian) (Linguateca) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +slovene.pickle Slovene TRACTOR Delo ~354,000 Jan Strunk / Tibor Kiss + Slovene Academy for Arts + and Sciences +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +spanish.pickle Spanish Multilingual Corpus 1 (ECI) Sur ~353,000 Jan Strunk / Tibor Kiss + (European) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +swedish.pickle Swedish Multilingual Corpus 1 (ECI) Dagens Nyheter ~339,000 Jan Strunk / Tibor Kiss + (and some other texts) +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- +turkish.pickle Turkish METU Turkish Corpus Milliyet ~333,000 Jan Strunk / Tibor Kiss + (Türkçe Derlem Projesi) + University of Ankara +----------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +The corpora contained about 400,000 tokens on average and mostly consisted of newspaper text converted to +Unicode using the codecs module. + +Kiss, Tibor and Strunk, Jan (2006): Unsupervised Multilingual Sentence Boundary Detection. +Computational Linguistics 32: 485-525. + +---- Training Code ---- + +# import punkt +import nltk.tokenize.punkt + +# Make a new Tokenizer +tokenizer = nltk.tokenize.punkt.PunktSentenceTokenizer() + +# Read in training corpus (one example: Slovene) +import codecs +text = codecs.open("slovene.plain","Ur","iso-8859-2").read() + +# Train tokenizer +tokenizer.train(text) + +# Dump pickled tokenizer +import pickle +out = open("slovene.pickle","wb") +pickle.dump(tokenizer, out) +out.close() + +--------- diff --git a/nltk_data/tokenizers/punkt/czech.pickle b/nltk_data/tokenizers/punkt/czech.pickle new file mode 100644 index 0000000000000000000000000000000000000000..4f651f2a5e9d60a8ca288f6a197e82dfbedaf83f --- /dev/null +++ b/nltk_data/tokenizers/punkt/czech.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c085f6283bed0f1390d36a55d126ccc29c9b4dfcd2705e862b1711b7c6bb5ab +size 1424691 diff --git a/nltk_data/tokenizers/punkt/danish.pickle b/nltk_data/tokenizers/punkt/danish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..6c27301c0397767d8e799bafa195b2268514a993 --- /dev/null +++ b/nltk_data/tokenizers/punkt/danish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df8366ad67db22b1f838cd63fcc589a6006faf66d7a46be5312d9c487ce2c811 +size 1427491 diff --git a/nltk_data/tokenizers/punkt/dutch.pickle b/nltk_data/tokenizers/punkt/dutch.pickle new file mode 100644 index 0000000000000000000000000000000000000000..0e4bd620557bbdfe4b2812ef25c42d221afdf29b --- /dev/null +++ b/nltk_data/tokenizers/punkt/dutch.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12f46024d3c840529b56ac2a3118b80b8dc77705734bcdd71ff7c46f5808395e +size 839761 diff --git a/nltk_data/tokenizers/punkt/english.pickle b/nltk_data/tokenizers/punkt/english.pickle new file mode 100644 index 0000000000000000000000000000000000000000..d1b726e84cdc06ba8c36ba10c2a2bfb667116398 --- /dev/null +++ b/nltk_data/tokenizers/punkt/english.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e2d25d5adc3ee51ac192ce611bdc5378acae7136af5d3c52c2903c669f9aff0 +size 495006 diff --git a/nltk_data/tokenizers/punkt/estonian.pickle b/nltk_data/tokenizers/punkt/estonian.pickle new file mode 100644 index 0000000000000000000000000000000000000000..de532830927ffa9b9d1b0171b4d353d618fd62e2 --- /dev/null +++ b/nltk_data/tokenizers/punkt/estonian.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9083ef6ef3d5b9992a8a4ea09e889a87be75e2122ad25648307178960634cd8d +size 1803082 diff --git a/nltk_data/tokenizers/punkt/finnish.pickle b/nltk_data/tokenizers/punkt/finnish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..2aa84bceb2056b3194c451a1b9bad6945e75ced0 --- /dev/null +++ b/nltk_data/tokenizers/punkt/finnish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce1b4dbe72e400e902220061457f9bd5f491ec37f7af468bc4694980c9623817 +size 2192034 diff --git a/nltk_data/tokenizers/punkt/french.pickle b/nltk_data/tokenizers/punkt/french.pickle new file mode 100644 index 0000000000000000000000000000000000000000..70eb18591b40d2c3cece0db40dbeb2634aa68210 --- /dev/null +++ b/nltk_data/tokenizers/punkt/french.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e0be48e38a54232ea88c817cf34c1f1f8f44954e21f118c65af9f2d6a43cdbd +size 664010 diff --git a/nltk_data/tokenizers/punkt/german.pickle b/nltk_data/tokenizers/punkt/german.pickle new file mode 100644 index 0000000000000000000000000000000000000000..a05c8ba0bb8e8cf9921d59c457b121637a62dcfb --- /dev/null +++ b/nltk_data/tokenizers/punkt/german.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:251c2f4bde61ab3fc1cabc2158c62e6ab285fddd16267d2d3885f71e3ed61c7f +size 1708012 diff --git a/nltk_data/tokenizers/punkt/greek.pickle b/nltk_data/tokenizers/punkt/greek.pickle new file mode 100644 index 0000000000000000000000000000000000000000..7ebf76532e81b8f973416062709ee9551e58ce48 --- /dev/null +++ b/nltk_data/tokenizers/punkt/greek.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b3a6da093ed2df084ded6dc49c88f101d47a0c69398f19ae50af6785d93b1c5 +size 2042362 diff --git a/nltk_data/tokenizers/punkt/italian.pickle b/nltk_data/tokenizers/punkt/italian.pickle new file mode 100644 index 0000000000000000000000000000000000000000..ed3342f946c83398a29d8b1f68031164a581844b --- /dev/null +++ b/nltk_data/tokenizers/punkt/italian.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41e6aaf554e696703b3d41890973368b9b2f17c342745c07369742928d363731 +size 748532 diff --git a/nltk_data/tokenizers/punkt/malayalam.pickle b/nltk_data/tokenizers/punkt/malayalam.pickle new file mode 100644 index 0000000000000000000000000000000000000000..780c35e0ffb8b8390c60c3766d657410a8a0861c --- /dev/null +++ b/nltk_data/tokenizers/punkt/malayalam.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f8cf58acbdb7f472ac40affc13663be42dafb47c15030c11ade0444c9e0e53d +size 221207 diff --git a/nltk_data/tokenizers/punkt/norwegian.pickle b/nltk_data/tokenizers/punkt/norwegian.pickle new file mode 100644 index 0000000000000000000000000000000000000000..3a1380a3bf369be05df183585024678e4f1cef90 --- /dev/null +++ b/nltk_data/tokenizers/punkt/norwegian.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45828b0d57da9a66f107ea277752f6c1cbde51b9f9feba173b2c6e2edb28af21 +size 1422756 diff --git a/nltk_data/tokenizers/punkt/polish.pickle b/nltk_data/tokenizers/punkt/polish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..4d5a5df545405d93bd9ece97d53aff20f6a5f8ae --- /dev/null +++ b/nltk_data/tokenizers/punkt/polish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79d09a9406f90dbf20f8cbb0a04a7aa0bdb4b71604eda31e97c3df2de5cd2837 +size 2287622 diff --git a/nltk_data/tokenizers/punkt/portuguese.pickle b/nltk_data/tokenizers/punkt/portuguese.pickle new file mode 100644 index 0000000000000000000000000000000000000000..ca89c9fd14236f7d694c6d8357a25243abf1c308 --- /dev/null +++ b/nltk_data/tokenizers/punkt/portuguese.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c09561e770b6f17e3d85112f83007ff1397dec66c23acb15b9fe046eaefd2e86 +size 739845 diff --git a/nltk_data/tokenizers/punkt/russian.pickle b/nltk_data/tokenizers/punkt/russian.pickle new file mode 100644 index 0000000000000000000000000000000000000000..1d13c7c860beecd80034bee8de1dd20ef60be149 --- /dev/null +++ b/nltk_data/tokenizers/punkt/russian.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc984432fbe31f7000014f8047502476889169c60f09be5413ca09276b16c909 +size 33027 diff --git a/nltk_data/tokenizers/punkt/slovene.pickle b/nltk_data/tokenizers/punkt/slovene.pickle new file mode 100644 index 0000000000000000000000000000000000000000..ba71931a252b17a1314f1abafaf0f24a0ee1e0d0 --- /dev/null +++ b/nltk_data/tokenizers/punkt/slovene.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dc83b900e347c16ed0123868369107cd19d1a6125d099e26889580c4dbba277 +size 939791 diff --git a/nltk_data/tokenizers/punkt/spanish.pickle b/nltk_data/tokenizers/punkt/spanish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..cce57b945e1700cf90f1423731419ae014654684 --- /dev/null +++ b/nltk_data/tokenizers/punkt/spanish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61afae663cb2968148e0e27d5a3fcd4a5f19648688800caf8e7f998eaa75f4a7 +size 680466 diff --git a/nltk_data/tokenizers/punkt/swedish.pickle b/nltk_data/tokenizers/punkt/swedish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..e7f0ce46d4cbfe88c9aa026bd7f05416f1f52c5b --- /dev/null +++ b/nltk_data/tokenizers/punkt/swedish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5794208b223b2a54bd4ed565045172f9c6ef80b5bead94f71a5499455cda955 +size 1168214 diff --git a/nltk_data/tokenizers/punkt/turkish.pickle b/nltk_data/tokenizers/punkt/turkish.pickle new file mode 100644 index 0000000000000000000000000000000000000000..86dcb657a8997cd830c4a0edfcd044fdfd038a55 --- /dev/null +++ b/nltk_data/tokenizers/punkt/turkish.pickle @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2abb5d7ec4e80aeeb994407254a2e1a0928520727cc25f7bd3fc9ce0b5a78c1 +size 1363199 diff --git a/presets/acou_1.npz b/presets/acou_1.npz new file mode 100644 index 0000000000000000000000000000000000000000..f6c51bd1c0a5dc6eebcf3c63c17c05d1d612f6ff --- /dev/null +++ b/presets/acou_1.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:470ce66fc24a2d14e162343381f7d93ef0a3af51edf5fd37240c21f492b4e769 +size 15650 diff --git a/presets/acou_2.npz b/presets/acou_2.npz new file mode 100644 index 0000000000000000000000000000000000000000..1e055e2639e010f57e74d11cd37d134f8d5ee05e --- /dev/null +++ b/presets/acou_2.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec1c5328751cadeed5356d4264759799ad96d33ea8dd4f8a3d0a80dd8ddb0e74 +size 15426 diff --git a/presets/acou_3.npz b/presets/acou_3.npz new file mode 100644 index 0000000000000000000000000000000000000000..1eb6978a203b4df5124bf745c1fde591d1864ce7 --- /dev/null +++ b/presets/acou_3.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03f241b094a32b3f542e74374183c6d15e8b70ae73ceeafb11bfd4ee6b8b4a3a +size 15410 diff --git a/presets/acou_4.npz b/presets/acou_4.npz new file mode 100644 index 0000000000000000000000000000000000000000..c0e623ffed42dd0fd089e928a79eeb25721ba6d3 --- /dev/null +++ b/presets/acou_4.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52b96f32863f13f84cf7ac4a27d2bc95cea70c350a037f4d1890b20b8da9501e +size 15506 diff --git a/presets/alan.npz b/presets/alan.npz new file mode 100644 index 0000000000000000000000000000000000000000..156afabccea6548d1a1e65e4b5bb95b6b85e493f --- /dev/null +++ b/presets/alan.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28838c3f0b2f9f315b34e9b940f30641306f0cadc5c527857cd1cc408547ed1c +size 50002 diff --git a/presets/amused.npz b/presets/amused.npz new file mode 100644 index 0000000000000000000000000000000000000000..3d9b45ee3d7e557bb754d6564312479b92acf5fc --- /dev/null +++ b/presets/amused.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df3e882f3a62805b9aaf300d81822cd4eddeafee480503b7b78e32be2085fb11 +size 20882 diff --git a/presets/anger.npz b/presets/anger.npz new file mode 100644 index 0000000000000000000000000000000000000000..26477928feb6c7da2b0bb3b29ba3122adf2a000e --- /dev/null +++ b/presets/anger.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:959cec6dc0b30219db0d70cdd165fe00bbdc098165cf9d67ccdd1ecf7a5da5be +size 22090 diff --git a/presets/babara.npz b/presets/babara.npz new file mode 100644 index 0000000000000000000000000000000000000000..9a484d8b9a6ad6a907e426eccda7b0a4e6e8884e --- /dev/null +++ b/presets/babara.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8106b2a98c3f70587f23ab46ed5bf73b1c9a770481c3620ab140bd3256010376 +size 11526 diff --git a/presets/bronya.npz b/presets/bronya.npz new file mode 100644 index 0000000000000000000000000000000000000000..361939a93a9fd2c00c775bb761f4a8afd9d226a9 --- /dev/null +++ b/presets/bronya.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02eaada2c3d58866c813887ed9f871587ef5a7e976abc23382ce46a17b208001 +size 18106 diff --git a/presets/cafe.npz b/presets/cafe.npz new file mode 100644 index 0000000000000000000000000000000000000000..70b20f6e09decc37226a4af477a0757110c04224 --- /dev/null +++ b/presets/cafe.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d78d96f5829da8f69c327ff25958da5b451305fdc9c308f7e67f13cf8d640fea +size 22442 diff --git a/presets/dingzhen.npz b/presets/dingzhen.npz new file mode 100644 index 0000000000000000000000000000000000000000..4da9178da67661edeb4868d9e251b016db846511 --- /dev/null +++ b/presets/dingzhen.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d19167c65eefef5e42dfaa1919ff5149ca0a93cb052396a47d1f42f9865f5f8 +size 18154 diff --git a/presets/disgust.npz b/presets/disgust.npz new file mode 100644 index 0000000000000000000000000000000000000000..fa775736b826d61213653a808855eaf8d263c61d --- /dev/null +++ b/presets/disgust.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4443f0a395072700f2ec6101dbf2ad9d28968aa3e5809e384ea131832f894d7f +size 39386 diff --git a/presets/emo_amused.npz b/presets/emo_amused.npz new file mode 100644 index 0000000000000000000000000000000000000000..545712470a78ae6b3f91308779b612c9b8ef33b4 --- /dev/null +++ b/presets/emo_amused.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38be2ea16dc79beae68b6c885d99d4dad516acbd88ed5ed6991dd97301f2f30b +size 15378 diff --git a/presets/emo_anger.npz b/presets/emo_anger.npz new file mode 100644 index 0000000000000000000000000000000000000000..8cbf61bb2353db8a1337debe68e6c5113099fe46 --- /dev/null +++ b/presets/emo_anger.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3261c3bdd5b7b4be9783d9293ee3d871be9d9d791f2b3a8bf62a1a0ee0ed93e6 +size 15434 diff --git a/presets/emo_neutral.npz b/presets/emo_neutral.npz new file mode 100644 index 0000000000000000000000000000000000000000..ce1da3b25448c86b3ec2b2d2d0f19c56bca789c8 --- /dev/null +++ b/presets/emo_neutral.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2188c4154692316ed7c0edee3aa3dd8678be36f355ee2b8c8a3a6412c3673ba9 +size 15578 diff --git a/presets/emo_sleepy.npz b/presets/emo_sleepy.npz new file mode 100644 index 0000000000000000000000000000000000000000..b39ef24ea839f0a67663610473c2026751b96a72 --- /dev/null +++ b/presets/emo_sleepy.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a53255890beaf4ed339e1967f0837fdb87c34c9f7e18bf77cd4b08eba176963 +size 15370 diff --git a/presets/emotion_sleepiness.npz b/presets/emotion_sleepiness.npz new file mode 100644 index 0000000000000000000000000000000000000000..5b6bfc27f36658c0f62272ce30f357fec5911f97 --- /dev/null +++ b/presets/emotion_sleepiness.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0f866a278a10c7b6b494fb62589a9d8fef778ccf272df3b0d5510f45b243b5c +size 33218 diff --git a/presets/en2zh_tts_1.npz b/presets/en2zh_tts_1.npz new file mode 100644 index 0000000000000000000000000000000000000000..e73db03e27078932694dfdb6df5cc849c6bcc3d7 --- /dev/null +++ b/presets/en2zh_tts_1.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d4de4ed055448ea54f7b40091afae565197f960d954279035ac537ea5a01bc4 +size 44354 diff --git a/presets/en2zh_tts_2.npz b/presets/en2zh_tts_2.npz new file mode 100644 index 0000000000000000000000000000000000000000..d15ad2188a0f5fead60165d86c825dec7a914ac2 --- /dev/null +++ b/presets/en2zh_tts_2.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcc066ea104daa27d1552fe76574d09359d56fa892241581cc19e931a696eca9 +size 24178 diff --git a/presets/en2zh_tts_3.npz b/presets/en2zh_tts_3.npz new file mode 100644 index 0000000000000000000000000000000000000000..f0aa9306b71c23cfadfd6eae0bb0b7a84084fade --- /dev/null +++ b/presets/en2zh_tts_3.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7468944e6d0ed7f2da033e8037be07dbafc76bd1ed7c0f5996d85ff45aacda11 +size 21410 diff --git a/presets/en2zh_tts_4.npz b/presets/en2zh_tts_4.npz new file mode 100644 index 0000000000000000000000000000000000000000..b52465fadebb7f7f163a26f2e9d9633f703ad039 --- /dev/null +++ b/presets/en2zh_tts_4.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fd8d0914e74769114310e9504d68d6b7b0c6aacd46763478cbfd4f9631ad54a +size 43826 diff --git a/presets/esta.npz b/presets/esta.npz new file mode 100644 index 0000000000000000000000000000000000000000..4d75c2e4a934b61f824dc447c8592a5731025326 --- /dev/null +++ b/presets/esta.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f944e135d901a00e74e7affe6757334e9a2679c10ad7ae4bcb5b33569d77eba +size 40250 diff --git a/presets/fuxuan.npz b/presets/fuxuan.npz new file mode 100644 index 0000000000000000000000000000000000000000..aaeb7f8bc5af0680a2d64e452e1d029f592aa44b --- /dev/null +++ b/presets/fuxuan.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17b90388d179ae309e1f577c28c3f10d9bed73c6ccbffdd829c00568eb3941e6 +size 50330 diff --git a/presets/librispeech_1.npz b/presets/librispeech_1.npz new file mode 100644 index 0000000000000000000000000000000000000000..e2480cc12a6a526df5c552700f1507675cee62d8 --- /dev/null +++ b/presets/librispeech_1.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:415b244e43b45291fd651d71f15bb7a31c244e2054988c436f6bbc04465c6099 +size 15650 diff --git a/presets/librispeech_2.npz b/presets/librispeech_2.npz new file mode 100644 index 0000000000000000000000000000000000000000..0eed46188be3dea3293903a13daa718ab0c802c1 --- /dev/null +++ b/presets/librispeech_2.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd74e77370248b025321b9dbae25b1572f13f98da63255e384d382d2b0c78227 +size 15418 diff --git a/presets/librispeech_3.npz b/presets/librispeech_3.npz new file mode 100644 index 0000000000000000000000000000000000000000..fbaa57d5d3c106ea9a77af43a6a2a3c0d3045773 --- /dev/null +++ b/presets/librispeech_3.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1eceb3f4cc0f3a8856b5e3b5f1ca28c428d75305b1452da1ecf4013bc358ccaa +size 15634 diff --git a/presets/librispeech_4.npz b/presets/librispeech_4.npz new file mode 100644 index 0000000000000000000000000000000000000000..3516ee92a587b51c645856122a12503386f5dd28 --- /dev/null +++ b/presets/librispeech_4.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3939dde39f5e65bc01f5eba9acb7b8329465aaca3c38edf1b240aa714e687960 +size 15594 diff --git a/presets/neutral.npz b/presets/neutral.npz new file mode 100644 index 0000000000000000000000000000000000000000..6af010decf0d7459e76a0764a6495ecd9758c524 --- /dev/null +++ b/presets/neutral.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8a63993526ffdc788a711b512d07a8b1c816151a1edb63913d0bfb48c2ea380 +size 21050 diff --git a/presets/paimon.npz b/presets/paimon.npz new file mode 100644 index 0000000000000000000000000000000000000000..8e9cf23f35e99a3791ea54ac8f0700dd188d9db5 --- /dev/null +++ b/presets/paimon.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:452d5e0cd3a060db521bd65a16af818a6177f357801402aa5581eceb2c24039a +size 13762 diff --git a/presets/rosalia.npz b/presets/rosalia.npz new file mode 100644 index 0000000000000000000000000000000000000000..800162152c8207d2c491b8c4018bf177ab6f8c8a --- /dev/null +++ b/presets/rosalia.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af87ebe283bbb7b527c6c0ff0a02a315416485677fe23330040c2766fa9af919 +size 11414 diff --git a/presets/seel.npz b/presets/seel.npz new file mode 100644 index 0000000000000000000000000000000000000000..095b1754f23a1030296b2a8f8f90b230e4b6dc1e --- /dev/null +++ b/presets/seel.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44ad2e900df3625f9753e949dc5a7d8479c4091e24cb18cbf46e34e29498d952 +size 13554 diff --git a/presets/sleepiness.npz b/presets/sleepiness.npz new file mode 100644 index 0000000000000000000000000000000000000000..5b6bfc27f36658c0f62272ce30f357fec5911f97 --- /dev/null +++ b/presets/sleepiness.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0f866a278a10c7b6b494fb62589a9d8fef778ccf272df3b0d5510f45b243b5c +size 33218 diff --git a/presets/vctk_1.npz b/presets/vctk_1.npz new file mode 100644 index 0000000000000000000000000000000000000000..c23c917cdcc846bbd047edd409b182d236aa6d28 --- /dev/null +++ b/presets/vctk_1.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c9df2ea8c2bc919c0ac50f8e05950bb4e831de69b33a7fb12d584da5b2512f2 +size 15530 diff --git a/presets/vctk_2.npz b/presets/vctk_2.npz new file mode 100644 index 0000000000000000000000000000000000000000..a671e453cd54cf7345c5a1199b70280f877dae0d --- /dev/null +++ b/presets/vctk_2.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc84744435a304b3e700b8b1ab94c3b891db3056bd55a0f9dd99eff284016efa +size 15458 diff --git a/presets/vctk_3.npz b/presets/vctk_3.npz new file mode 100644 index 0000000000000000000000000000000000000000..1c045ead518d9f37699a0b59ebe57296e0542aef --- /dev/null +++ b/presets/vctk_3.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec0d528c6ae9c8f32b02ca6b57aa565b9fe63f401fd04f2632ed7e536699b9ac +size 15450 diff --git a/presets/vctk_4.npz b/presets/vctk_4.npz new file mode 100644 index 0000000000000000000000000000000000000000..1fbfbbdd4ef4e292e24f7276defadaefdcf0e98b --- /dev/null +++ b/presets/vctk_4.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ff2b71254ae00be6e42ad206c7616d168bd41582837e9eeb4d6cd669bd0b140 +size 15330 diff --git a/presets/yaesakura.npz b/presets/yaesakura.npz new file mode 100644 index 0000000000000000000000000000000000000000..3f6b151870c881c61eb232dbb28c1403a67532df --- /dev/null +++ b/presets/yaesakura.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b388a18d286b4ba13d45bae373a716c0010dc40ae9c940d53b5a04cbc64e95ff +size 12442 diff --git a/presets/zh2en_tts_1.npz b/presets/zh2en_tts_1.npz new file mode 100644 index 0000000000000000000000000000000000000000..bbd2a9c750af5b6cac656b01ef36c2dd3ee766f7 --- /dev/null +++ b/presets/zh2en_tts_1.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07bff150ad145f9b06f0e7cbf9b0ee4d9e926600efa0d129bd831c8b2993c2b0 +size 23546 diff --git a/presets/zh2en_tts_2.npz b/presets/zh2en_tts_2.npz new file mode 100644 index 0000000000000000000000000000000000000000..644f6cf976b91b284316a5e4513b72980d7557a8 --- /dev/null +++ b/presets/zh2en_tts_2.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0257d0782578c7813c3f43b5e93c0e681f9ea42fe76775d5a4f4fea64609b03e +size 20170 diff --git a/presets/zh2en_tts_3.npz b/presets/zh2en_tts_3.npz new file mode 100644 index 0000000000000000000000000000000000000000..fe2ce9d14ae1af4ee307d1b0a109c141141957d9 --- /dev/null +++ b/presets/zh2en_tts_3.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5da48e060d15f391767bffe1d528bfbc782a562413feed2e9bd2cafa82bf644a +size 17906 diff --git a/presets/zh2en_tts_4.npz b/presets/zh2en_tts_4.npz new file mode 100644 index 0000000000000000000000000000000000000000..693e32dc6f27b91270c8c466b1a6671fb0ed7054 --- /dev/null +++ b/presets/zh2en_tts_4.npz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bda7a70ed9b03d8f1ff99d2444ea1df476a8deaf75633aa3b3f6cf3f45ae7e5e +size 33682 diff --git a/prompts/en-1.wav b/prompts/en-1.wav new file mode 100644 index 0000000000000000000000000000000000000000..d4ea9ce79a35e86b9b45f536bdab6c548c12917e Binary files /dev/null and b/prompts/en-1.wav differ diff --git a/prompts/en-2.wav b/prompts/en-2.wav new file mode 100644 index 0000000000000000000000000000000000000000..d0d259eed7c223e74a9e58f8a05c385bf4553461 Binary files /dev/null and b/prompts/en-2.wav differ diff --git a/prompts/ja-1.wav b/prompts/ja-1.wav new file mode 100644 index 0000000000000000000000000000000000000000..6b8cd477f860d85f8e87972a2f69b2a6be5e80f2 Binary files /dev/null and b/prompts/ja-1.wav differ diff --git a/prompts/ja-2.ogg b/prompts/ja-2.ogg new file mode 100644 index 0000000000000000000000000000000000000000..e7277d63d418a633d94c659710ddae0befa2587b Binary files /dev/null and b/prompts/ja-2.ogg differ diff --git a/prompts/ph.txt b/prompts/ph.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/prompts/zh-1.wav b/prompts/zh-1.wav new file mode 100644 index 0000000000000000000000000000000000000000..aa7b52fdc5e7b965cc00fd7db90f60299a54e6b3 Binary files /dev/null and b/prompts/zh-1.wav differ diff --git a/prompts/zh-2.wav b/prompts/zh-2.wav new file mode 100644 index 0000000000000000000000000000000000000000..770a6bb330a84c38828b9b873f8cc82f8eb25f44 Binary files /dev/null and b/prompts/zh-2.wav differ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..7455a467513d9a96c49a658f9e28ffa188b8f920 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,27 @@ +soundfile +numpy +torch +torchvision +torchaudio +tokenizers +encodec +py3langid +wget +unidecode +torchmetrics +pypinyin +inflect +cn2an +jieba +eng_to_ipa +openai-whisper +phonemizer==3.2.0 +matplotlib +gradio +nltk +sudachipy +sudachidict_core +vocos +vinorm +underthesea +viphoneme \ No newline at end of file diff --git a/server/constants.py b/server/constants.py new file mode 100644 index 0000000000000000000000000000000000000000..75d3308ed7352ec4ba6b9a4bcfe547db13e33f20 --- /dev/null +++ b/server/constants.py @@ -0,0 +1,8 @@ +from server.objects import Language + +support_languages = [ + Language(language='English', code='en'), + Language(language='Vietnamese', code='vi'), + Language(language='Chinese', code='zh'), + Language(language='Japanese', code='ja') +] \ No newline at end of file diff --git a/server/functions.py b/server/functions.py new file mode 100644 index 0000000000000000000000000000000000000000..c7e0c62fe8a40035337bfececa754aed2155b9d1 --- /dev/null +++ b/server/functions.py @@ -0,0 +1,372 @@ +# coding: utf-8 +import logging +import os +import pathlib +import time +import tempfile +import platform +import sys + +print(f"default encoding is {sys.getdefaultencoding()},file system encoding is {sys.getfilesystemencoding()}") +print(f"You are using Python version {platform.python_version()}") +if (sys.version_info[0] < 3 or sys.version_info[1] < 7): + print("The Python version is too low and may cause problems") + +if platform.system().lower() == 'windows': + temp = pathlib.PosixPath + pathlib.PosixPath = pathlib.WindowsPath +else: + temp = pathlib.WindowsPath + pathlib.WindowsPath = pathlib.PosixPath +os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" + +import py3langid as langid + +langid.set_languages(['en', 'zh', 'ja', 'vi']) + +import nltk + +nltk.data.path = nltk.data.path + [os.path.join(os.getcwd(), "nltk_data")] + +import torch +import torchaudio + +import numpy as np + +from data.tokenizer import ( + AudioTokenizer, + tokenize_audio, +) +from data.collation import get_text_token_collater +from models.vallex import VALLE +from utils.g2p import PhonemeBpeTokenizer +from descriptions import * +from macros import * + +import gradio as gr +import whisper +from vocos import Vocos +import multiprocessing + +thread_count = multiprocessing.cpu_count() + +print("Use", thread_count, "cpu cores for computing") + +torch.set_num_threads(thread_count) +torch.set_num_interop_threads(thread_count) +torch._C._jit_set_profiling_executor(False) +torch._C._jit_set_profiling_mode(False) +torch._C._set_graph_executor_optimize(False) + +text_tokenizer = PhonemeBpeTokenizer(tokenizer_path="./utils/g2p/bpe_175.json") +text_collater = get_text_token_collater() + +device = torch.device("cpu") +if torch.cuda.is_available(): + device = torch.device("cuda", 0) + +# VALL-E-X model +model = VALLE( + N_DIM, + NUM_HEAD, + NUM_LAYERS, + norm_first=True, + add_prenet=False, + prefix_mode=PREFIX_MODE, + share_embedding=True, + nar_scale_factor=1.0, + prepend_bos=True, + num_quantizers=NUM_QUANTIZERS, +) +checkpoint = torch.load("./checkpoints/vallex-checkpoint.pt", map_location='cpu') +missing_keys, unexpected_keys = model.load_state_dict( + checkpoint["model"], strict=True +) +assert not missing_keys +model.eval() + +# Encodec model +audio_tokenizer = AudioTokenizer(device) + +# Vocos decoder +vocos = Vocos.from_pretrained('charactr/vocos-encodec-24khz').to(device) + +# ASR +if not os.path.exists("./whisper/"): os.mkdir("./whisper/") +try: + whisper_model = whisper.load_model("medium", download_root=os.path.join(os.getcwd(), "whisper")).cpu() +except Exception as e: + logging.info(e) + raise Exception( + "\n Whisper download failed or damaged, please go to " + "'https://openaipublic.azureedge.net/main/whisper/models/345ae4da62f9b3d59415adc60127b97c714f32e89e936602e85993674d08dcb1/medium.pt'" + "\n manually download model and put it to {} .".format(os.getcwd() + "/whisper")) + +# Voice Presets +preset_list = os.walk("./presets/").__next__()[2] +preset_list = [preset[:-4] for preset in preset_list if preset.endswith(".npz")] + + +def inference_encoded_frames(text_tokens, text_tokens_lens, audio_prompts, enroll_x_lens, lang_pr, langs, accent, lang): + if lang_pr == vi_code: + lang_pr = zh_code + + if lang == vi_code: + lang = ja_code + + encoded_frames = model.inference( + text_tokens.to(device), + text_tokens_lens.to(device), + audio_prompts, + enroll_x_lens=enroll_x_lens, + top_k=-100, + temperature=1, + prompt_language=lang_pr, + text_language=langs if accent == "no-accent" else lang, + best_of=5, + ) + + return encoded_frames + + +def inference_samples(text_tokens, text_tokens_lens, audio_prompts, enroll_x_lens, lang_pr, langs, accent, lang): + encoded_frames = inference_encoded_frames(text_tokens, text_tokens_lens, audio_prompts, enroll_x_lens, lang_pr, + langs, + accent, lang) + # Decode with Vocos + frames = encoded_frames.permute(2, 0, 1) + features = vocos.codes_to_features(frames) + samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device)) + + return samples + + +def clear_prompts(): + try: + path = tempfile.gettempdir() + for eachfile in os.listdir(path): + filename = os.path.join(path, eachfile) + if os.path.isfile(filename) and filename.endswith(".npz"): + lastmodifytime = os.stat(filename).st_mtime + endfiletime = time.time() - 60 + if endfiletime > lastmodifytime: + os.remove(filename) + except: + return + + +def transcribe_one(model, audio_path): + # load audio and pad/trim it to fit 30 seconds + audio = whisper.load_audio(audio_path) + audio = whisper.pad_or_trim(audio) + + # make log-Mel spectrogram and move to the same device as the model + mel = whisper.log_mel_spectrogram(audio).to(model.device) + + # detect the spoken language + _, probs = model.detect_language(mel) + print(f"Detected language: {max(probs, key=probs.get)}") + lang = max(probs, key=probs.get) + # decode the audio + options = whisper.DecodingOptions(temperature=1.0, best_of=5, fp16=False if device == torch.device("cpu") else True, + sample_len=150) + result = whisper.decode(model, mel, options) + + # print the recognized text + print(result.text) + + text_pr = result.text + if text_pr.strip(" ")[-1] not in "?!.,。,?!。、": + text_pr += "." + return lang, text_pr + + +def make_npz_prompt(name, uploaded_audio, recorded_audio, transcript_content): + global model, text_collater, text_tokenizer, audio_tokenizer + clear_prompts() + audio_prompt = uploaded_audio if uploaded_audio is not None else recorded_audio + sr, wav_pr = audio_prompt + if not isinstance(wav_pr, torch.FloatTensor): + wav_pr = torch.FloatTensor(wav_pr) + if wav_pr.abs().max() > 1: + wav_pr /= wav_pr.abs().max() + if wav_pr.size(-1) == 2: + wav_pr = wav_pr[:, 0] + if wav_pr.ndim == 1: + wav_pr = wav_pr.unsqueeze(0) + assert wav_pr.ndim and wav_pr.size(0) == 1 + + if transcript_content == "": + text_pr, lang_pr = make_prompt(name, wav_pr, sr, save=False) + else: + lang_pr = langid.classify(str(transcript_content))[0] + lang_token = lang2token[lang_pr] + text_pr = f"{lang_token}{str(transcript_content)}{lang_token}" + # tokenize audio + encoded_frames = tokenize_audio(audio_tokenizer, (wav_pr, sr)) + audio_tokens = encoded_frames[0][0].transpose(2, 1).cpu().numpy() + + # tokenize text + phonemes, _ = text_tokenizer.tokenize(text=f"{text_pr}".strip()) + text_tokens, enroll_x_lens = text_collater( + [ + phonemes + ] + ) + + message = f"Detected language: {lang_pr}\n Detected text {text_pr}\n" + + # save as npz file + np.savez(os.path.join(tempfile.gettempdir(), f"{name}.npz"), + audio_tokens=audio_tokens, text_tokens=text_tokens, lang_code=lang2code[lang_pr]) + return message, os.path.join(tempfile.gettempdir(), f"{name}.npz") + + +def make_prompt(name, wav, sr, save=True): + global whisper_model + whisper_model.to(device) + if not isinstance(wav, torch.FloatTensor): + wav = torch.tensor(wav) + if wav.abs().max() > 1: + wav /= wav.abs().max() + if wav.size(-1) == 2: + wav = wav.mean(-1, keepdim=False) + if wav.ndim == 1: + wav = wav.unsqueeze(0) + assert wav.ndim and wav.size(0) == 1 + torchaudio.save(f"./prompts/{name}.wav", wav, sr) + lang, text = transcribe_one(whisper_model, f"./prompts/{name}.wav") + lang_token = lang2token[lang] + text = lang_token + text + lang_token + with open(f"./prompts/{name}.txt", 'w', encoding='utf-8') as f: + f.write(text) + if not save: + os.remove(f"./prompts/{name}.wav") + os.remove(f"./prompts/{name}.txt") + + whisper_model.cpu() + torch.cuda.empty_cache() + return text, lang + + +from utils.sentence_cutter import split_text_into_sentences + +def infer_long_text(text, preset_prompt, prompt=None, language='auto', accent='no-accent'): + """ + For long audio generation, two modes are available. + fixed-prompt: This mode will keep using the same prompt the user has provided, and generate audio sentence by sentence. + sliding-window: This mode will use the last sentence as the prompt for the next sentence, but has some concern on speaker maintenance. + """ + mode = 'fixed-prompt' + global model, audio_tokenizer, text_tokenizer, text_collater + model.to(device) + if (prompt is None or prompt == "") and preset_prompt == "": + mode = 'sliding-window' # If no prompt is given, use sliding-window mode + sentences = split_text_into_sentences(text) + # detect language + if language == "auto-detect": + language = langid.classify(text)[0] + else: + language = token2lang[langdropdown2token[language]] + + # if initial prompt is given, encode it + if prompt is not None and prompt != "": + # load prompt + prompt_data = np.load(prompt.name) + audio_prompts = prompt_data['audio_tokens'] + text_prompts = prompt_data['text_tokens'] + lang_pr = prompt_data['lang_code'] + lang_pr = code2lang[int(lang_pr)] + + # numpy to tensor + audio_prompts = torch.tensor(audio_prompts).type(torch.int32).to(device) + text_prompts = torch.tensor(text_prompts).type(torch.int32) + elif preset_prompt is not None and preset_prompt != "": + prompt_data = np.load(os.path.join("./presets/", f"{preset_prompt}.npz")) + audio_prompts = prompt_data['audio_tokens'] + text_prompts = prompt_data['text_tokens'] + lang_pr = prompt_data['lang_code'] + lang_pr = code2lang[int(lang_pr)] + + # numpy to tensor + audio_prompts = torch.tensor(audio_prompts).type(torch.int32).to(device) + text_prompts = torch.tensor(text_prompts).type(torch.int32) + else: + audio_prompts = torch.zeros([1, 0, NUM_QUANTIZERS]).type(torch.int32).to(device) + text_prompts = torch.zeros([1, 0]).type(torch.int32) + lang_pr = language if language != 'mix' else 'en' + if mode == 'fixed-prompt': + complete_tokens = torch.zeros([1, NUM_QUANTIZERS, 0]).type(torch.LongTensor).to(device) + for text in sentences: + text = text.replace("\n", "").strip(" ") + if text == "": + continue + lang_token = lang2token[language] + lang = token2lang[lang_token] + text = lang_token + text + lang_token + + enroll_x_lens = text_prompts.shape[-1] + logging.info(f"synthesize text: {text}") + phone_tokens, langs = text_tokenizer.tokenize(text=f"_{text}".strip()) + text_tokens, text_tokens_lens = text_collater( + [ + phone_tokens + ] + ) + text_tokens = torch.cat([text_prompts, text_tokens], dim=-1) + text_tokens_lens += enroll_x_lens + # accent control + lang = lang if accent == "no-accent" else token2lang[langdropdown2token[accent]] + encoded_frames = inference_encoded_frames(text_tokens, text_tokens_lens, audio_prompts, enroll_x_lens, + lang_pr, langs, accent, lang) + complete_tokens = torch.cat([complete_tokens, encoded_frames.transpose(2, 1)], dim=-1) + # Decode with Vocos + frames = complete_tokens.permute(1, 0, 2) + features = vocos.codes_to_features(frames) + samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device)) + + model.to('cpu') + message = f"Cut into {len(sentences)} sentences" + return message, (24000, samples.squeeze(0).cpu().numpy()) + elif mode == "sliding-window": + complete_tokens = torch.zeros([1, NUM_QUANTIZERS, 0]).type(torch.LongTensor).to(device) + original_audio_prompts = audio_prompts + original_text_prompts = text_prompts + for text in sentences: + text = text.replace("\n", "").strip(" ") + if text == "": + continue + lang_token = lang2token[language] + lang = token2lang[lang_token] + text = lang_token + text + lang_token + + enroll_x_lens = text_prompts.shape[-1] + logging.info(f"synthesize text: {text}") + phone_tokens, langs = text_tokenizer.tokenize(text=f"_{text}".strip()) + text_tokens, text_tokens_lens = text_collater( + [ + phone_tokens + ] + ) + text_tokens = torch.cat([text_prompts, text_tokens], dim=-1) + text_tokens_lens += enroll_x_lens + # accent control + lang = lang if accent == "no-accent" else token2lang[langdropdown2token[accent]] + encoded_frames = inference_encoded_frames(text_tokens, text_tokens_lens, audio_prompts, enroll_x_lens, + lang_pr, langs, accent, lang) + complete_tokens = torch.cat([complete_tokens, encoded_frames.transpose(2, 1)], dim=-1) + if torch.rand(1) < 1.0: + audio_prompts = encoded_frames[:, :, -NUM_QUANTIZERS:] + text_prompts = text_tokens[:, enroll_x_lens:] + else: + audio_prompts = original_audio_prompts + text_prompts = original_text_prompts + # Decode with Vocos + frames = complete_tokens.permute(1, 0, 2) + features = vocos.codes_to_features(frames) + samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device)) + + model.to('cpu') + return 24000, samples.squeeze(0).cpu().numpy() + else: + raise ValueError(f"No such mode {mode}") \ No newline at end of file diff --git a/server/objects.py b/server/objects.py new file mode 100644 index 0000000000000000000000000000000000000000..59f068cb3a6969ea1f0833065a848f3b30d38165 --- /dev/null +++ b/server/objects.py @@ -0,0 +1,6 @@ +from pydantic import BaseModel + + +class Language(BaseModel): + language: str + code: str diff --git a/server/server-api.py b/server/server-api.py new file mode 100644 index 0000000000000000000000000000000000000000..a12e854c277b94d92f17033edbdda9e9cc202f69 --- /dev/null +++ b/server/server-api.py @@ -0,0 +1,19 @@ +from fastapi import FastAPI, HTTPException +from typing import List + +from server.constants import support_languages +from server.objects import Language + +app = FastAPI() + + +@app.get("/support-languages", response_model=List[Language]) +def get_languages(): + return support_languages + + + + +if __name__ == '__main__': + import uvicorn + uvicorn.run(app, host="127.0.0.1", port=8000) diff --git a/test.py b/test.py new file mode 100644 index 0000000000000000000000000000000000000000..448572c741e3086c47031a5924f0f4dedb563a3e --- /dev/null +++ b/test.py @@ -0,0 +1,91 @@ +import os +import torch +import logging +from data.dataset import create_dataloader +from macros import * +from data.tokenizer import ( + AudioTokenizer, + tokenize_audio, +) +from data.collation import get_text_token_collater +from models.vallex import VALLE + +if torch.cuda.is_available(): + device = torch.device("cuda", 0) +from vocos import Vocos +from pathlib import Path +import platform +import pathlib + +plt = platform.system() +print("Operating System:", plt) + +if plt == 'Linux': + pathlib.WindowsPath = pathlib.PosixPath + + +def get_model(device): + url = 'https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt' + + checkpoints_dir = "./checkpoints" + + model_checkpoint_name = "vallex-checkpoint_modified.pt" + if not os.path.exists(checkpoints_dir): os.mkdir(checkpoints_dir) + if not os.path.exists(os.path.join(checkpoints_dir, model_checkpoint_name)): + import wget + print("3") + try: + logging.info( + "Downloading model from https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt ...") + # download from https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt to ./checkpoints/vallex-checkpoint.pt + wget.download("https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt", + out="./checkpoints/vallex-checkpoint.pt", bar=wget.bar_adaptive) + except Exception as e: + logging.info(e) + raise Exception( + "\n Model weights download failed, please go to 'https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt'" + "\n manually download model weights and put it to {} .".format(os.getcwd() + "\checkpoints")) + # VALL-E + model = VALLE( + N_DIM, + NUM_HEAD, + NUM_LAYERS, + norm_first=True, + add_prenet=False, + prefix_mode=PREFIX_MODE, + share_embedding=True, + nar_scale_factor=1.0, + prepend_bos=True, + num_quantizers=NUM_QUANTIZERS, + ).to(device) + checkpoint_path = Path(checkpoints_dir) / model_checkpoint_name + checkpoint = torch.load(checkpoint_path, map_location='cpu') + missing_keys, unexpected_keys = model.load_state_dict( + checkpoint["model"], strict=True + ) + assert not missing_keys + + # Encodec + codec = AudioTokenizer(device) + + vocos = Vocos.from_pretrained('charactr/vocos-encodec-24khz').to(device) + + return model, codec, vocos + + +def get_valle_model(device): + # VALL-E + model = VALLE( + N_DIM, + NUM_HEAD, + NUM_LAYERS, + norm_first=True, + add_prenet=False, + prefix_mode=PREFIX_MODE, + share_embedding=True, + nar_scale_factor=1.0, + prepend_bos=True, + num_quantizers=NUM_QUANTIZERS, + ).to(device) + + return model diff --git a/train.py b/train.py new file mode 100644 index 0000000000000000000000000000000000000000..54c0a4f7ea1e2cf8e038257fd92738a1a783bc54 --- /dev/null +++ b/train.py @@ -0,0 +1,1077 @@ +#!/usr/bin/env python3 +# Copyright 2021-2022 Xiaomi Corp. (authors: Fangjun Kuang, +# Wei Kang, +# Mingshuang Luo) +# Copyright 2023 (authors: Feiteng Li) +# +# See ../../../../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +Usage: +python3 bin/trainer.py \ + --decoder-dim 1024 --nhead 16 --num-decoder-layers 12 \ + --max-duration 40 --model-name valle \ + --exp-dir exp/valle + --dtype "bfloat16" \ +""" +import warnings +from fileinput import filename + +warnings.filterwarnings("ignore") +import argparse +import copy +import logging +import os + +os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" + +import random +import warnings +from pathlib import Path +from shutil import copyfile +from typing import Any, Dict, Optional, Tuple, Union + +import torch +import torch.multiprocessing as mp +import torch.nn as nn +from torch import Tensor +from torch.cuda.amp import GradScaler +from torch.nn.parallel import DistributedDataParallel as DDP +from torch.utils.tensorboard import SummaryWriter +from train_utils.utils import * +from train_utils.icefall.utils import * +from train_utils.lhotse.utils import * +from test import get_valle_model +from customs.make_custom_dataset import create_dataset + +LRSchedulerType = torch.optim.lr_scheduler._LRScheduler + + +def set_batch_count(model: Union[nn.Module, DDP], batch_count: float) -> None: + if isinstance(model, DDP): + # get underlying nn.Module + model = model.module + + for module in model.modules(): + if hasattr(module, "batch_count"): + module.batch_count = batch_count + + +def get_parser(): + parser = argparse.ArgumentParser( + formatter_class=argparse.ArgumentDefaultsHelpFormatter + ) + + parser.add_argument( + "--world-size", + type=int, + default=1, + help="Number of GPUs for DDP training.", + ) + + parser.add_argument( + "--master-port", + type=int, + default=12354, + help="Master port to use for DDP training.", + ) + + parser.add_argument( + "--tensorboard", + type=str2bool, + default=True, + help="Should various information be logged in tensorboard.", + ) + + parser.add_argument( + "--num-epochs", + type=int, + default=20, + help="Number of epochs to train.", + ) + + parser.add_argument( + "--start-epoch", + type=int, + default=1, + help="""Resume training from this epoch. It should be positive. + If larger than 1, it will load checkpoint from + exp-dir/epoch-{start_epoch-1}.pt + """, + ) + + parser.add_argument( + "--start-batch", + type=int, + default=0, + help="""If positive, --start-epoch is ignored and + it loads the checkpoint from exp-dir/checkpoint-{start_batch}.pt + """, + ) + + parser.add_argument( + "--exp-dir", + type=str, + default="exp/valle_dev", + help="""The experiment dir. + It specifies the directory where all training related + files, e.g., checkpoints, log, etc, are saved + """, + ) + + parser.add_argument( + "--optimizer-name", + type=str, + default="ScaledAdam", + help="The optimizer.", + ) + parser.add_argument( + "--scheduler-name", + type=str, + default="Eden", + help="The scheduler.", + ) + parser.add_argument( + "--base-lr", type=float, default=0.005, help="The base learning rate." + ) + parser.add_argument( + "--warmup-steps", + type=int, + default=200, + help="""Number of steps that affects how rapidly the learning rate + decreases. We suggest not to change this.""", + ) + + parser.add_argument( + "--seed", + type=int, + default=42, + help="The seed for random generators intended for reproducibility", + ) + + parser.add_argument( + "--inf-check", + type=str2bool, + default=False, + help="Add hooks to check for infinite module outputs and gradients.", + ) + + parser.add_argument( + "--save-every-n", + type=int, + default=10000, + # default=100, + help="""Save checkpoint after processing this number of batches" + periodically. We save checkpoint to exp-dir/ whenever + params.batch_idx_train %% save_every_n == 0. The checkpoint filename + has the form: f'exp-dir/checkpoint-{params.batch_idx_train}.pt' + Note: It also saves checkpoint to `exp-dir/epoch-xxx.pt` at the + end of each epoch where `xxx` is the epoch number counting from 0. + """, + ) + parser.add_argument( + "--valid-interval", + type=int, + default=10000, + help="""Run validation if batch_idx %% valid_interval is 0.""", + ) + + parser.add_argument( + "--keep-last-k", + type=int, + default=20, + help="""Only keep this number of checkpoints on disk. + For instance, if it is 3, there are only 3 checkpoints + in the exp-dir with filenames `checkpoint-xxx.pt`. + It does not affect checkpoints with name `epoch-xxx.pt`. + """, + ) + + parser.add_argument( + "--average-period", + type=int, + default=0, + help="""Update the averaged model, namely `model_avg`, after processing + this number of batches. `model_avg` is a separate version of model, + in which each floating-point parameter is the average of all the + parameters from the start of training. Each time we take the average, + we do: `model_avg = model * (average_period / batch_idx_train) + + model_avg * ((batch_idx_train - average_period) / batch_idx_train)`. + """, + ) + + parser.add_argument( + "--accumulate-grad-steps", + type=int, + default=1, + help="""update gradient when batch_idx_train %% accumulate_grad_steps == 0. + """, + ) + + parser.add_argument( + "--dtype", + type=str, + default="float16", + help="Training dtype: float32 bfloat16 float16.", + ) + + parser.add_argument( + "--filter-min-duration", + type=float, + default=0.0, + help="Keep only utterances with duration > this.", + ) + parser.add_argument( + "--filter-max-duration", + type=float, + default=20.0, + help="Keep only utterances with duration < this.", + ) + + parser.add_argument( + "--train-stage", + type=int, + default=0, + help="""0: train all modules, For VALL-E, support 1: AR Decoder 2: NAR Decoder(s) + """, + ) + + parser.add_argument( + "--visualize", + type=str2bool, + default=False, + help="visualize model results in eval step.", + ) + + parser.add_argument( + "--oom-check", + type=str2bool, + default=True, + help="perform OOM check on dataloader batches before starting training.", + ) + + parser.add_argument( + "--train_dir", + default='/home/ubuntu/VALL-E-X/JS_Dataset/JS_Dataset/train_tune' + ) + + parser.add_argument( + "--valid_dir", + default='/home/ubuntu/VALL-E-X/JS_Dataset/JS_Dataset/valid_tune' + ) + + parser.add_argument( + "--checkpoint_path", + default=None + ) + + add_model_arguments(parser) + + return parser + + +def get_params() -> AttributeDict: + """Return a dict containing training parameters. + + All training related parameters that are not passed from the commandline + are saved in the variable `params`. + + Commandline options are merged into `params` after they are parsed, so + you can also access them via `params`. + + Explanation of options saved in `params`: + + - best_train_loss: Best training loss so far. It is used to select + the model that has the lowest training loss. It is + updated during the training. + + - best_valid_loss: Best validation loss so far. It is used to select + the model that has the lowest validation loss. It is + updated during the training. + + - best_train_epoch: It is the epoch that has the best training loss. + + - best_valid_epoch: It is the epoch that has the best validation loss. + + - batch_idx_train: Used to writing statistics to tensorboard. It + contains number of batches trained so far across + epochs. + + - log_interval: Print training loss if batch_idx % log_interval` is 0 + + - reset_interval: Reset statistics if batch_idx % reset_interval is 0 + + - valid_interval: Run validation if batch_idx % valid_interval is 0 + """ + params = AttributeDict( + { + "best_train_loss": float("inf"), + "best_valid_loss": float("inf"), + "best_train_epoch": -1, + "best_valid_epoch": -1, + "batch_idx_train": 0, + "log_interval": 100, # 10: debug 100: train + "reset_interval": 200, + "valid_interval": 10000, + } + ) + + return params + + +def load_checkpoint_if_available( + params: AttributeDict, + model: nn.Module, + model_avg: nn.Module = None, + optimizer: Optional[torch.optim.Optimizer] = None, + scheduler: Optional[LRSchedulerType] = None, +) -> Optional[Dict[str, Any]]: + """Load checkpoint from file. + + If params.start_batch is positive, it will load the checkpoint from + `params.exp_dir/checkpoint-{params.start_batch}.pt`. Otherwise, if + params.start_epoch is larger than 1, it will load the checkpoint from + `params.start_epoch - 1`. + + Apart from loading state dict for `model` and `optimizer` it also updates + `best_train_epoch`, `best_train_loss`, `best_valid_epoch`, + and `best_valid_loss` in `params`. + + Args: + params: + The return value of :func:`get_params`. + model: + The training model. + model_avg: + The stored model averaged from the start of training. + optimizer: + The optimizer that we are using. + scheduler: + The scheduler that we are using. + Returns: + Return a dict containing previously saved training info. + """ + if params.checkpoint_path is not None: + filename = params.checkpoint_path + elif params.start_batch > 0: + filename = params.exp_dir / f"checkpoint-{params.start_batch}.pt" + elif params.start_epoch > 1: + filename = params.exp_dir / f"epoch-{params.start_epoch-1}.pt" + else: + return None + + assert filename.is_file(), f"{filename} does not exist!" + + if isinstance(model, DDP): + raise ValueError("load_checkpoint before DDP") + + saved_params = load_checkpoint( + filename, + model=model, + model_avg=model_avg, + optimizer=optimizer, + scheduler=scheduler, + ) + + saved_stage = saved_params.get("train_stage", 0) + if params.train_stage != saved_stage: + # switch training stage + if params.train_stage and saved_stage: # switch between 1 and 2 + params.start_epoch = 1 + params.start_batch = 0 + else: + # switch between 0 and 1/2 + assert params.num_epochs >= params.start_epoch + params.batch_idx_train = saved_params["batch_idx_train"] + + for key in ["optimizer", "grad_scaler", "sampler"]: + if key in saved_params: + saved_params.pop(key) + + # when base on stage 0, we keep scheduler + if saved_stage != 0: + for key in ["scheduler"]: + if key in saved_params: + saved_params.pop(key) + + best_train_filename = params.exp_dir / "best-train-loss.pt" + if best_train_filename.is_file(): + copyfile( + src=best_train_filename, + dst=params.exp_dir / f"best-train-loss-stage{saved_stage}.pt", + ) + + best_valid_filename = params.exp_dir / "best-valid-loss.pt" + if best_valid_filename.is_file(): + copyfile( + src=best_valid_filename, + dst=params.exp_dir / f"best-valid-loss-stage{saved_stage}.pt", + ) + else: + + keys = [ + "best_train_epoch", + "best_valid_epoch", + "batch_idx_train", + "best_train_loss", + "best_valid_loss", + ] + for k in keys: + params[k] = saved_params[k] + + if params.start_batch > 0: + if "cur_epoch" in saved_params: + params["start_epoch"] = saved_params["cur_epoch"] + + return saved_params + + +def save_checkpoint( + params: AttributeDict, + model: Union[nn.Module, DDP], + model_avg: Optional[nn.Module] = None, + optimizer: Optional[torch.optim.Optimizer] = None, + scheduler: Optional[LRSchedulerType] = None, + sampler = None, + scaler: Optional[GradScaler] = None, + rank: int = 0, +) -> None: + """Save model, optimizer, scheduler and training stats to file. + + Args: + params: + It is returned by :func:`get_params`. + model: + The training model. + model_avg: + The stored model averaged from the start of training. + optimizer: + The optimizer used in the training. + sampler: + The sampler for the training dataset. + scaler: + The scaler used for mix precision training. + """ + if rank != 0: + return + print(f"Saving checkpoint model at epoch {params.cur_epoch}") + filename = params.exp_dir / f"checkpoint.pt" + save_checkpoint_impl( + filename=filename, + model=model, + model_avg=model_avg, + params=params, + optimizer=optimizer, + scheduler=scheduler, + sampler=sampler, + scaler=scaler, + rank=rank, + ) + + if params.best_train_epoch == params.cur_epoch: + best_train_filename = params.exp_dir / "best-train-loss.pt" + copyfile(src=filename, dst=best_train_filename) + + if params.best_valid_epoch == params.cur_epoch: + best_valid_filename = params.exp_dir / "best-valid-loss.pt" + copyfile(src=filename, dst=best_valid_filename) + +def compute_loss( + params: AttributeDict, + model: Union[nn.Module, DDP], + batch: dict, + is_training: bool, +) -> Tuple[Tensor, MetricsTracker]: + """ + Compute transducer loss given the model and its inputs. + + Args: + params: + Parameters for training. See :func:`get_params`. + model: + The model for training. It is an instance of Zipformer in our case. + batch: + A batch of data. See `lhotse.dataset.K2SpeechRecognitionDataset()` + for the content in it. + is_training: + True for training. False for validation. When it is True, this + function enables autograd during computation; when it is False, it + disables autograd. + warmup: a floating point value which increases throughout training; + values >= 1.0 are fully warmed up and have all modules present. + """ + device = ( + model.device + if isinstance(model, DDP) + else next(model.parameters()).device + ) + # at entry, TextTokens is (N, P) + text_tokens = batch["text_tokens"].to(device) + text_tokens_lens = batch["text_tokens_lens"].to(device) + assert text_tokens.ndim == 2 + + audio_features = batch["audio_features"].to(device) + audio_features_lens = batch["audio_features_lens"].to(device) + assert audio_features.ndim == 3 + + with torch.set_grad_enabled(is_training): + predicts, loss, metrics = model( + x=text_tokens, + x_lens=text_tokens_lens, + y=audio_features, + y_lens=audio_features_lens, + train_stage=params.train_stage, + ) + + assert loss.requires_grad == is_training + + info = MetricsTracker() + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + info["frames"] = (audio_features_lens).sum().item() + info["utterances"] = text_tokens.size(0) + + # Note: We use reduction=sum while computing the loss. + info["loss"] = loss.detach().cpu().item() + for metric in metrics: + info[metric] = metrics[metric].detach().cpu().item() + del metrics + + return predicts, loss, info + + +def compute_validation_loss( + params: AttributeDict, + model: Union[nn.Module, DDP], + valid_dl: torch.utils.data.DataLoader, + world_size: int = 1, +) -> MetricsTracker: + """Run the validation process.""" + tot_loss = MetricsTracker() + + for batch_idx, batch in enumerate(valid_dl): + predicts, loss, loss_info = compute_loss( + params=params, + model=model, + batch=batch, + is_training=False, + ) + assert loss.requires_grad is False + tot_loss = tot_loss + loss_info + if world_size > 1: + tot_loss.reduce(loss.device) + loss_value = tot_loss["loss"] / tot_loss["frames"] + if loss_value < params.best_valid_loss: + params.best_valid_epoch = params.cur_epoch + params.best_valid_loss = loss_value + + if params.visualize: + output_dir = Path( + f"{params.exp_dir}/eval/step-{params.batch_idx_train:06d}" + ) + output_dir.mkdir(parents=True, exist_ok=True) + if isinstance(model, DDP): + model.module.visualize(predicts, batch, output_dir=output_dir) + else: + model.visualize(predicts, batch, output_dir=output_dir) + + return tot_loss + + +def train_one_epoch( + params: AttributeDict, + model: Union[nn.Module, DDP], + optimizer: torch.optim.Optimizer, + scheduler: LRSchedulerType, + train_dl: torch.utils.data.DataLoader, + valid_dl: torch.utils.data.DataLoader, + rng: random.Random, + scaler: GradScaler, + model_avg: Optional[nn.Module] = None, + tb_writer: Optional[SummaryWriter] = None, + world_size: int = 1, + rank: int = 0, +) -> None: + """Train the model for one epoch. + + The training loss from the mean of all frames is saved in + `params.train_loss`. It runs the validation process every + `params.valid_interval` batches. + + Args: + params: + It is returned by :func:`get_params`. + model: + The model for training. + optimizer: + The optimizer we are using. + scheduler: + The learning rate scheduler, we call step() every step. + train_dl: + Dataloader for the training dataset. + valid_dl: + Dataloader for the validation dataset. + rng: + Random for selecting. + scaler: + The scaler used for mix precision training. + model_avg: + The stored model averaged from the start of training. + tb_writer: + Writer to write log messages to tensorboard. + world_size: + Number of nodes in DDP training. If it is 1, DDP is disabled. + rank: + The rank of the node in DDP training. If no DDP is used, it should + be set to 0. + """ + model.train() + tot_loss = MetricsTracker() + iter_dl = iter(train_dl) + + dtype, enabled = torch.float32, False + if params.dtype in ["bfloat16", "bf16"]: + dtype, enabled = torch.bfloat16, True + elif params.dtype in ["float16", "fp16"]: + dtype, enabled = torch.float16, True + + batch_idx = 0 + accumulation_steps = 5 # 设置梯度累积步数 + grad_accumulation_count = 0 # 用于跟踪梯度累积的计数器 + + while True: + try: + batch = next(iter_dl) + except StopIteration: + logging.info("Reaches end of dataloader.") + break + + batch_idx += 1 + params.batch_idx_train += 1 + batch_size = len(batch["text"]) + + try: + with torch.cuda.amp.autocast(dtype=dtype, enabled=enabled): + _, loss, loss_info = compute_loss( + params=params, + model=model, + batch=batch, + is_training=True, + ) + + # summary stats + tot_loss = ( + tot_loss * (1 - 1 / params.reset_interval) + ) + loss_info * (1 / params.reset_interval) + + # 梯度累积 + scaler.scale(loss / accumulation_steps).backward() + grad_accumulation_count += 1 + + if grad_accumulation_count % accumulation_steps == 0 or params.batch_idx_train >= params.accumulate_grad_steps: + if ( + params.batch_idx_train % params.accumulate_grad_steps + == 0 + ): + if params.optimizer_name not in ["ScaledAdam", "Eve"]: + # Unscales the gradients of optimizer's assigned params in-place + scaler.unscale_(optimizer) + # Since the gradients of optimizer's assigned params are unscaled, clips as usual: + torch.nn.utils.clip_grad_norm_( + model.parameters(), 1.0 + ) + + scaler.step(optimizer) + scaler.update() + optimizer.zero_grad() + grad_accumulation_count = 0 # 重置梯度累积计数器 + + for k in range(params.accumulate_grad_steps): + if isinstance(scheduler, Eden): + scheduler.step_batch(params.batch_idx_train) + else: + scheduler.step() + + set_batch_count(model, params.batch_idx_train) + except: # noqa + display_and_save_batch(batch, params=params) + raise + + if params.average_period > 0: + if ( + params.batch_idx_train > 0 + and params.batch_idx_train % params.average_period == 0 + ): + # Perform Operation in rank 0 + if rank == 0: + update_averaged_model( + params=params, + model_cur=model, + model_avg=model_avg, + ) + + if ( + params.batch_idx_train > 0 + and params.batch_idx_train % params.save_every_n == 0 + ): + # Perform Operation in rank 0 + if rank == 0: + save_checkpoint_with_global_batch_idx( + out_dir=params.exp_dir, + global_batch_idx=params.batch_idx_train, + model=model, + model_avg=model_avg, + params=params, + optimizer=optimizer, + scheduler=scheduler, + sampler=None, + scaler=scaler, + rank=rank, + ) + remove_checkpoints( + out_dir=params.exp_dir, + topk=params.keep_last_k, + # rank=rank, + ) + + if batch_idx % 100 == 0 and params.dtype in ["float16", "fp16"]: + # If the grad scale was less than 1, try increasing it. The _growth_interval + # of the grad scaler is configurable, but we can't configure it to have different + # behavior depending on the current grad scale. + cur_grad_scale = scaler._scale.item() + if cur_grad_scale < 1.0 or ( + cur_grad_scale < 8.0 and batch_idx % 400 == 0 + ): + scaler.update(cur_grad_scale * 2.0) + + if cur_grad_scale < 0.01: + logging.warning(f"Grad scale is small: {cur_grad_scale}") + if cur_grad_scale < 1.0e-05: + raise RuntimeError( + f"grad_scale is too small, exiting: {cur_grad_scale}" + ) + + if batch_idx % params.log_interval == 0: + cur_lr = scheduler.get_last_lr()[0] + cur_grad_scale = ( + scaler._scale.item() + if params.dtype in ["float16", "fp16"] + else 1.0 + ) + + logging.info( + f"Epoch {params.cur_epoch}, " + f"batch {batch_idx}, train_loss[{loss_info}], " + f"tot_loss[{tot_loss}], " + f"batch size: {batch_size}, " + f"lr: {cur_lr:.2e}" + + ( + f", grad_scale: {cur_grad_scale}" + if params.dtype in ["float16", "fp16"] + else "" + ) + ) + + if tb_writer is not None: + tb_writer.add_scalar( + "train/learning_rate", cur_lr, params.batch_idx_train + ) + loss_info.write_summary( + tb_writer, + "train/current_", + params.batch_idx_train, + ) + tot_loss.write_summary( + tb_writer, "train/tot_", params.batch_idx_train + ) + tot_loss.write_summary( + tb_writer, "train/tot_", params.batch_idx_train + ) + if params.dtype in ["float16", "fp16"]: + tb_writer.add_scalar( + "train/grad_scale", + cur_grad_scale, + params.batch_idx_train, + ) + + if params.batch_idx_train % params.valid_interval == 0: + # Calculate validation loss in Rank 0 + model.eval() + logging.info("Computing validation loss") + with torch.cuda.amp.autocast(dtype=dtype): + valid_info = compute_validation_loss( + params=params, + model=model, + valid_dl=valid_dl, + world_size=world_size, + ) + logging.info( + f"Epoch {params.cur_epoch}, validation: {valid_info}" + ) + logging.info( + f"Maximum memory allocated so far is {torch.cuda.max_memory_allocated()//1000000}MB" + ) + + if tb_writer is not None: + valid_info.write_summary( + tb_writer, "train/valid_", params.batch_idx_train + ) + + model.train() + + loss_value = tot_loss["loss"] / tot_loss["frames"] + params.train_loss = loss_value + if params.train_loss < params.best_train_loss: + params.best_train_epoch = params.cur_epoch + params.best_train_loss = params.train_loss + +def run(rank, world_size, args): + """ + Args: + rank: + It is a value between 0 and `world_size-1`, which is + passed automatically by `mp.spawn()` in :func:`main`. + The node with rank 0 is responsible for saving checkpoint. + world_size: + Number of GPUs for DDP training. + args: + The return value of get_parser().parse_args() + """ + params = get_params() + params.update(vars(args)) + + fix_random_seed(params.seed) + rng = random.Random(params.seed) + if world_size > 1: + setup_dist(rank, world_size, params.master_port) + + setup_logger(f"{params.exp_dir}/log/log-train") + logging.info("Training started") + + if args.tensorboard and rank == 0: + if params.train_stage: + tb_writer = SummaryWriter( + log_dir=f"{params.exp_dir}/tensorboard_stage{params.train_stage}" + ) + else: + tb_writer = SummaryWriter(log_dir=f"{params.exp_dir}/tensorboard") + else: + tb_writer = None + + device = torch.device("cpu") + if torch.cuda.is_available(): + device = torch.device("cuda", rank) + # https://pytorch.org/docs/stable/notes/cuda.html#tensorfloat-32-tf32-on-ampere-devices + torch.backends.cudnn.allow_tf32 = True + torch.backends.cuda.matmul.allow_tf32 = True + + logging.info(f"Device: {device}") + logging.info(params) + + logging.info("About to create model") + model = get_valle_model(device) + + num_param = sum([p.numel() for p in model.parameters()]) + logging.info(f"Number of model parameters: {num_param}") + + assert params.save_every_n >= params.average_period + model_avg: Optional[nn.Module] = None + if rank == 0 and params.average_period > 0: + # model_avg is only used with rank 0 + model_avg = copy.deepcopy(model).to(torch.float64) + + assert params.start_epoch > 0, params.start_epoch + checkpoints = load_checkpoint_if_available( + params=params, model=model, model_avg=model_avg + ) + + model.to(device) + if world_size > 1: + logging.info("Using DDP") + model = DDP(model, device_ids=[rank], find_unused_parameters=True) + + if params.train_stage: + _model = model.module if isinstance(model, DDP) else model + model_parameters = _model.stage_parameters(params.train_stage) + else: + model_parameters = model.parameters() + + if params.optimizer_name == "ScaledAdam": + parameters_names = [] + if params.train_stage: # != 0 + _model = model.module if isinstance(model, DDP) else model + parameters_names.append( + [ + name_param_pair[0] + for name_param_pair in _model.stage_named_parameters( + params.train_stage + ) + ] + ) + else: + parameters_names.append( + [ + name_param_pair[0] + for name_param_pair in model.named_parameters() + ] + ) + + optimizer = ScaledAdam( + model_parameters, + lr=params.base_lr, + betas=(0.9, 0.95), + clipping_scale=2.0, + parameters_names=parameters_names, + show_dominant_parameters=False, + clipping_update_period=1000, + ) + elif params.optimizer_name == "Eve": + optimizer = Eve( + model_parameters, + lr=params.base_lr, + betas=(0.9, 0.98), + target_rms=0.1, + ) + elif params.optimizer_name == "AdamW": + optimizer = torch.optim.AdamW( + model_parameters, + lr=params.base_lr, + betas=(0.9, 0.95), + weight_decay=1e-2, + eps=1e-8, + ) + elif params.optimizer_name == "Adam": + optimizer = torch.optim.Adam( + model_parameters, + lr=params.base_lr, + betas=(0.9, 0.95), + eps=1e-8, + ) + else: + raise NotImplementedError() + + scheduler = get_scheduler(params, optimizer) + optimizer.zero_grad() + + if checkpoints and "optimizer" in checkpoints: + logging.info("Loading optimizer state dict") + optimizer.load_state_dict(checkpoints["optimizer"]) + + if ( + checkpoints + and "scheduler" in checkpoints + and checkpoints["scheduler"] is not None + ): + logging.info("Loading scheduler state dict") + scheduler.load_state_dict(checkpoints["scheduler"]) + + if params.inf_check: + register_inf_check_hooks(model) + + if params.start_batch > 0 and checkpoints and "sampler" in checkpoints: + sampler_state_dict = checkpoints["sampler"] + else: + sampler_state_dict = None + + train_dl = create_dataset(params.train_dir, dataloader_process_only=False) + valid_dl = create_dataset(params.valid_dir, dataloader_process_only=False) + + scaler = GradScaler( + enabled=(params.dtype in ["fp16", "float16"]), init_scale=1.0 + ) + if checkpoints and "grad_scaler" in checkpoints: + logging.info("Loading grad scaler state dict") + scaler.load_state_dict(checkpoints["grad_scaler"]) + + for epoch in range(params.start_epoch, params.num_epochs + 1): + if isinstance(scheduler, Eden): + scheduler.step_epoch(epoch - 1) + + fix_random_seed(params.seed + epoch - 1) + train_dl.batch_sampler.set_epoch(epoch - 1) + + if tb_writer is not None: + tb_writer.add_scalar("train/epoch", epoch, params.batch_idx_train) + + params.cur_epoch = epoch + + train_one_epoch( + params=params, + model=model, + model_avg=model_avg, + optimizer=optimizer, + scheduler=scheduler, + train_dl=train_dl, + valid_dl=valid_dl, + rng=rng, + scaler=scaler, + tb_writer=tb_writer, + world_size=world_size, + rank=rank, + ) + + save_checkpoint( + params=params, + model=model, + model_avg=model_avg, + optimizer=optimizer, + scheduler=scheduler, + sampler=None, + scaler=scaler, + rank=rank, + ) + + logging.info("Done!") + + if world_size > 1: + torch.distributed.barrier() + cleanup_dist() + + +def display_and_save_batch( + batch: dict, + params: AttributeDict, +) -> None: + """Display the batch statistics and save the batch into disk. + + Args: + batch: + A batch of data. See `lhotse.dataset.K2SpeechRecognitionDataset()` + for the content in it. + params: + Parameters for training. See :func:`get_params`. + """ + + filename = f"{params.exp_dir}/batch-{uuid4()}.pt" + logging.info(f"Saving batch to {filename}") + torch.save(batch, filename) + +def main(): + parser = get_parser() + args = parser.parse_args() + args.exp_dir = Path(args.exp_dir) + + world_size = args.world_size + assert world_size >= 1 + if world_size > 1: + mp.spawn(run, args=(world_size, args), nprocs=world_size, join=True) + else: + run(rank=0, world_size=1, args=args) + + +torch.set_num_threads(1) +torch.set_num_interop_threads(1) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/train_utils/icefall/.ipynb_checkpoints/utils-checkpoint.py b/train_utils/icefall/.ipynb_checkpoints/utils-checkpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..8fb718e62547e5c8b23e351201c05c120b585bb8 --- /dev/null +++ b/train_utils/icefall/.ipynb_checkpoints/utils-checkpoint.py @@ -0,0 +1,590 @@ +import torch +import torch.nn as nn +from torch import Tensor +from torch.cuda.amp import GradScaler +from torch.utils.data import Sampler +from torch.nn.parallel import DistributedDataParallel as DDP +from torch.optim import Optimizer +from torch import distributed as dist +from torch.utils.tensorboard import SummaryWriter +import logging +import os +import re +import glob +import collections +from pathlib import Path +from typing import Any, Dict, List, Optional, Union, Tuple +from datetime import datetime +from pathlib import Path +import argparse +# use duck typing for LRScheduler since we have different possibilities, see +# our class LRScheduler. +LRSchedulerType = object +Pathlike = Union[str, Path] + + +def average_state_dict( + state_dict_1: Dict[str, Tensor], + state_dict_2: Dict[str, Tensor], + weight_1: float, + weight_2: float, + scaling_factor: float = 1.0, +) -> Dict[str, Tensor]: + """Average two state_dict with given weights: + state_dict_1 = (state_dict_1 * weight_1 + state_dict_2 * weight_2) + * scaling_factor + It is an in-place operation on state_dict_1 itself. + """ + # Identify shared parameters. Two parameters are said to be shared + # if they have the same data_ptr + uniqued: Dict[int, str] = dict() + for k, v in state_dict_1.items(): + v_data_ptr = v.data_ptr() + if v_data_ptr in uniqued: + continue + uniqued[v_data_ptr] = k + + uniqued_names = list(uniqued.values()) + for k in uniqued_names: + v = state_dict_1[k] + if torch.is_floating_point(v): + v *= weight_1 + v += state_dict_2[k].to(device=state_dict_1[k].device) * weight_2 + v *= scaling_factor + +def load_checkpoint( + filename: Path, + model: nn.Module, + model_avg: Optional[nn.Module] = None, + optimizer: Optional[Optimizer] = None, + scheduler: Optional[LRSchedulerType] = None, + scaler: Optional[GradScaler] = None, + sampler: Optional[Sampler] = None, + strict: bool = False, +) -> Dict[str, Any]: + """ + TODO: document it + """ + logging.info(f"Loading checkpoint from {filename}") + checkpoint = torch.load(filename, map_location="cpu") + + if next(iter(checkpoint["model"])).startswith("module."): + logging.info("Loading checkpoint saved by DDP") + + dst_state_dict = model.state_dict() + src_state_dict = checkpoint["model"] + for key in dst_state_dict.keys(): + src_key = "{}.{}".format("module", key) + dst_state_dict[key] = src_state_dict.pop(src_key) + assert len(src_state_dict) == 0 + model.load_state_dict(dst_state_dict, strict=strict) + else: + model.load_state_dict(checkpoint["model"], strict=strict) + + checkpoint.pop("model") + + if model_avg is not None and "model_avg" in checkpoint: + logging.info("Loading averaged model") + model_avg.load_state_dict(checkpoint["model_avg"], strict=strict) + checkpoint.pop("model_avg") + + def load(name, obj): + s = checkpoint.get(name, None) + if obj and s: + obj.load_state_dict(s) + checkpoint.pop(name) + + load("optimizer", optimizer) + load("scheduler", scheduler) + load("grad_scaler", scaler) + load("sampler", sampler) + + return checkpoint + +def find_checkpoints(out_dir: Path, iteration: int = 0) -> List[str]: + """Find all available checkpoints in a directory. + + The checkpoint filenames have the form: `checkpoint-xxx.pt` + where xxx is a numerical value. + + Assume you have the following checkpoints in the folder `foo`: + + - checkpoint-1.pt + - checkpoint-20.pt + - checkpoint-300.pt + - checkpoint-4000.pt + + Case 1 (Return all checkpoints):: + + find_checkpoints(out_dir='foo') + + Case 2 (Return checkpoints newer than checkpoint-20.pt, i.e., + checkpoint-4000.pt, checkpoint-300.pt, and checkpoint-20.pt) + + find_checkpoints(out_dir='foo', iteration=20) + + Case 3 (Return checkpoints older than checkpoint-20.pt, i.e., + checkpoint-20.pt, checkpoint-1.pt):: + + find_checkpoints(out_dir='foo', iteration=-20) + + Args: + out_dir: + The directory where to search for checkpoints. + iteration: + If it is 0, return all available checkpoints. + If it is positive, return the checkpoints whose iteration number is + greater than or equal to `iteration`. + If it is negative, return the checkpoints whose iteration number is + less than or equal to `-iteration`. + Returns: + Return a list of checkpoint filenames, sorted in descending + order by the numerical value in the filename. + """ + checkpoints = list(glob.glob(f"{out_dir}/checkpoint-[0-9]*.pt")) + pattern = re.compile(r"checkpoint-([0-9]+).pt") + iter_checkpoints = [] + for c in checkpoints: + result = pattern.search(c) + if not result: + logging.warn(f"Invalid checkpoint filename {c}") + continue + + iter_checkpoints.append((int(result.group(1)), c)) + + # iter_checkpoints is a list of tuples. Each tuple contains + # two elements: (iteration_number, checkpoint-iteration_number.pt) + + iter_checkpoints = sorted(iter_checkpoints, reverse=True, key=lambda x: x[0]) + if iteration >= 0: + ans = [ic[1] for ic in iter_checkpoints if ic[0] >= iteration] + else: + ans = [ic[1] for ic in iter_checkpoints if ic[0] <= -iteration] + + return ans + +def remove_checkpoints( + out_dir: Path, + topk: int, +): + """Remove checkpoints from the given directory. + + We assume that checkpoint filename has the form `checkpoint-xxx.pt` + where xxx is a number, representing the number of processed batches + when saving that checkpoint. We sort checkpoints by filename and keep + only the `topk` checkpoints with the highest `xxx`. + + Args: + out_dir: + The directory containing checkpoints to be removed. + topk: + Number of checkpoints to keep. + rank: + If using DDP for training, it is the rank of the current node. + Use 0 if no DDP is used for training. + """ + assert topk >= 1, topk + + checkpoints = find_checkpoints(out_dir) + + if len(checkpoints) == 0: + logging.warn(f"No checkpoints found in {out_dir}") + return + + if len(checkpoints) <= topk: + return + + to_remove = checkpoints[topk:] + for c in to_remove: + os.remove(c) + +def save_checkpoint_impl( + filename: Path, + model: Union[nn.Module, DDP], + model_avg: Optional[nn.Module] = None, + params: Optional[Dict[str, Any]] = None, + optimizer: Optional[Optimizer] = None, + scheduler: Optional[LRSchedulerType] = None, + scaler: Optional[GradScaler] = None, + sampler = None, + rank: int = 0, +) -> None: + """Save training information to a file. + + Args: + filename: + The checkpoint filename. + model: + The model to be saved. We only save its `state_dict()`. + model_avg: + The stored model averaged from the start of training. + params: + User defined parameters, e.g., epoch, loss. + optimizer: + The optimizer to be saved. We only save its `state_dict()`. + scheduler: + The scheduler to be saved. We only save its `state_dict()`. + scalar: + The GradScaler to be saved. We only save its `state_dict()`. + rank: + Used in DDP. We save checkpoint only for the node whose rank is 0. + Returns: + Return None. + """ + if rank != 0: + return + + logging.info(f"Saving checkpoint to {filename}") + + if isinstance(model, DDP): + model = model.module + + checkpoint = { + "model": model.state_dict(), + "optimizer": optimizer.state_dict() if optimizer is not None else None, + "scheduler": scheduler.state_dict() if scheduler is not None else None, + "grad_scaler": scaler.state_dict() if scaler is not None else None, + "sampler": sampler.state_dict() if sampler is not None else None, + } + + if model_avg is not None: + checkpoint["model_avg"] = model_avg.to(torch.float32).state_dict() + + if params: + for k, v in params.items(): + assert k not in checkpoint + checkpoint[k] = v + + torch.save(checkpoint, filename) + +def save_checkpoint_with_global_batch_idx( + out_dir: Path, + global_batch_idx: int, + model: nn.Module, + model_avg: Optional[nn.Module] = None, + params: Optional[Dict[str, Any]] = None, + optimizer: Optional[Optimizer] = None, + scheduler: Optional[LRSchedulerType] = None, + scaler: Optional[GradScaler] = None, + sampler: Optional[Sampler] = None, + rank: int = 0, +): + """Save training info after processing given number of batches. + + Args: + out_dir: + The directory to save the checkpoint. + global_batch_idx: + The number of batches processed so far from the very start of the + training. The saved checkpoint will have the following filename: + + f'out_dir / checkpoint-{global_batch_idx}.pt' + model: + The neural network model whose `state_dict` will be saved in the + checkpoint. + model_avg: + The stored model averaged from the start of training. + params: + A dict of training configurations to be saved. + optimizer: + The optimizer used in the training. Its `state_dict` will be saved. + scheduler: + The learning rate scheduler used in the training. Its `state_dict` will + be saved. + scaler: + The scaler used for mix precision training. Its `state_dict` will + be saved. + sampler: + The sampler used in the training dataset. + rank: + The rank ID used in DDP training of the current node. Set it to 0 + if DDP is not used. + """ + out_dir = Path(out_dir) + out_dir.mkdir(parents=True, exist_ok=True) + filename = out_dir / f"checkpoint-{global_batch_idx}.pt" + save_checkpoint_impl( + filename=filename, + model=model, + model_avg=model_avg, + params=params, + optimizer=optimizer, + scheduler=scheduler, + scaler=scaler, + sampler=sampler, + rank=rank, + ) + +def update_averaged_model( + params: Dict[str, Tensor], + model_cur: nn.Module, + model_avg: nn.Module, +) -> None: + """Update the averaged model: + model_avg = model_cur * (average_period / batch_idx_train) + + model_avg * ((batch_idx_train - average_period) / batch_idx_train) + + Args: + params: + User defined parameters, e.g., epoch, loss. + model_cur: + The current model. + model_avg: + The averaged model to be updated. + """ + weight_cur = params.average_period / params.batch_idx_train + weight_avg = 1 - weight_cur + + cur = model_cur.state_dict() + avg = model_avg.state_dict() + + average_state_dict( + state_dict_1=avg, + state_dict_2=cur, + weight_1=weight_avg, + weight_2=weight_cur, + ) + +def cleanup_dist(): + dist.destroy_process_group() + +def setup_dist( + rank, world_size, master_port=None, use_ddp_launch=False, master_addr=None +): + """ + rank and world_size are used only if use_ddp_launch is False. + """ + if "MASTER_ADDR" not in os.environ: + os.environ["MASTER_ADDR"] = ( + "localhost" if master_addr is None else str(master_addr) + ) + + if "MASTER_PORT" not in os.environ: + os.environ["MASTER_PORT"] = "12354" if master_port is None else str(master_port) + + if use_ddp_launch is False: + dist.init_process_group("nccl", rank=rank, world_size=world_size) + torch.cuda.set_device(rank) + else: + dist.init_process_group("nccl") + +def register_inf_check_hooks(model: nn.Module) -> None: + """Registering forward hook on each module, to check + whether its output tensors is not finite. + + Args: + model: + the model to be analyzed. + """ + + for name, module in model.named_modules(): + if name == "": + name = "" + + # default param _name is a way to capture the current value of the variable "name". + def forward_hook(_module, _input, _output, _name=name): + if isinstance(_output, Tensor): + if not torch.isfinite(_output.to(torch.float32).sum()): + raise ValueError( + f"The sum of {_name}.output is not finite: {_output}" + ) + elif isinstance(_output, tuple): + for i, o in enumerate(_output): + if isinstance(o, tuple): + o = o[0] + if not isinstance(o, Tensor): + continue + if not torch.isfinite(o.to(torch.float32).sum()): + raise ValueError( + f"The sum of {_name}.output[{i}] is not finite: {_output}" + ) + + # default param _name is a way to capture the current value of the variable "name". + def backward_hook(_module, _input, _output, _name=name): + if isinstance(_output, Tensor): + if not torch.isfinite(_output.to(torch.float32).sum()): + logging.warning( + f"The sum of {_name}.grad is not finite" # ": {_output}" + ) + elif isinstance(_output, tuple): + for i, o in enumerate(_output): + if isinstance(o, tuple): + o = o[0] + if not isinstance(o, Tensor): + continue + if not torch.isfinite(o.to(torch.float32).sum()): + logging.warning(f"The sum of {_name}.grad[{i}] is not finite") + + module.register_forward_hook(forward_hook) + module.register_backward_hook(backward_hook) + + for name, parameter in model.named_parameters(): + + def param_backward_hook(grad, _name=name): + if not torch.isfinite(grad.to(torch.float32).sum()): + logging.warning(f"The sum of {_name}.param_grad is not finite") + + parameter.register_hook(param_backward_hook) + +class AttributeDict(dict): + def __getattr__(self, key): + if key in self: + return self[key] + raise AttributeError(f"No such attribute '{key}'") + + def __setattr__(self, key, value): + self[key] = value + + def __delattr__(self, key): + if key in self: + del self[key] + return + raise AttributeError(f"No such attribute '{key}'") + +class MetricsTracker(collections.defaultdict): + def __init__(self): + # Passing the type 'int' to the base-class constructor + # makes undefined items default to int() which is zero. + # This class will play a role as metrics tracker. + # It can record many metrics, including but not limited to loss. + super(MetricsTracker, self).__init__(int) + + def __add__(self, other: "MetricsTracker") -> "MetricsTracker": + ans = MetricsTracker() + for k, v in self.items(): + ans[k] = v + for k, v in other.items(): + ans[k] = ans[k] + v + return ans + + def __mul__(self, alpha: float) -> "MetricsTracker": + ans = MetricsTracker() + for k, v in self.items(): + ans[k] = v * alpha + return ans + + def __str__(self) -> str: + ans_frames = "" + ans_utterances = "" + for k, v in self.norm_items(): + norm_value = "%.4g" % v + if "utt_" not in k: + ans_frames += str(k) + "=" + str(norm_value) + ", " + else: + ans_utterances += str(k) + "=" + str(norm_value) + if k == "utt_duration": + ans_utterances += " frames, " + elif k == "utt_pad_proportion": + ans_utterances += ", " + else: + raise ValueError(f"Unexpected key: {k}") + frames = "%.2f" % self["frames"] + ans_frames += "over " + str(frames) + " frames. " + if ans_utterances != "": + utterances = "%.2f" % self["utterances"] + ans_utterances += "over " + str(utterances) + " utterances." + + return ans_frames + ans_utterances + + def norm_items(self) -> List[Tuple[str, float]]: + """ + Returns a list of pairs, like: + [('ctc_loss', 0.1), ('att_loss', 0.07)] + """ + num_frames = self["frames"] if "frames" in self else 1 + num_utterances = self["utterances"] if "utterances" in self else 1 + ans = [] + for k, v in self.items(): + if k == "frames" or k == "utterances": + continue + norm_value = ( + float(v) / num_frames if "utt_" not in k else float(v) / num_utterances + ) + ans.append((k, norm_value)) + return ans + + def write_summary( + self, + tb_writer: SummaryWriter, + prefix: str, + batch_idx: int, + ) -> None: + """Add logging information to a TensorBoard writer. + + Args: + tb_writer: a TensorBoard writer + prefix: a prefix for the name of the loss, e.g. "train/valid_", + or "train/current_" + batch_idx: The current batch index, used as the x-axis of the plot. + """ + for k, v in self.norm_items(): + tb_writer.add_scalar(prefix + k, v, batch_idx) + +def setup_logger( + log_filename: Pathlike, + log_level: str = "info", + use_console: bool = True, +) -> None: + """Setup log level. + + Args: + log_filename: + The filename to save the log. + log_level: + The log level to use, e.g., "debug", "info", "warning", "error", + "critical" + use_console: + True to also print logs to console. + """ + now = datetime.now() + date_time = now.strftime("%Y-%m-%d-%H-%M-%S") + if dist.is_available() and dist.is_initialized(): + world_size = dist.get_world_size() + rank = dist.get_rank() + formatter = f"%(asctime)s %(levelname)s [%(filename)s:%(lineno)d] ({rank}/{world_size}) %(message)s" # noqa + log_filename = f"{log_filename}-{date_time}-{rank}" + else: + formatter = "%(asctime)s %(levelname)s [%(filename)s:%(lineno)d] %(message)s" + log_filename = f"{log_filename}-{date_time}" + + os.makedirs(os.path.dirname(log_filename), exist_ok=True) + + level = logging.ERROR + if log_level == "debug": + level = logging.DEBUG + elif log_level == "info": + level = logging.INFO + elif log_level == "warning": + level = logging.WARNING + elif log_level == "critical": + level = logging.CRITICAL + + logging.basicConfig( + filename=log_filename, + format=formatter, + level=level, + filemode="w", + ) + if use_console: + console = logging.StreamHandler() + console.setLevel(level) + console.setFormatter(logging.Formatter(formatter)) + logging.getLogger("").addHandler(console) + +def str2bool(v): + """Used in argparse.ArgumentParser.add_argument to indicate + that a type is a bool type and user can enter + + - yes, true, t, y, 1, to represent True + - no, false, f, n, 0, to represent False + + See https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse # noqa + """ + if isinstance(v, bool): + return v + if v.lower() in ("yes", "true", "t", "y", "1"): + return True + elif v.lower() in ("no", "false", "f", "n", "0"): + return False + else: + raise argparse.ArgumentTypeError("Boolean value expected.") \ No newline at end of file diff --git a/train_utils/icefall/utils.py b/train_utils/icefall/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..a984b2ca1b0300c25b21de16d32b4945fa691e7b --- /dev/null +++ b/train_utils/icefall/utils.py @@ -0,0 +1,591 @@ +import torch +import torch.nn as nn +from torch import Tensor +from torch.cuda.amp import GradScaler +from torch.utils.data import Sampler +from torch.nn.parallel import DistributedDataParallel as DDP +from torch.optim import Optimizer +from torch import distributed as dist +from torch.utils.tensorboard import SummaryWriter +import logging +import os +import re +import glob +import collections +from pathlib import Path +from typing import Any, Dict, List, Optional, Union, Tuple +from datetime import datetime +from pathlib import Path +import argparse +# use duck typing for LRScheduler since we have different possibilities, see +# our class LRScheduler. +LRSchedulerType = object +Pathlike = Union[str, Path] + + +def average_state_dict( + state_dict_1: Dict[str, Tensor], + state_dict_2: Dict[str, Tensor], + weight_1: float, + weight_2: float, + scaling_factor: float = 1.0, +) -> Dict[str, Tensor]: + """Average two state_dict with given weights: + state_dict_1 = (state_dict_1 * weight_1 + state_dict_2 * weight_2) + * scaling_factor + It is an in-place operation on state_dict_1 itself. + """ + # Identify shared parameters. Two parameters are said to be shared + # if they have the same data_ptr + uniqued: Dict[int, str] = dict() + for k, v in state_dict_1.items(): + v_data_ptr = v.data_ptr() + if v_data_ptr in uniqued: + continue + uniqued[v_data_ptr] = k + + uniqued_names = list(uniqued.values()) + for k in uniqued_names: + v = state_dict_1[k] + if torch.is_floating_point(v): + v *= weight_1 + v += state_dict_2[k].to(device=state_dict_1[k].device) * weight_2 + v *= scaling_factor + +def load_checkpoint( + filename: Path, + model: nn.Module, + model_avg: Optional[nn.Module] = None, + optimizer: Optional[Optimizer] = None, + scheduler: Optional[LRSchedulerType] = None, + scaler: Optional[GradScaler] = None, + sampler: Optional[Sampler] = None, + strict: bool = False, +) -> Dict[str, Any]: + """ + TODO: document it + """ + logging.info(f"Loading checkpoint from {filename}") + checkpoint = torch.load(filename, map_location="cpu") + + if next(iter(checkpoint["model"])).startswith("module."): + logging.info("Loading checkpoint saved by DDP") + + dst_state_dict = model.state_dict() + src_state_dict = checkpoint["model"] + for key in dst_state_dict.keys(): + src_key = "{}.{}".format("module", key) + dst_state_dict[key] = src_state_dict.pop(src_key) + assert len(src_state_dict) == 0 + model.load_state_dict(dst_state_dict, strict=strict) + else: + model.load_state_dict(checkpoint["model"], strict=strict) + + checkpoint.pop("model") + + if model_avg is not None and "model_avg" in checkpoint: + logging.info("Loading averaged model") + model_avg.load_state_dict(checkpoint["model_avg"], strict=strict) + checkpoint.pop("model_avg") + + def load(name, obj): + s = checkpoint.get(name, None) + if obj and s: + obj.load_state_dict(s) + checkpoint.pop(name) + + load("optimizer", optimizer) + load("scheduler", scheduler) + load("grad_scaler", scaler) + load("sampler", sampler) + + return checkpoint + +def find_checkpoints(out_dir: Path, iteration: int = 0) -> List[str]: + """Find all available checkpoints in a directory. + + The checkpoint filenames have the form: `checkpoint-xxx.pt` + where xxx is a numerical value. + + Assume you have the following checkpoints in the folder `foo`: + + - checkpoint-1.pt + - checkpoint-20.pt + - checkpoint-300.pt + - checkpoint-4000.pt + + Case 1 (Return all checkpoints):: + + find_checkpoints(out_dir='foo') + + Case 2 (Return checkpoints newer than checkpoint-20.pt, i.e., + checkpoint-4000.pt, checkpoint-300.pt, and checkpoint-20.pt) + + find_checkpoints(out_dir='foo', iteration=20) + + Case 3 (Return checkpoints older than checkpoint-20.pt, i.e., + checkpoint-20.pt, checkpoint-1.pt):: + + find_checkpoints(out_dir='foo', iteration=-20) + + Args: + out_dir: + The directory where to search for checkpoints. + iteration: + If it is 0, return all available checkpoints. + If it is positive, return the checkpoints whose iteration number is + greater than or equal to `iteration`. + If it is negative, return the checkpoints whose iteration number is + less than or equal to `-iteration`. + Returns: + Return a list of checkpoint filenames, sorted in descending + order by the numerical value in the filename. + """ + checkpoints = list(glob.glob(f"{out_dir}/checkpoint-[0-9]*.pt")) + pattern = re.compile(r"checkpoint-([0-9]+).pt") + iter_checkpoints = [] + for c in checkpoints: + result = pattern.search(c) + if not result: + logging.warn(f"Invalid checkpoint filename {c}") + continue + + iter_checkpoints.append((int(result.group(1)), c)) + + # iter_checkpoints is a list of tuples. Each tuple contains + # two elements: (iteration_number, checkpoint-iteration_number.pt) + + iter_checkpoints = sorted(iter_checkpoints, reverse=True, key=lambda x: x[0]) + if iteration >= 0: + ans = [ic[1] for ic in iter_checkpoints if ic[0] >= iteration] + else: + ans = [ic[1] for ic in iter_checkpoints if ic[0] <= -iteration] + + return ans + +def remove_checkpoints( + out_dir: Path, + topk: int, +): + """Remove checkpoints from the given directory. + + We assume that checkpoint filename has the form `checkpoint-xxx.pt` + where xxx is a number, representing the number of processed batches + when saving that checkpoint. We sort checkpoints by filename and keep + only the `topk` checkpoints with the highest `xxx`. + + Args: + out_dir: + The directory containing checkpoints to be removed. + topk: + Number of checkpoints to keep. + rank: + If using DDP for training, it is the rank of the current node. + Use 0 if no DDP is used for training. + """ + assert topk >= 1, topk + + checkpoints = find_checkpoints(out_dir) + + if len(checkpoints) == 0: + logging.warn(f"No checkpoints found in {out_dir}") + return + + if len(checkpoints) <= topk: + return + + to_remove = checkpoints[topk:] + for c in to_remove: + os.remove(c) + +def save_checkpoint_impl( + filename: Path, + model: Union[nn.Module, DDP], + model_avg: Optional[nn.Module] = None, + params: Optional[Dict[str, Any]] = None, + optimizer: Optional[Optimizer] = None, + scheduler: Optional[LRSchedulerType] = None, + scaler: Optional[GradScaler] = None, + sampler = None, + rank: int = 0, +) -> None: + """Save training information to a file. + + Args: + filename: + The checkpoint filename. + model: + The model to be saved. We only save its `state_dict()`. + model_avg: + The stored model averaged from the start of training. + params: + User defined parameters, e.g., epoch, loss. + optimizer: + The optimizer to be saved. We only save its `state_dict()`. + scheduler: + The scheduler to be saved. We only save its `state_dict()`. + scalar: + The GradScaler to be saved. We only save its `state_dict()`. + rank: + Used in DDP. We save checkpoint only for the node whose rank is 0. + Returns: + Return None. + """ + if rank != 0: + return + + logging.info(f"Saving checkpoint to {filename}") + + if isinstance(model, DDP): + model = model.module + + checkpoint = { + "model": model.state_dict(), + "optimizer": optimizer.state_dict() if optimizer is not None else None, + "scheduler": scheduler.state_dict() if scheduler is not None else None, + "grad_scaler": scaler.state_dict() if scaler is not None else None, + "sampler": sampler.state_dict() if sampler is not None else None, + } + + if model_avg is not None: + checkpoint["model_avg"] = model_avg.to(torch.float32).state_dict() + + if params: + for k, v in params.items(): + assert k not in checkpoint + checkpoint[k] = v + + torch.save(checkpoint, filename) + +def save_checkpoint_with_global_batch_idx( + out_dir: Path, + global_batch_idx: int, + model: nn.Module, + model_avg: Optional[nn.Module] = None, + params: Optional[Dict[str, Any]] = None, + optimizer: Optional[Optimizer] = None, + scheduler: Optional[LRSchedulerType] = None, + scaler: Optional[GradScaler] = None, + sampler: Optional[Sampler] = None, + rank: int = 0, +): + """Save training info after processing given number of batches. + + Args: + out_dir: + The directory to save the checkpoint. + global_batch_idx: + The number of batches processed so far from the very start of the + training. The saved checkpoint will have the following filename: + + f'out_dir / checkpoint-{global_batch_idx}.pt' + model: + The neural network model whose `state_dict` will be saved in the + checkpoint. + model_avg: + The stored model averaged from the start of training. + params: + A dict of training configurations to be saved. + optimizer: + The optimizer used in the training. Its `state_dict` will be saved. + scheduler: + The learning rate scheduler used in the training. Its `state_dict` will + be saved. + scaler: + The scaler used for mix precision training. Its `state_dict` will + be saved. + sampler: + The sampler used in the training dataset. + rank: + The rank ID used in DDP training of the current node. Set it to 0 + if DDP is not used. + """ + out_dir = Path(out_dir) + out_dir.mkdir(parents=True, exist_ok=True) + print(f"Saving model checkpoint with global batch IDX is {global_batch_idx}") + filename = out_dir / "checkpoint-global-batch.pt" + save_checkpoint_impl( + filename=filename, + model=model, + model_avg=model_avg, + params=params, + optimizer=optimizer, + scheduler=scheduler, + scaler=scaler, + sampler=sampler, + rank=rank, + ) + +def update_averaged_model( + params: Dict[str, Tensor], + model_cur: nn.Module, + model_avg: nn.Module, +) -> None: + """Update the averaged model: + model_avg = model_cur * (average_period / batch_idx_train) + + model_avg * ((batch_idx_train - average_period) / batch_idx_train) + + Args: + params: + User defined parameters, e.g., epoch, loss. + model_cur: + The current model. + model_avg: + The averaged model to be updated. + """ + weight_cur = params.average_period / params.batch_idx_train + weight_avg = 1 - weight_cur + + cur = model_cur.state_dict() + avg = model_avg.state_dict() + + average_state_dict( + state_dict_1=avg, + state_dict_2=cur, + weight_1=weight_avg, + weight_2=weight_cur, + ) + +def cleanup_dist(): + dist.destroy_process_group() + +def setup_dist( + rank, world_size, master_port=None, use_ddp_launch=False, master_addr=None +): + """ + rank and world_size are used only if use_ddp_launch is False. + """ + if "MASTER_ADDR" not in os.environ: + os.environ["MASTER_ADDR"] = ( + "localhost" if master_addr is None else str(master_addr) + ) + + if "MASTER_PORT" not in os.environ: + os.environ["MASTER_PORT"] = "12354" if master_port is None else str(master_port) + + if use_ddp_launch is False: + dist.init_process_group("nccl", rank=rank, world_size=world_size) + torch.cuda.set_device(rank) + else: + dist.init_process_group("nccl") + +def register_inf_check_hooks(model: nn.Module) -> None: + """Registering forward hook on each module, to check + whether its output tensors is not finite. + + Args: + model: + the model to be analyzed. + """ + + for name, module in model.named_modules(): + if name == "": + name = "" + + # default param _name is a way to capture the current value of the variable "name". + def forward_hook(_module, _input, _output, _name=name): + if isinstance(_output, Tensor): + if not torch.isfinite(_output.to(torch.float32).sum()): + raise ValueError( + f"The sum of {_name}.output is not finite: {_output}" + ) + elif isinstance(_output, tuple): + for i, o in enumerate(_output): + if isinstance(o, tuple): + o = o[0] + if not isinstance(o, Tensor): + continue + if not torch.isfinite(o.to(torch.float32).sum()): + raise ValueError( + f"The sum of {_name}.output[{i}] is not finite: {_output}" + ) + + # default param _name is a way to capture the current value of the variable "name". + def backward_hook(_module, _input, _output, _name=name): + if isinstance(_output, Tensor): + if not torch.isfinite(_output.to(torch.float32).sum()): + logging.warning( + f"The sum of {_name}.grad is not finite" # ": {_output}" + ) + elif isinstance(_output, tuple): + for i, o in enumerate(_output): + if isinstance(o, tuple): + o = o[0] + if not isinstance(o, Tensor): + continue + if not torch.isfinite(o.to(torch.float32).sum()): + logging.warning(f"The sum of {_name}.grad[{i}] is not finite") + + module.register_forward_hook(forward_hook) + module.register_backward_hook(backward_hook) + + for name, parameter in model.named_parameters(): + + def param_backward_hook(grad, _name=name): + if not torch.isfinite(grad.to(torch.float32).sum()): + logging.warning(f"The sum of {_name}.param_grad is not finite") + + parameter.register_hook(param_backward_hook) + +class AttributeDict(dict): + def __getattr__(self, key): + if key in self: + return self[key] + raise AttributeError(f"No such attribute '{key}'") + + def __setattr__(self, key, value): + self[key] = value + + def __delattr__(self, key): + if key in self: + del self[key] + return + raise AttributeError(f"No such attribute '{key}'") + +class MetricsTracker(collections.defaultdict): + def __init__(self): + # Passing the type 'int' to the base-class constructor + # makes undefined items default to int() which is zero. + # This class will play a role as metrics tracker. + # It can record many metrics, including but not limited to loss. + super(MetricsTracker, self).__init__(int) + + def __add__(self, other: "MetricsTracker") -> "MetricsTracker": + ans = MetricsTracker() + for k, v in self.items(): + ans[k] = v + for k, v in other.items(): + ans[k] = ans[k] + v + return ans + + def __mul__(self, alpha: float) -> "MetricsTracker": + ans = MetricsTracker() + for k, v in self.items(): + ans[k] = v * alpha + return ans + + def __str__(self) -> str: + ans_frames = "" + ans_utterances = "" + for k, v in self.norm_items(): + norm_value = "%.4g" % v + if "utt_" not in k: + ans_frames += str(k) + "=" + str(norm_value) + ", " + else: + ans_utterances += str(k) + "=" + str(norm_value) + if k == "utt_duration": + ans_utterances += " frames, " + elif k == "utt_pad_proportion": + ans_utterances += ", " + else: + raise ValueError(f"Unexpected key: {k}") + frames = "%.2f" % self["frames"] + ans_frames += "over " + str(frames) + " frames. " + if ans_utterances != "": + utterances = "%.2f" % self["utterances"] + ans_utterances += "over " + str(utterances) + " utterances." + + return ans_frames + ans_utterances + + def norm_items(self) -> List[Tuple[str, float]]: + """ + Returns a list of pairs, like: + [('ctc_loss', 0.1), ('att_loss', 0.07)] + """ + num_frames = self["frames"] if "frames" in self else 1 + num_utterances = self["utterances"] if "utterances" in self else 1 + ans = [] + for k, v in self.items(): + if k == "frames" or k == "utterances": + continue + norm_value = ( + float(v) / num_frames if "utt_" not in k else float(v) / num_utterances + ) + ans.append((k, norm_value)) + return ans + + def write_summary( + self, + tb_writer: SummaryWriter, + prefix: str, + batch_idx: int, + ) -> None: + """Add logging information to a TensorBoard writer. + + Args: + tb_writer: a TensorBoard writer + prefix: a prefix for the name of the loss, e.g. "train/valid_", + or "train/current_" + batch_idx: The current batch index, used as the x-axis of the plot. + """ + for k, v in self.norm_items(): + tb_writer.add_scalar(prefix + k, v, batch_idx) + +def setup_logger( + log_filename: Pathlike, + log_level: str = "info", + use_console: bool = True, +) -> None: + """Setup log level. + + Args: + log_filename: + The filename to save the log. + log_level: + The log level to use, e.g., "debug", "info", "warning", "error", + "critical" + use_console: + True to also print logs to console. + """ + now = datetime.now() + date_time = now.strftime("%Y-%m-%d-%H-%M-%S") + if dist.is_available() and dist.is_initialized(): + world_size = dist.get_world_size() + rank = dist.get_rank() + formatter = f"%(asctime)s %(levelname)s [%(filename)s:%(lineno)d] ({rank}/{world_size}) %(message)s" # noqa + log_filename = f"{log_filename}-{date_time}-{rank}" + else: + formatter = "%(asctime)s %(levelname)s [%(filename)s:%(lineno)d] %(message)s" + log_filename = f"{log_filename}-{date_time}" + + os.makedirs(os.path.dirname(log_filename), exist_ok=True) + + level = logging.ERROR + if log_level == "debug": + level = logging.DEBUG + elif log_level == "info": + level = logging.INFO + elif log_level == "warning": + level = logging.WARNING + elif log_level == "critical": + level = logging.CRITICAL + + logging.basicConfig( + filename=log_filename, + format=formatter, + level=level, + filemode="w", + ) + if use_console: + console = logging.StreamHandler() + console.setLevel(level) + console.setFormatter(logging.Formatter(formatter)) + logging.getLogger("").addHandler(console) + +def str2bool(v): + """Used in argparse.ArgumentParser.add_argument to indicate + that a type is a bool type and user can enter + + - yes, true, t, y, 1, to represent True + - no, false, f, n, 0, to represent False + + See https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse # noqa + """ + if isinstance(v, bool): + return v + if v.lower() in ("yes", "true", "t", "y", "1"): + return True + elif v.lower() in ("no", "false", "f", "n", "0"): + return False + else: + raise argparse.ArgumentTypeError("Boolean value expected.") \ No newline at end of file diff --git a/train_utils/lhotse/utils.py b/train_utils/lhotse/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..5b73937ff3ffec0316efa21f2353510b75ca9cca --- /dev/null +++ b/train_utils/lhotse/utils.py @@ -0,0 +1,18 @@ +import random +import numpy as np +import torch +import uuid + +def fix_random_seed(random_seed: int): + """ + Set the same random seed for the libraries and modules that Lhotse interacts with. + Includes the ``random`` module, numpy, torch, and ``uuid4()`` function defined in this file. + """ + global _lhotse_uuid + random.seed(random_seed) + np.random.seed(random_seed) + torch.random.manual_seed(random_seed) + # Ensure deterministic ID creation + rd = random.Random() + rd.seed(random_seed) + _lhotse_uuid = lambda: uuid.UUID(int=rd.getrandbits(128)) \ No newline at end of file diff --git a/train_utils/model.py b/train_utils/model.py new file mode 100644 index 0000000000000000000000000000000000000000..fd47b75a27868c81562892a7a100da96af7726b4 --- /dev/null +++ b/train_utils/model.py @@ -0,0 +1,57 @@ +import os +import torch +import logging +from macros import * +from data.tokenizer import ( + AudioTokenizer, + tokenize_audio, +) +from models.vallex import VALLE +from vocos import Vocos + +def get_model(device): + url = 'https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt' + + checkpoints_dir = "./checkpoints" + + model_checkpoint_name = "vallex-checkpoint_modified.pt" + if not os.path.exists(checkpoints_dir): os.mkdir(checkpoints_dir) + if not os.path.exists(os.path.join(checkpoints_dir, model_checkpoint_name)): + import wget + print("3") + try: + logging.info( + "Downloading model from https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt ...") + # download from https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt to ./checkpoints/vallex-checkpoint.pt + wget.download("https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt", + out="./checkpoints/vallex-checkpoint.pt", bar=wget.bar_adaptive) + except Exception as e: + logging.info(e) + raise Exception( + "\n Model weights download failed, please go to 'https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt'" + "\n manually download model weights and put it to {} .".format(os.getcwd() + "\checkpoints")) + # VALL-E + model = VALLE( + N_DIM, + NUM_HEAD, + NUM_LAYERS, + norm_first=True, + add_prenet=False, + prefix_mode=PREFIX_MODE, + share_embedding=True, + nar_scale_factor=1.0, + prepend_bos=True, + num_quantizers=NUM_QUANTIZERS, + ).to(device) + checkpoint = torch.load(os.path.join(checkpoints_dir, model_checkpoint_name), map_location='cpu') + missing_keys, unexpected_keys = model.load_state_dict( + checkpoint["model"], strict=True + ) + assert not missing_keys + + # Encodec + codec = AudioTokenizer(device) + + vocos = Vocos.from_pretrained('charactr/vocos-encodec-24khz').to(device) + + return model, codec, vocos \ No newline at end of file diff --git a/train_utils/utils.py b/train_utils/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..5fd3af2fb64c6c4a19239f87d12e6e1787d1a471 --- /dev/null +++ b/train_utils/utils.py @@ -0,0 +1,1237 @@ +import logging +from pathlib import Path +from typing import Dict, List, Optional, Union, Tuple + +import torch +from torch import Tensor +from torch.optim import Optimizer +from pathlib import Path +from collections import defaultdict +import contextlib +_lhotse_uuid = None +import uuid +import argparse +import warnings + +# use duck typing for LRScheduler since we have different possibilities, see +# our class LRScheduler. +LRSchedulerType = object +Pathlike = Union[str, Path] + +def add_model_arguments(parser: argparse.ArgumentParser): + parser.add_argument( + "--model-name", + type=str, + default="VALL-E", + help="VALL-E, VALL-F, Transformer.", + ) + parser.add_argument( + "--decoder-dim", + type=int, + default=1024, + help="Embedding dimension in the decoder model.", + ) + parser.add_argument( + "--nhead", + type=int, + default=16, + help="Number of attention heads in the Decoder layers.", + ) + parser.add_argument( + "--num-decoder-layers", + type=int, + default=12, + help="Number of Decoder layers.", + ) + parser.add_argument( + "--scale-factor", + type=float, + default=1.0, + help="Model scale factor which will be assigned different meanings in different models.", + ) + parser.add_argument( + "--norm-first", + type=str2bool, + default=True, + help="Pre or Post Normalization.", + ) + parser.add_argument( + "--add-prenet", + type=str2bool, + default=False, + help="Whether add PreNet after Inputs.", + ) + + # VALL-E & F + parser.add_argument( + "--prefix-mode", + type=int, + default=0, + help="The mode for how to prefix VALL-E NAR Decoder, " + "0: no prefix, 1: 0 to random, 2: random to random, 4: chunk of pre or post utterance.", + ) + parser.add_argument( + "--share-embedding", + type=str2bool, + default=True, + help="Share the parameters of the output projection layer with the parameters of the acoustic embedding.", + ) + parser.add_argument( + "--prepend-bos", + type=str2bool, + default=False, + help="Whether prepend to the acoustic tokens -> AR Decoder inputs.", + ) + parser.add_argument( + "--num-quantizers", + type=int, + default=8, + help="Number of Audio/Semantic quantization layers.", + ) + + # Transformer + parser.add_argument( + "--scaling-xformers", + type=str2bool, + default=False, + help="Apply Reworked Conformer scaling on Transformers.", + ) + +def str2bool(v): + """Used in argparse.ArgumentParser.add_argument to indicate + that a type is a bool type and user can enter + + - yes, true, t, y, 1, to represent True + - no, false, f, n, 0, to represent False + + See https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse # noqa + """ + if isinstance(v, bool): + return v + if v.lower() in ("yes", "true", "t", "y", "1"): + return True + elif v.lower() in ("no", "false", "f", "n", "0"): + return False + else: + raise argparse.ArgumentTypeError("Boolean value expected.") + + + + +def average_checkpoints( + filenames: List[Path], device: torch.device = torch.device("cpu") +) -> dict: + """Average a list of checkpoints. + + Args: + filenames: + Filenames of the checkpoints to be averaged. We assume all + checkpoints are saved by :func:`save_checkpoint`. + device: + Move checkpoints to this device before averaging. + Returns: + Return a dict (i.e., state_dict) which is the average of all + model state dicts contained in the checkpoints. + """ + n = len(filenames) + + avg = torch.load(filenames[0], map_location=device)["model"] + + # Identify shared parameters. Two parameters are said to be shared + # if they have the same data_ptr + uniqued: Dict[int, str] = dict() + + for k, v in avg.items(): + v_data_ptr = v.data_ptr() + if v_data_ptr in uniqued: + continue + uniqued[v_data_ptr] = k + + uniqued_names = list(uniqued.values()) + + for i in range(1, n): + state_dict = torch.load(filenames[i], map_location=device)["model"] + for k in uniqued_names: + avg[k] += state_dict[k] + + for k in uniqued_names: + if avg[k].is_floating_point(): + avg[k] /= n + else: + avg[k] //= n + + return avg + +def calc_lr(step, dim_embed, warmup_steps): + return dim_embed ** (-0.5) * min( + step ** (-0.5), step * warmup_steps ** (-1.5) + ) + +class LRScheduler(object): + """ + Base-class for learning rate schedulers where the learning-rate depends on both the + batch and the epoch. + """ + + def __init__(self, optimizer: Optimizer, verbose: bool = False): + # Attach optimizer + if not isinstance(optimizer, Optimizer): + raise TypeError( + "{} is not an Optimizer".format(type(optimizer).__name__) + ) + self.optimizer = optimizer + self.verbose = verbose + + for group in optimizer.param_groups: + group.setdefault("base_lr", group["lr"]) + + self.base_lrs = [group["base_lr"] for group in optimizer.param_groups] + + self.epoch = 0 + self.batch = 0 + + def state_dict(self): + """Returns the state of the scheduler as a :class:`dict`. + + It contains an entry for every variable in self.__dict__ which + is not the optimizer. + """ + return { + "base_lrs": self.base_lrs, + "epoch": self.epoch, + "batch": self.batch, + } + + def load_state_dict(self, state_dict): + """Loads the schedulers state. + + Args: + state_dict (dict): scheduler state. Should be an object returned + from a call to :meth:`state_dict`. + """ + self.__dict__.update(state_dict) + + def get_last_lr(self) -> List[float]: + """Return last computed learning rate by current scheduler. Will be a list of float.""" + return self._last_lr + + def get_lr(self): + # Compute list of learning rates from self.epoch and self.batch and + # self.base_lrs; this must be overloaded by the user. + # e.g. return [some_formula(self.batch, self.epoch, base_lr) for base_lr in self.base_lrs ] + raise NotImplementedError + + def step_batch(self, batch: Optional[int] = None) -> None: + # Step the batch index, or just set it. If `batch` is specified, it + # must be the batch index from the start of training, i.e. summed over + # all epochs. + # You can call this in any order; if you don't provide 'batch', it should + # of course be called once per batch. + if batch is not None: + self.batch = batch + else: + self.batch = self.batch + 1 + self._set_lrs() + + def step_epoch(self, epoch: Optional[int] = None): + # Step the epoch index, or just set it. If you provide the 'epoch' arg, + # you should call this at the start of the epoch; if you don't provide the 'epoch' + # arg, you should call it at the end of the epoch. + if epoch is not None: + self.epoch = epoch + else: + self.epoch = self.epoch + 1 + self._set_lrs() + + def _set_lrs(self): + values = self.get_lr() + assert len(values) == len(self.optimizer.param_groups) + + for i, data in enumerate(zip(self.optimizer.param_groups, values)): + param_group, lr = data + param_group["lr"] = lr + self.print_lr(self.verbose, i, lr) + self._last_lr = [group["lr"] for group in self.optimizer.param_groups] + + def print_lr(self, is_verbose, group, lr): + """Display the current learning rate.""" + if is_verbose: + logging.info( + f"Epoch={self.epoch}, batch={self.batch}: adjusting learning rate" + f" of group {group} to {lr:.4e}." + ) + +class Eden(LRScheduler): + def __init__( + self, + optimizer: Optimizer, + lr_batches: Union[int, float], + lr_epochs: Union[int, float], + warmup_batches: Union[int, float] = 500.0, + verbose: bool = False, + ): + super(Eden, self).__init__(optimizer, verbose) + self.lr_batches = lr_batches + self.lr_epochs = lr_epochs + self.warmup_batches = warmup_batches + + def get_lr(self): + factor = ( + (self.batch ** 2 + self.lr_batches ** 2) / self.lr_batches ** 2 + ) ** -0.25 * ( + ((self.epoch ** 2 + self.lr_epochs ** 2) / self.lr_epochs ** 2) + ** -0.25 + ) + warmup_factor = ( + 1.0 + if self.batch >= self.warmup_batches + else 0.5 + 0.5 * (self.batch / self.warmup_batches) + ) + + return [x * factor * warmup_factor for x in self.base_lrs] + +class NoamScheduler(torch.optim.lr_scheduler._LRScheduler): + def __init__( + self, + base_lr: float, + optimizer: torch.optim.Optimizer, + dim_embed: int, + warmup_steps: int, + last_epoch: int = -1, + verbose: bool = False, + ) -> None: + + self.dim_embed = dim_embed + self.base_lr = base_lr + self.warmup_steps = warmup_steps + self.num_param_groups = len(optimizer.param_groups) + + super().__init__(optimizer, last_epoch, verbose) + + def get_lr(self) -> float: + lr = self.base_lr * calc_lr( + self._step_count, self.dim_embed, self.warmup_steps + ) + return [lr] * self.num_param_groups + + def set_step(self, step: int): + self._step_count = step + +def get_scheduler(params, optimizer): + if params.scheduler_name.lower() == "eden": + scheduler = Eden(optimizer, 5000, 4, warmup_batches=params.warmup_steps) + elif params.scheduler_name.lower() == "noam": + scheduler = NoamScheduler( + params.base_lr, + optimizer, + params.decoder_dim, + warmup_steps=params.warmup_steps, + ) + # scheduler.set_step(params.start_batch or params.batch_idx_train) + elif params.scheduler_name.lower() == "cosine": + scheduler = torch.optim.lr_scheduler.CosineAnnealingLR( + params.warmup_steps, + optimizer, + eta_min=params.base_lr, + ) + else: + raise NotImplementedError(f"{params.scheduler_name}") + + return scheduler + +def make_pad_mask(lengths: torch.Tensor, max_len: int = 0) -> torch.Tensor: + """ + Args: + lengths: + A 1-D tensor containing sentence lengths. + max_len: + The length of masks. + Returns: + Return a 2-D bool tensor, where masked positions + are filled with `True` and non-masked positions are + filled with `False`. + + >>> lengths = torch.tensor([1, 3, 2, 5]) + >>> make_pad_mask(lengths) + tensor([[False, True, True, True, True], + [False, False, False, True, True], + [False, False, True, True, True], + [False, False, False, False, False]]) + """ + assert lengths.ndim == 1, lengths.ndim + max_len = max(max_len, lengths.max()) + n = lengths.size(0) + seq_range = torch.arange(0, max_len, device=lengths.device) + expaned_lengths = seq_range.unsqueeze(0).expand(n, max_len) + + return expaned_lengths >= lengths.unsqueeze(-1) + +class Eve(Optimizer): + """ + Implements Eve algorithm. This is a modified version of AdamW with a special + way of setting the weight-decay / shrinkage-factor, which is designed to make the + rms of the parameters approach a particular target_rms (default: 0.1). This is + for use with networks with 'scaled' versions of modules (see scaling.py), which + will be close to invariant to the absolute scale on the parameter matrix. + + The original Adam algorithm was proposed in `Adam: A Method for Stochastic Optimization`_. + The AdamW variant was proposed in `Decoupled Weight Decay Regularization`_. + Eve is unpublished so far. + + Arguments: + params (iterable): iterable of parameters to optimize or dicts defining + parameter groups + lr (float, optional): learning rate (default: 1e-3) + betas (Tuple[float, float], optional): coefficients used for computing + running averages of gradient and its square (default: (0.9, 0.999)) + eps (float, optional): term added to the denominator to improve + numerical stability (default: 1e-8) + weight_decay (float, optional): weight decay coefficient (default: 3e-4; + this value means that the weight would decay significantly after + about 3k minibatches. Is not multiplied by learning rate, but + is conditional on RMS-value of parameter being > target_rms. + target_rms (float, optional): target root-mean-square value of + parameters, if they fall below this we will stop applying weight decay. + + + .. _Adam: A Method for Stochastic Optimization: + https://arxiv.org/abs/1412.6980 + .. _Decoupled Weight Decay Regularization: + https://arxiv.org/abs/1711.05101 + .. _On the Convergence of Adam and Beyond: + https://openreview.net/forum?id=ryQu7f-RZ + """ + + def __init__( + self, + params, + lr=1e-3, + betas=(0.9, 0.98), + eps=1e-8, + weight_decay=1e-3, + target_rms=0.1, + ): + if not 0.0 <= lr: + raise ValueError("Invalid learning rate: {}".format(lr)) + if not 0.0 <= eps: + raise ValueError("Invalid epsilon value: {}".format(eps)) + if not 0.0 <= betas[0] < 1.0: + raise ValueError( + "Invalid beta parameter at index 0: {}".format(betas[0]) + ) + if not 0.0 <= betas[1] < 1.0: + raise ValueError( + "Invalid beta parameter at index 1: {}".format(betas[1]) + ) + if not 0 <= weight_decay <= 0.1: + raise ValueError( + "Invalid weight_decay value: {}".format(weight_decay) + ) + if not 0 < target_rms <= 10.0: + raise ValueError("Invalid target_rms value: {}".format(target_rms)) + defaults = dict( + lr=lr, + betas=betas, + eps=eps, + weight_decay=weight_decay, + target_rms=target_rms, + ) + super(Eve, self).__init__(params, defaults) + + def __setstate__(self, state): + super(Eve, self).__setstate__(state) + + @torch.no_grad() + def step(self, closure=None): + """Performs a single optimization step. + + Arguments: + closure (callable, optional): A closure that reevaluates the model + and returns the loss. + """ + loss = None + if closure is not None: + with torch.enable_grad(): + loss = closure() + + for group in self.param_groups: + for p in group["params"]: + if p.grad is None: + continue + + # Perform optimization step + grad = p.grad + if grad.is_sparse: + raise RuntimeError( + "AdamW does not support sparse gradients" + ) + + state = self.state[p] + + # State initialization + if len(state) == 0: + state["step"] = 0 + # Exponential moving average of gradient values + state["exp_avg"] = torch.zeros_like( + p, memory_format=torch.preserve_format + ) + # Exponential moving average of squared gradient values + state["exp_avg_sq"] = torch.zeros_like( + p, memory_format=torch.preserve_format + ) + + exp_avg, exp_avg_sq = state["exp_avg"], state["exp_avg_sq"] + + beta1, beta2 = group["betas"] + + state["step"] += 1 + bias_correction1 = 1 - beta1 ** state["step"] + bias_correction2 = 1 - beta2 ** state["step"] + + # Decay the first and second moment running average coefficient + exp_avg.mul_(beta1).add_(grad, alpha=1 - beta1) + exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1 - beta2) + denom = (exp_avg_sq.sqrt() * (bias_correction2 ** -0.5)).add_( + group["eps"] + ) + + step_size = group["lr"] / bias_correction1 + target_rms = group["target_rms"] + weight_decay = group["weight_decay"] + + if p.numel() > 1: + # avoid applying this weight-decay on "scaling factors" + # (which are scalar). + is_above_target_rms = p.norm() > ( + target_rms * (p.numel() ** 0.5) + ) + p.mul_(1 - (weight_decay * is_above_target_rms)) + + p.addcdiv_(exp_avg, denom, value=-step_size) + + # if random.random() < 0.0005: + # step = (exp_avg / denom) * step_size + # logging.info( + # f"Delta rms = {(step**2).mean().item()}, shape = {step.shape}" + # ) + + return loss + +class BatchedOptimizer(Optimizer): + """ + This class adds to class Optimizer the capability to optimize parameters in batches: + it will stack the parameters and their grads for you so the optimizer can work + on tensors with an extra leading dimension. This is intended for speed with GPUs, + as it reduces the number of kernels launched in the optimizer. + + Args: + params: + """ + + def __init__(self, params, defaults): + super(BatchedOptimizer, self).__init__(params, defaults) + + @contextlib.contextmanager + def batched_params(self, param_group, group_params_names): + """ + This function returns (technically, yields) a list of + of tuples (p, state), where + p is a `fake` parameter that is stacked (over axis 0) from real parameters + that share the same shape, and its gradient is also stacked; + `state` is the state corresponding to this batch of parameters + (it will be physically located in the "state" for one of the real + parameters, the last one that has any particular shape and dtype). + + This function is decorated as a context manager so that it can + write parameters back to their "real" locations. + + The idea is, instead of doing: + + for p in group["params"]: + state = self.state[p] + ... + + you can do: + + with self.batched_params(group["params"]) as batches: + for p, state, p_names in batches: + ... + + + Args: + group: a parameter group, which is a list of parameters; should be + one of self.param_groups. + group_params_names: name for each parameter in group, + which is List[str]. + """ + batches = defaultdict( + list + ) # `batches` maps from tuple (dtype_as_str,*shape) to list of nn.Parameter + batches_names = defaultdict( + list + ) # `batches` maps from tuple (dtype_as_str,*shape) to list of str + + assert len(param_group) == len(group_params_names) + for p, named_p in zip(param_group, group_params_names): + key = (str(p.dtype), *p.shape) + batches[key].append(p) + batches_names[key].append(named_p) + + batches_names_keys = list(batches_names.keys()) + sorted_idx = sorted( + range(len(batches_names)), key=lambda i: batches_names_keys[i] + ) + batches_names = [ + batches_names[batches_names_keys[idx]] for idx in sorted_idx + ] + batches = [batches[batches_names_keys[idx]] for idx in sorted_idx] + + stacked_params_dict = dict() + + # turn batches into a list, in deterministic order. + # tuples will contain tuples of (stacked_param, state, stacked_params_names), + # one for each batch in `batches`. + tuples = [] + + for batch, batch_names in zip(batches, batches_names): + p = batch[0] + # we arbitrarily store the state in the + # state corresponding to the 1st parameter in the + # group. class Optimizer will take care of saving/loading state. + state = self.state[p] + p_stacked = torch.stack(batch) + grad = torch.stack( + [ + torch.zeros_like(p) if p.grad is None else p.grad + for p in batch + ] + ) + p_stacked.grad = grad + stacked_params_dict[key] = p_stacked + tuples.append((p_stacked, state, batch_names)) + + yield tuples # <-- calling code will do the actual optimization here! + + for ((stacked_params, _state, _names), batch) in zip(tuples, batches): + for i, p in enumerate(batch): # batch is list of Parameter + p.copy_(stacked_params[i]) + + +class ScaledAdam(BatchedOptimizer): + """ + Implements 'Scaled Adam', a variant of Adam where we scale each parameter's update + proportional to the norm of that parameter; and also learn the scale of the parameter, + in log space, subject to upper and lower limits (as if we had factored each parameter as + param = underlying_param * log_scale.exp()) + + + Args: + params: The parameters or param_groups to optimize (like other Optimizer subclasses) + lr: The learning rate. We will typically use a learning rate schedule that starts + at 0.03 and decreases over time, i.e. much higher than other common + optimizers. + clipping_scale: (e.g. 2.0) + A scale for gradient-clipping: if specified, the normalized gradients + over the whole model will be clipped to have 2-norm equal to + `clipping_scale` times the median 2-norm over the most recent period + of `clipping_update_period` minibatches. By "normalized gradients", + we mean after multiplying by the rms parameter value for this tensor + [for non-scalars]; this is appropriate because our update is scaled + by this quantity. + betas: beta1,beta2 are momentum constants for regular momentum, and moving sum-sq grad. + Must satisfy 0 < beta <= beta2 < 1. + scalar_lr_scale: A scaling factor on the learning rate, that we use to update the + scale of each parameter tensor and scalar parameters of the mode.. + If each parameter were decomposed + as p * p_scale.exp(), where (p**2).mean().sqrt() == 1.0, scalar_lr_scale + would be a the scaling factor on the learning rate of p_scale. + eps: A general-purpose epsilon to prevent division by zero + param_min_rms: Minimum root-mean-square value of parameter tensor, for purposes of + learning the scale on the parameters (we'll constrain the rms of each non-scalar + parameter tensor to be >= this value) + param_max_rms: Maximum root-mean-square value of parameter tensor, for purposes of + learning the scale on the parameters (we'll constrain the rms of each non-scalar + parameter tensor to be <= this value) + scalar_max: Maximum absolute value for scalar parameters (applicable if your + model has any parameters with numel() == 1). + size_update_period: The periodicity, in steps, with which we update the size (scale) + of the parameter tensor. This is provided to save a little time + in the update. + clipping_update_period: if clipping_scale is specified, this is the period + """ + + def __init__( + self, + params, + lr=3e-02, + clipping_scale=None, + betas=(0.9, 0.98), + scalar_lr_scale=0.1, + eps=1.0e-08, + param_min_rms=1.0e-05, + param_max_rms=3.0, + scalar_max=10.0, + size_update_period=4, + clipping_update_period=100, + parameters_names=None, + show_dominant_parameters=True, + ): + + assert parameters_names is not None, ( + "Please prepare parameters_names," + "which is a List[List[str]]. Each List[str] is for a group" + "and each str is for a parameter" + ) + defaults = dict( + lr=lr, + clipping_scale=clipping_scale, + betas=betas, + scalar_lr_scale=scalar_lr_scale, + eps=eps, + param_min_rms=param_min_rms, + param_max_rms=param_max_rms, + scalar_max=scalar_max, + size_update_period=size_update_period, + clipping_update_period=clipping_update_period, + ) + + super(ScaledAdam, self).__init__(params, defaults) + assert len(self.param_groups) == len(parameters_names) + self.parameters_names = parameters_names + self.show_dominant_parameters = show_dominant_parameters + + def __setstate__(self, state): + super(ScaledAdam, self).__setstate__(state) + + @torch.no_grad() + def step(self, closure=None): + """Performs a single optimization step. + + Arguments: + closure (callable, optional): A closure that reevaluates the model + and returns the loss. + """ + loss = None + if closure is not None: + with torch.enable_grad(): + loss = closure() + + batch = True + + for group, group_params_names in zip( + self.param_groups, self.parameters_names + ): + + with self.batched_params( + group["params"], group_params_names + ) as batches: + + # batches is list of pairs (stacked_param, state). stacked_param is like + # a regular parameter, and will have a .grad, but the 1st dim corresponds to + # a stacking dim, it is not a real dim. + + if ( + len(batches[0][1]) == 0 + ): # if len(first state) == 0: not yet initialized + clipping_scale = 1 + else: + clipping_scale = self._get_clipping_scale(group, batches) + + for p, state, _ in batches: + # Perform optimization step. + # grad is not going to be None, we handled that when creating the batches. + grad = p.grad + if grad.is_sparse: + raise RuntimeError( + "ScaledAdam optimizer does not support sparse gradients" + ) + # State initialization + if len(state) == 0: + self._init_state(group, p, state) + + self._step_one_batch(group, p, state, clipping_scale) + + return loss + + def _init_state(self, group: dict, p: Tensor, state: dict): + """ + Initializes state dict for parameter 'p'. Assumes that dim 0 of tensor p + is actually the batch dimension, corresponding to batched-together + parameters of a given shape. + + + Args: + group: Dict to look up configuration values. + p: The parameter that we are initializing the state for + state: Dict from string to whatever state we are initializing + """ + size_update_period = group["size_update_period"] + + state["step"] = 0 + + kwargs = {"device": p.device, "dtype": p.dtype} + + # 'delta' implements conventional momentum. There are + # several different kinds of update going on, so rather than + # compute "exp_avg" like in Adam, we store and decay a + # parameter-change "delta", which combines all forms of + # update. this is equivalent to how it's done in Adam, + # except for the first few steps. + state["delta"] = torch.zeros_like( + p, memory_format=torch.preserve_format + ) + + batch_size = p.shape[0] + numel = p.numel() // batch_size + numel = p.numel() + + if numel > 1: + # "param_rms" just periodically records the scalar root-mean-square value of + # the parameter tensor. + # it has a shape like (batch_size, 1, 1, 1, 1) + param_rms = ( + (p ** 2).mean(dim=list(range(1, p.ndim)), keepdim=True).sqrt() + ) + state["param_rms"] = param_rms + + state["scale_exp_avg_sq"] = torch.zeros_like(param_rms) + state["scale_grads"] = torch.zeros( + size_update_period, *param_rms.shape, **kwargs + ) + + # exp_avg_sq is the weighted sum of scaled gradients. as in Adam. + state["exp_avg_sq"] = torch.zeros_like( + p, memory_format=torch.preserve_format + ) + + def _get_clipping_scale( + self, group: dict, tuples: List[Tuple[Tensor, dict, List[str]]] + ) -> float: + """ + Returns a scalar factor <= 1.0 that dictates gradient clipping, i.e. we will scale the gradients + by this amount before applying the rest of the update. + + Args: + group: the parameter group, an item in self.param_groups + tuples: a list of tuples of (param, state, param_names) + where param is a batched set of parameters, + with a .grad (1st dim is batch dim) + and state is the state-dict where optimization parameters are kept. + param_names is a List[str] while each str is name for a parameter + in batched set of parameters "param". + """ + assert len(tuples) >= 1 + clipping_scale = group["clipping_scale"] + (first_p, first_state, _) = tuples[0] + step = first_state["step"] + if clipping_scale is None or step == 0: + # no clipping. return early on step == 0 because the other + # parameters' state won't have been initialized yet. + return 1.0 + clipping_update_period = group["clipping_update_period"] + + tot_sumsq = torch.tensor(0.0, device=first_p.device) + for (p, state, param_names) in tuples: + grad = p.grad + if grad.is_sparse: + raise RuntimeError( + "ScaledAdam optimizer does not support sparse gradients" + ) + if p.numel() == p.shape[0]: # a batch of scalars + tot_sumsq += ( + grad ** 2 + ).sum() # sum() to change shape [1] to [] + else: + tot_sumsq += ((grad * state["param_rms"]) ** 2).sum() + + tot_norm = tot_sumsq.sqrt() + if "model_norms" not in first_state: + first_state["model_norms"] = torch.zeros( + clipping_update_period, device=p.device + ) + first_state["model_norms"][step % clipping_update_period] = tot_norm + + if step % clipping_update_period == 0: + # Print some stats. + # We don't reach here if step == 0 because we would have returned + # above. + sorted_norms = first_state["model_norms"].sort()[0].to("cpu") + quartiles = [] + for n in range(0, 5): + index = min( + clipping_update_period - 1, + (clipping_update_period // 4) * n, + ) + quartiles.append(sorted_norms[index].item()) + + median = quartiles[2] + threshold = clipping_scale * median + first_state["model_norm_threshold"] = threshold + percent_clipped = ( + first_state["num_clipped"] * 100.0 / clipping_update_period + if "num_clipped" in first_state + else 0.0 + ) + first_state["num_clipped"] = 0 + quartiles = " ".join(["%.3e" % x for x in quartiles]) + logging.info( + f"Clipping_scale={clipping_scale}, grad-norm quartiles {quartiles}, " + f"threshold={threshold:.3e}, percent-clipped={percent_clipped:.1f}" + ) + + if step < clipping_update_period: + return 1.0 # We have not yet estimated a norm to clip to. + else: + try: + model_norm_threshold = first_state["model_norm_threshold"] + except KeyError: + logging.info( + "Warning: model_norm_threshold not in state: possibly " + "you changed config when restarting, adding clipping_scale option?" + ) + return 1.0 + ans = min(1.0, (model_norm_threshold / (tot_norm + 1.0e-20)).item()) + if ans < 1.0: + first_state["num_clipped"] += 1 + if ans < 0.1: + logging.warn( + f"Scaling gradients by {ans}, model_norm_threshold={model_norm_threshold}" + ) + if self.show_dominant_parameters: + assert p.shape[0] == len(param_names) + self._show_gradient_dominating_parameter(tuples, tot_sumsq) + return ans + + def _show_gradient_dominating_parameter( + self, tuples: List[Tuple[Tensor, dict, List[str]]], tot_sumsq: Tensor + ): + """ + Show information of parameter wihch dominanting tot_sumsq. + + Args: + tuples: a list of tuples of (param, state, param_names) + where param is a batched set of parameters, + with a .grad (1st dim is batch dim) + and state is the state-dict where optimization parameters are kept. + param_names is a List[str] while each str is name for a parameter + in batched set of parameters "param". + tot_sumsq: sumsq of all parameters. Though it's could be calculated + from tuples, we still pass it to save some time. + """ + all_sumsq_orig = {} + for (p, state, batch_param_names) in tuples: + # p is a stacked batch parameters. + batch_grad = p.grad + if p.numel() == p.shape[0]: # a batch of scalars + batch_sumsq_orig = batch_grad ** 2 + # Dummpy values used by following `zip` statement. + batch_rms_orig = torch.ones(p.shape[0]) + else: + batch_rms_orig = state["param_rms"] + batch_sumsq_orig = ((batch_grad * batch_rms_orig) ** 2).sum( + dim=list(range(1, batch_grad.ndim)) + ) + + for name, sumsq_orig, rms, grad in zip( + batch_param_names, batch_sumsq_orig, batch_rms_orig, batch_grad + ): + + proportion_orig = sumsq_orig / tot_sumsq + all_sumsq_orig[name] = (proportion_orig, sumsq_orig, rms, grad) + + assert torch.isclose( + sum([value[0] for value in all_sumsq_orig.values()]).cpu(), + torch.tensor(1.0), + ) + sorted_by_proportion = { + k: v + for k, v in sorted( + all_sumsq_orig.items(), + key=lambda item: item[1][0], + reverse=True, + ) + } + dominant_param_name = next(iter(sorted_by_proportion)) + ( + dominant_proportion, + dominant_sumsq, + dominant_rms, + dominant_grad, + ) = sorted_by_proportion[dominant_param_name] + logging.info( + f"Parameter Dominanting tot_sumsq {dominant_param_name}" + f" with proportion {dominant_proportion:.2f}," + f" where dominant_sumsq=(grad_sumsq*orig_rms_sq)" + f"={dominant_sumsq:.3e}," + f" grad_sumsq = {(dominant_grad**2).sum():.3e}," + f" orig_rms_sq={(dominant_rms**2).item():.3e}" + ) + + def _step_one_batch( + self, group: dict, p: Tensor, state: dict, clipping_scale: float + ): + """ + Do the step for one parameter, which is actually going to be a batch of + `real` parameters, with dim 0 as the batch dim. + Args: + group: dict to look up configuration values + p: parameter to update (actually multiple parameters stacked together + as a batch) + state: state-dict for p, to look up the optimizer state + """ + lr = group["lr"] + size_update_period = group["size_update_period"] + beta1 = group["betas"][0] + + grad = p.grad + if clipping_scale != 1.0: + grad = grad * clipping_scale + step = state["step"] + delta = state["delta"] + + delta.mul_(beta1) + batch_size = p.shape[0] + numel = p.numel() // batch_size + if numel > 1: + # Update the size/scale of p, and set param_rms + scale_grads = state["scale_grads"] + scale_grads[step % size_update_period] = (p * grad).sum( + dim=list(range(1, p.ndim)), keepdim=True + ) + if step % size_update_period == size_update_period - 1: + param_rms = state["param_rms"] # shape: (batch_size, 1, 1, ..) + param_rms.copy_( + (p ** 2) + .mean(dim=list(range(1, p.ndim)), keepdim=True) + .sqrt() + ) + if step > 0: + # self._size_update() learns the overall scale on the + # parameter, by shrinking or expanding it. + self._size_update(group, scale_grads, p, state) + + if numel == 1: + # For parameters with 1 element we just use regular Adam. + # Updates delta. + self._step_scalar(group, p, state) + else: + self._step(group, p, state) + + state["step"] = step + 1 + + def _size_update( + self, group: dict, scale_grads: Tensor, p: Tensor, state: dict + ) -> None: + """ + Called only where p.numel() > 1, this updates the scale of the parameter. + If we imagine: p = underlying_param * scale.exp(), and we are doing + gradient descent on underlying param and on scale, this function does the update + on `scale`. + + Args: + group: dict to look up configuration values + scale_grads: a tensor of shape (size_update_period, batch_size, 1, 1,...) containing + grads w.r.t. the scales. + p: The parameter to update + state: The state-dict of p + """ + + param_rms = state["param_rms"] + beta1, beta2 = group["betas"] + size_lr = group["lr"] * group["scalar_lr_scale"] + param_min_rms = group["param_min_rms"] + param_max_rms = group["param_max_rms"] + eps = group["eps"] + step = state["step"] + batch_size = p.shape[0] + + size_update_period = scale_grads.shape[0] + # correct beta2 for the size update period: we will have + # faster decay at this level. + beta2_corr = beta2 ** size_update_period + + scale_exp_avg_sq = state[ + "scale_exp_avg_sq" + ] # shape: (batch_size, 1, 1, ..) + scale_exp_avg_sq.mul_(beta2_corr).add_( + (scale_grads ** 2).mean( + dim=0 + ), # mean over dim `size_update_period` + alpha=1 - beta2_corr, + ) # shape is (batch_size, 1, 1, ...) + + # The 1st time we reach here is when size_step == 1. + size_step = (step + 1) // size_update_period + bias_correction2 = 1 - beta2_corr ** size_step + # we don't bother with bias_correction1; this will help prevent divergence + # at the start of training. + + denom = scale_exp_avg_sq.sqrt() + eps + + scale_step = ( + -size_lr + * (bias_correction2 ** 0.5) + * scale_grads.sum(dim=0) + / denom + ) + + is_too_small = param_rms < param_min_rms + is_too_large = param_rms > param_max_rms + + # when the param gets too small, just don't shrink it any further. + scale_step.masked_fill_(is_too_small, 0.0) + # when it gets too large, stop it from getting any larger. + scale_step.masked_fill_(is_too_large, -size_lr * size_update_period) + delta = state["delta"] + # the factor of (1-beta1) relates to momentum. + delta.add_(p * scale_step, alpha=(1 - beta1)) + + def _step(self, group: dict, p: Tensor, state: dict): + """ + This function does the core update of self.step(), in the case where the members of + the batch have more than 1 element. + + Args: + group: A dict which will be used to look up configuration values + p: The parameter to be updated + grad: The grad of p + state: The state-dict corresponding to parameter p + + This function modifies p. + """ + grad = p.grad + lr = group["lr"] + beta1, beta2 = group["betas"] + eps = group["eps"] + param_min_rms = group["param_min_rms"] + step = state["step"] + + exp_avg_sq = state["exp_avg_sq"] + exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=(1 - beta2)) + + this_step = state["step"] - ( + state["zero_step"] if "zero_step" in state else 0 + ) + bias_correction2 = 1 - beta2 ** (this_step + 1) + if bias_correction2 < 0.99: + # note: not in-place. + exp_avg_sq = exp_avg_sq * (1.0 / bias_correction2) + + denom = exp_avg_sq.sqrt() + denom += eps + grad = grad / denom + + alpha = -lr * (1 - beta1) * state["param_rms"].clamp(min=param_min_rms) + + delta = state["delta"] + delta.add_(grad * alpha) + p.add_(delta) + + def _step_scalar(self, group: dict, p: Tensor, state: dict): + """ + A simplified form of the core update for scalar tensors, where we cannot get a good + estimate of the parameter rms. + """ + beta1, beta2 = group["betas"] + scalar_max = group["scalar_max"] + eps = group["eps"] + lr = group["lr"] * group["scalar_lr_scale"] + grad = p.grad + + exp_avg_sq = state["exp_avg_sq"] # shape: (batch_size,) + exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1 - beta2) + + # bias_correction2 is like in Adam. Don't bother with bias_correction1; + # slower update at the start will help stability anyway. + bias_correction2 = 1 - beta2 ** (state["step"] + 1) + denom = (exp_avg_sq / bias_correction2).sqrt() + eps + + delta = state["delta"] + delta.add_(grad / denom, alpha=-lr * (1 - beta1)) + p.clamp_(min=-scalar_max, max=scalar_max) + p.add_(delta) + +def uuid4(): + """ + Generates uuid4's exactly like Python's uuid.uuid4() function. + When ``fix_random_seed()`` is called, it will instead generate deterministic IDs. + """ + if _lhotse_uuid is not None: + return _lhotse_uuid() + return uuid.uuid4() + +def find_pessimistic_batches( + sampler ,batch_tuple_index: int = 0): + """ + Function for finding 'pessimistic' batches, i.e. batches that have the highest potential + to blow up the GPU memory during training. We will fully iterate the sampler and record + the most risky batches under several criteria: + - single longest cut + - single longest supervision + - largest batch cuts duration + - largest batch supervisions duration + - max num cuts + - max num supervisions + + .. note: It is up to the users to convert the sampled CutSets into actual batches and test them + by running forward and backward passes with their model. + + Example of how this function can be used with a PyTorch model + and a :class:`~lhotse.dataset.K2SpeechRecognitionDataset`:: + + sampler = SimpleCutSampler(cuts, max_duration=300) + dataset = K2SpeechRecognitionDataset() + batches, scores = find_pessimistic_batches(sampler) + for reason, cuts in batches.items(): + try: + batch = dset[cuts] + outputs = model(batch) + loss = loss_fn(outputs) + loss.backward() + except: + print(f"Exception caught when evaluating pessimistic batch for: {reason}={scores[reason]}") + raise + + + :param sampler: An instance of a Lhotse :class:`.CutSampler`. + :param batch_tuple_index: Applicable to samplers that return tuples of :class:`~lhotse.cut.CutSet`. + Indicates which position in the tuple we should look up for the CutSet. + :return: A tuple of dicts: the first with batches (as CutSets) and the other with criteria values, i.e.: + ``({"": , ...}, {"": , ...})`` + """ + criteria = { + "single_longest_cut": lambda cuts: max(c.duration for c in cuts), + "single_longest_supervision": lambda cuts: max( + sum(s.duration for s in c.supervisions) for c in cuts + ), + "largest_batch_cuts_duration": lambda cuts: sum(c.duration for c in cuts), + "largest_batch_supervisions_duration": lambda cuts: sum( + s.duration for c in cuts for s in c.supervisions + ), + "max_num_cuts": len, + "max_num_supervisions": lambda cuts: sum( + 1 for c in cuts for _ in c.supervisions + ), + } + try: + sampler = iter(sampler) + first_batch = next(sampler) + if isinstance(first_batch, tuple): + first_batch = first_batch[batch_tuple_index] + except StopIteration: + warnings.warn("Empty sampler encountered in find_pessimistic_batches()") + return {}, {} + + top_batches = {k: first_batch for k in criteria} + top_values = {k: fn(first_batch) for k, fn in criteria.items()} + + for batch in sampler: + if isinstance(batch, tuple): + batch = batch[batch_tuple_index] + for crit, fn in criteria.items(): + val = fn(batch) + if val > top_values[crit]: + top_values[crit] = val + top_batches[crit] = batch + + return top_batches, top_values \ No newline at end of file diff --git a/utils/__init__.py b/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f679b50adebcabe109af22d6f4596634b8da8fc1 --- /dev/null +++ b/utils/__init__.py @@ -0,0 +1,15 @@ +import torch +import torch.nn as nn +# from icefall.utils import make_pad_mask + +from .symbol_table import SymbolTable + +# make_pad_mask = make_pad_mask +SymbolTable = SymbolTable + + +class Transpose(nn.Identity): + """(N, T, D) -> (N, D, T)""" + + def forward(self, input: torch.Tensor) -> torch.Tensor: + return input.transpose(1, 2) diff --git a/utils/download.py b/utils/download.py new file mode 100644 index 0000000000000000000000000000000000000000..4e24bf279aed784cfe78083f8f2b8efa2d892faf --- /dev/null +++ b/utils/download.py @@ -0,0 +1,49 @@ +import sys +import requests + + +def download_file_from_google_drive(id, destination): + URL = "https://docs.google.com/uc?export=download&confirm=1" + + session = requests.Session() + + response = session.get(URL, params={"id": id}, stream=True) + token = get_confirm_token(response) + + if token: + params = {"id": id, "confirm": token} + response = session.get(URL, params=params, stream=True) + + save_response_content(response, destination) + + +def get_confirm_token(response): + for key, value in response.cookies.items(): + if key.startswith("download_warning"): + return value + + return None + + +def save_response_content(response, destination): + CHUNK_SIZE = 32768 + + with open(destination, "wb", encoding='utf-8') as f: + for chunk in response.iter_content(CHUNK_SIZE): + if chunk: # filter out keep-alive new chunks + f.write(chunk) + + +def main(): + if len(sys.argv) >= 3: + file_id = sys.argv[1] + destination = sys.argv[2] + else: + file_id = "TAKE_ID_FROM_SHAREABLE_LINK" + destination = "DESTINATION_FILE_ON_YOUR_DISK" + print(f"dowload {file_id} to {destination}") + download_file_from_google_drive(file_id, destination) + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/utils/g2p/.ipynb_checkpoints/__init__-checkpoint.py b/utils/g2p/.ipynb_checkpoints/__init__-checkpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..417a38721b321456a62ae89d8f0eb3cca6f26b85 --- /dev/null +++ b/utils/g2p/.ipynb_checkpoints/__init__-checkpoint.py @@ -0,0 +1,72 @@ +""" from https://github.com/keithito/tacotron """ +import utils.g2p.cleaners +from utils.g2p.symbols import symbols +from tokenizers import Tokenizer + +# Mappings from symbol to numeric ID and vice versa: +_symbol_to_id = {s: i for i, s in enumerate(symbols)} +_id_to_symbol = {i: s for i, s in enumerate(symbols)} + + +class PhonemeBpeTokenizer: + def __init__(self, tokenizer_path = None): + self.tokenizer = Tokenizer.from_file("utils/g2p/bpe_175.json") + + def tokenize(self, text): + # 1. convert text to phoneme + phonemes, langs = _clean_text(text, ['cje_cleaners']) + # 2. replace blank space " " with "_" + phonemes = phonemes.replace(" ", "_") + # 3. tokenize phonemes + phoneme_tokens = self.tokenizer.encode(phonemes).ids + assert(len(phoneme_tokens) == len(langs)) + if not len(phoneme_tokens): + raise ValueError("Empty text is given") + return phoneme_tokens, langs + +def text_to_sequence(text, cleaner_names): + '''Converts a string of text to a sequence of IDs corresponding to the symbols in the text. + Args: + text: string to convert to a sequence + cleaner_names: names of the cleaner functions to run the text through + Returns: + List of integers corresponding to the symbols in the text + ''' + sequence = [] + symbol_to_id = {s: i for i, s in enumerate(symbols)} + clean_text = _clean_text(text, cleaner_names) + for symbol in clean_text: + if symbol not in symbol_to_id.keys(): + continue + symbol_id = symbol_to_id[symbol] + sequence += [symbol_id] + return sequence + + +def cleaned_text_to_sequence(cleaned_text): + '''Converts a string of text to a sequence of IDs corresponding to the symbols in the text. + Args: + text: string to convert to a sequence + Returns: + List of integers corresponding to the symbols in the text + ''' + sequence = [_symbol_to_id[symbol] for symbol in cleaned_text if symbol in _symbol_to_id.keys()] + return sequence + + +def sequence_to_text(sequence): + '''Converts a sequence of IDs back to a string''' + result = '' + for symbol_id in sequence: + s = _id_to_symbol[symbol_id] + result += s + return result + + +def _clean_text(text, cleaner_names): + for name in cleaner_names: + cleaner = getattr(utils.g2p.cleaners, name) + if not cleaner: + raise Exception('Unknown cleaner: %s' % name) + text, langs = cleaner(text) + return text, langs diff --git a/utils/g2p/__init__.py b/utils/g2p/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..417a38721b321456a62ae89d8f0eb3cca6f26b85 --- /dev/null +++ b/utils/g2p/__init__.py @@ -0,0 +1,72 @@ +""" from https://github.com/keithito/tacotron """ +import utils.g2p.cleaners +from utils.g2p.symbols import symbols +from tokenizers import Tokenizer + +# Mappings from symbol to numeric ID and vice versa: +_symbol_to_id = {s: i for i, s in enumerate(symbols)} +_id_to_symbol = {i: s for i, s in enumerate(symbols)} + + +class PhonemeBpeTokenizer: + def __init__(self, tokenizer_path = None): + self.tokenizer = Tokenizer.from_file("utils/g2p/bpe_175.json") + + def tokenize(self, text): + # 1. convert text to phoneme + phonemes, langs = _clean_text(text, ['cje_cleaners']) + # 2. replace blank space " " with "_" + phonemes = phonemes.replace(" ", "_") + # 3. tokenize phonemes + phoneme_tokens = self.tokenizer.encode(phonemes).ids + assert(len(phoneme_tokens) == len(langs)) + if not len(phoneme_tokens): + raise ValueError("Empty text is given") + return phoneme_tokens, langs + +def text_to_sequence(text, cleaner_names): + '''Converts a string of text to a sequence of IDs corresponding to the symbols in the text. + Args: + text: string to convert to a sequence + cleaner_names: names of the cleaner functions to run the text through + Returns: + List of integers corresponding to the symbols in the text + ''' + sequence = [] + symbol_to_id = {s: i for i, s in enumerate(symbols)} + clean_text = _clean_text(text, cleaner_names) + for symbol in clean_text: + if symbol not in symbol_to_id.keys(): + continue + symbol_id = symbol_to_id[symbol] + sequence += [symbol_id] + return sequence + + +def cleaned_text_to_sequence(cleaned_text): + '''Converts a string of text to a sequence of IDs corresponding to the symbols in the text. + Args: + text: string to convert to a sequence + Returns: + List of integers corresponding to the symbols in the text + ''' + sequence = [_symbol_to_id[symbol] for symbol in cleaned_text if symbol in _symbol_to_id.keys()] + return sequence + + +def sequence_to_text(sequence): + '''Converts a sequence of IDs back to a string''' + result = '' + for symbol_id in sequence: + s = _id_to_symbol[symbol_id] + result += s + return result + + +def _clean_text(text, cleaner_names): + for name in cleaner_names: + cleaner = getattr(utils.g2p.cleaners, name) + if not cleaner: + raise Exception('Unknown cleaner: %s' % name) + text, langs = cleaner(text) + return text, langs diff --git a/utils/g2p/bpe_1024.json b/utils/g2p/bpe_1024.json new file mode 100644 index 0000000000000000000000000000000000000000..19331439acfb9d16944399e986b0aee38c95758c --- /dev/null +++ b/utils/g2p/bpe_1024.json @@ -0,0 +1,2049 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "[UNK]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "[CLS]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "[SEP]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "[PAD]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 4, + "content": "[MASK]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "Whitespace" + }, + "post_processor": null, + "decoder": null, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "[UNK]", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "vocab": { + "[UNK]": 0, + "[CLS]": 1, + "[SEP]": 2, + "[PAD]": 3, + "[MASK]": 4, + "!": 5, + "#": 6, + "*": 7, + ",": 8, + "-": 9, + ".": 10, + "=": 11, + "?": 12, + "N": 13, + "Q": 14, + "^": 15, + "_": 16, + "`": 17, + "a": 18, + "b": 19, + "d": 20, + "e": 21, + "f": 22, + "g": 23, + "h": 24, + "i": 25, + "j": 26, + "k": 27, + "l": 28, + "m": 29, + "n": 30, + "o": 31, + "p": 32, + "s": 33, + "t": 34, + "u": 35, + "v": 36, + "w": 37, + "x": 38, + "y": 39, + "z": 40, + "~": 41, + "æ": 42, + "ç": 43, + "ð": 44, + "ŋ": 45, + "ɑ": 46, + "ɔ": 47, + "ə": 48, + "ɛ": 49, + "ɥ": 50, + "ɪ": 51, + "ɫ": 52, + "ɯ": 53, + "ɸ": 54, + "ɹ": 55, + "ɾ": 56, + "ʃ": 57, + "ʊ": 58, + "ʑ": 59, + "ʒ": 60, + "ʰ": 61, + "ˈ": 62, + "ˌ": 63, + "θ": 64, + "…": 65, + "⁼": 66, + "↑": 67, + "→": 68, + "↓": 69, + "_t": 70, + "↓↑": 71, + "_ˈ": 72, + "ən": 73, + "_s": 74, + "aɪ": 75, + "əɹ": 76, + "eɪ": 77, + "oʊ": 78, + "_k": 79, + "ʃi": 80, + "_w": 81, + "_ð": 82, + "ts": 83, + "tʃ": 84, + "_ts": 85, + "_h": 86, + "_ə": 87, + "_m": 88, + "an": 89, + "_n": 90, + "_ðə": 91, + "ɛn": 92, + "ɑʊ": 93, + "ɑŋ": 94, + "`⁼": 95, + "_p": 96, + "_i": 97, + "_ɪ": 98, + "_tʃ": 99, + "_l": 100, + "jɛn": 101, + "_d": 102, + "_f": 103, + "_j": 104, + "wo": 105, + "_b": 106, + "ta": 107, + "`↓": 108, + "te": 109, + "ənd": 110, + "_ʃi": 111, + "wa": 112, + "ka": 113, + "ɪŋ": 114, + "in": 115, + "st": 116, + "li": 117, + "ʊŋ": 118, + "_tɪ": 119, + "to": 120, + "weɪ": 121, + "_ənd": 122, + "ʰi": 123, + "_əv": 124, + "əŋ": 125, + "no": 126, + "_x": 127, + "ɾɯ": 128, + "na": 129, + "_a": 130, + "_ɹ": 131, + "ɪn": 132, + "ga": 133, + "de": 134, + "joʊ": 135, + "æn": 136, + "kɯ": 137, + "ɾe": 138, + "ma": 139, + "_ðə_ˈ": 140, + "ɾa": 141, + "ɛɹ": 142, + "mo": 143, + "ɔɹ": 144, + "əɫ": 145, + "_g": 146, + "da": 147, + "*↑": 148, + "ɪˈ": 149, + "_o": 150, + "_ʃ": 151, + "iŋ": 152, + "ja": 153, + "əm": 154, + "_ˌ": 155, + "aʊ": 156, + "_əˈ": 157, + "`↑": 158, + "ət": 159, + "_aɪ": 160, + "oo": 161, + "sɯ": 162, + "↓.": 163, + "_ɪn": 164, + "_hi": 165, + "_wɪ": 166, + "ɪz": 167, + "_na": 168, + "wan": 169, + "_ko": 170, + "_wo": 171, + "ɪd": 172, + "ɾi": 173, + "_ju": 174, + "mə": 175, + "_lə": 176, + "_hæ": 177, + "_ðət": 178, + "ɑɹ": 179, + "tʰ": 180, + "ki": 181, + "……": 182, + "ɑz": 183, + "_ɔ": 184, + "_mi": 185, + "_wɑz": 186, + "_ˈs": 187, + "↓,": 188, + "_tʰ": 189, + "əˈ": 190, + "dʑ": 191, + "ɪt": 192, + "_kʰ": 193, + "iɛ": 194, + "_ma": 195, + "ɪs": 196, + "tsɯ": 197, + "_ni": 198, + "_ɪt": 199, + "ke": 200, + "iɑʊ": 201, + "_ka": 202, + "_əɹ": 203, + "nd": 204, + "_ˈp": 205, + "ko": 206, + "jo": 207, + "ɹi": 208, + "mən": 209, + "ʊd": 210, + "_ˈm": 211, + "_fəɹ": 212, + "tʃʰi": 213, + "sa": 214, + "ʰɥ": 215, + "kʰ": 216, + "ˈs": 217, + "ɑt": 218, + "ɛd": 219, + "se": 220, + "tʃi": 221, + "ɛɫ": 222, + "_ˈk": 223, + "_joʊ": 224, + "təɹ": 225, + "ɛz": 226, + "--": 227, + "vəɹ": 228, + "`→": 229, + "ʃən": 230, + "_ɪz": 231, + "_meɪ": 232, + "_æ": 233, + "dʒ": 234, + "_ki": 235, + "_hɪz": 236, + "_bi": 237, + "uɑŋ": 238, + "_ˈf": 239, + "↓↑.": 240, + "_wɪθ": 241, + "ju": 242, + "iɑŋ": 243, + "→.": 244, + "_so": 245, + "_həɹ": 246, + "↑.": 247, + "ni": 248, + "_mo": 249, + "_maɪ": 250, + "laɪ": 251, + "ɥɛ": 252, + "_ta": 253, + "ənt": 254, + "_tʃʰi": 255, + "_sɯ": 256, + "_θ": 257, + "_ɛz": 258, + "wən": 259, + "me": 260, + "mi": 261, + "_hæd": 262, + "_ha": 263, + "əs": 264, + "_ˈl": 265, + "_st": 266, + "ðəɹ": 267, + "oʊn": 268, + "_wa": 269, + "ʰəŋ": 270, + "_nɑt": 271, + "*.": 272, + "kt": 273, + "_ˈh": 274, + "do": 275, + "ɥæn": 276, + "ne": 277, + "_to": 278, + "_wən": 279, + "_no": 280, + "_laɪ": 281, + "_wəɹ": 282, + "↑,": 283, + "→,": 284, + "ɛs": 285, + "↓↑,": 286, + "_ɔn": 287, + "ʰu": 288, + "so": 289, + "_ˈb": 290, + "ɫd": 291, + "ɪk": 292, + "ɪst": 293, + "_fɹ": 294, + "_ðɛɹ": 295, + "_weɪ": 296, + "kaɾa": 297, + "_ˈd": 298, + "_hæv": 299, + "tsʰ": 300, + "waɪ": 301, + "ɾo": 302, + "ɛm": 303, + "_æt": 304, + "ʊɹ": 305, + "_ˈw": 306, + "ba": 307, + "_noʊ": 308, + "ʰjɛn": 309, + "ɹeɪ": 310, + "_jo": 311, + "ɸɯ": 312, + "_sa": 313, + "_ɹɪˈ": 314, + "_ˈn": 315, + "ai": 316, + "_bət": 317, + "ɪɹ": 318, + "tʃʰɥ": 319, + "_dʑ": 320, + "əˌ": 321, + "_ðɪs": 322, + "..": 323, + "xwa": 324, + "_ɪm": 325, + "_dɪˈ": 326, + "_kən": 327, + "dʑi": 328, + "*,": 329, + "ɑn": 330, + "_ʃiɑŋ": 331, + "_kɯ": 332, + "ʃin": 333, + "_soʊ": 334, + "bi": 335, + "tʰjɛn": 336, + "te_i": 337, + "_tsʰ": 338, + "_ɯ": 339, + "aɪt": 340, + "ʰiŋ": 341, + "ðə": 342, + "_ɔɫ": 343, + "_ˈɹ": 344, + "nai": 345, + "əɹd": 346, + "_ˈt": 347, + "_ən": 348, + "_tʃʰɥ": 349, + "_iɛ": 350, + "leɪ": 351, + "ɛɹi": 352, + "ˈt": 353, + "ha": 354, + "ʃiŋ": 355, + "ɛvəɹ": 356, + "zɯ": 357, + "_wi": 358, + "_ja": 359, + "ɛk": 360, + "ʰɑŋ": 361, + "_tsɯ": 362, + "_əv_ðə": 363, + "taʃi": 364, + "_sɛd": 365, + "_xə": 366, + "_li": 367, + "_si": 368, + "desɯ": 369, + "_ˌɪn": 370, + "ʃjɛn": 371, + "_baɪ": 372, + "on": 373, + "_xɑʊ": 374, + "_ðeɪ": 375, + "_xaɪ": 376, + "`↓↑": 377, + "xweɪ": 378, + "hi": 379, + "_se": 380, + "ə_s": 381, + "_fɹəm": 382, + "ʊt": 383, + "di": 384, + "aʊt": 385, + "əb": 386, + "sɹ": 387, + "əz": 388, + "_xweɪ": 389, + "_kʰə": 390, + "ɹu": 391, + "_u": 392, + "_de": 393, + "aɪd": 394, + "ɪv": 395, + "bɯ": 396, + "_ho": 397, + "əɹz": 398, + "joo": 399, + "_bɪˈ": 400, + "_tʰa": 401, + "ɛt": 402, + "en": 403, + "ɛni": 404, + "əst": 405, + "æk": 406, + "ə_ts": 407, + "_ˈɪn": 408, + "ti": 409, + "ɥn": 410, + "_dʒ": 411, + "xɑʊ": 412, + "_ˈv": 413, + "ʃiɑŋ": 414, + "pʰ": 415, + "_wɪtʃ": 416, + "eɪm": 417, + "oʊz": 418, + "əðəɹ": 419, + "fɑŋ": 420, + "_ˈg": 421, + "_do": 422, + "_ʃiɑʊ": 423, + "_ˈæ": 424, + "_jʊɹ": 425, + "_ðɛm": 426, + "ɪm": 427, + "ɛst": 428, + "ænd": 429, + "_du": 430, + "ɯɯ": 431, + "kan": 432, + "_da": 433, + "ino": 434, + "_e": 435, + "_wʊd": 436, + "ɛnd": 437, + "meɪ": 438, + "θɪŋ": 439, + "_ʃjɛn": 440, + "iz": 441, + "aɪm": 442, + "_hu": 443, + "_əˈb": 444, + "əns": 445, + "_wɪɫ": 446, + "tʰi": 447, + "go": 448, + "ɛnt": 449, + "fu": 450, + "æp": 451, + "xoʊ": 452, + "eɪk": 453, + "ʊk": 454, + "əɹˈ": 455, + "_θɪŋ": 456, + "əl": 457, + "pɹ": 458, + "ətʃ": 459, + "nt": 460, + "_ɸɯ": 461, + "lu": 462, + "_ˈɔ": 463, + "_iɑʊ": 464, + "lə": 465, + "tu": 466, + "_dʑi": 467, + "eɪt": 468, + "_ʃin": 469, + "nna": 470, + "_ˈpɹ": 471, + "fən": 472, + "_əp": 473, + "njɛn": 474, + "_aʊt": 475, + "fɔɹ": 476, + "_tu": 477, + "eɪʃən": 478, + "ɪɫ": 479, + "_wət": 480, + "_ɪf": 481, + "_ɥ": 482, + "_fa": 483, + "ˈw": 484, + "tʃʰjɛn": 485, + "_wɪn": 486, + "oʊɫd": 487, + "_əˈp": 488, + "aʊnd": 489, + "san": 490, + "he": 491, + "_bɪn": 492, + "fa": 493, + "ɪf": 494, + "ɔŋ": 495, + "ge": 496, + "_ɪn_ðə": 497, + "miŋ": 498, + "_pɹ": 499, + "ina": 500, + "ano": 501, + "əbəɫ": 502, + "kˈs": 503, + "_ˈɛni": 504, + "nəŋ": 505, + "əd": 506, + "_əv_ðə_ˈ": 507, + "_waɪ": 508, + "_taɪm": 509, + "ˈsɛɫ": 510, + "ʃiɛ": 511, + "_kəm": 512, + "æst": 513, + "_goʊ": 514, + "mɯ": 515, + "ˈp": 516, + "_ˈst": 517, + "ə_t": 518, + "pt": 519, + "_pʰ": 520, + "ʰɹ": 521, + "ʃja": 522, + "iwa": 523, + "ɪl": 524, + "bət": 525, + "_fɑŋ": 526, + "ho": 527, + "iv": 528, + "loʊ": 529, + "be": 530, + "_laɪk": 531, + "ɪʃ": 532, + "_fu": 533, + "ze": 534, + "ə_tʃ": 535, + "ɑɹt": 536, + "ɔɹd": 537, + "tʃʰiŋ": 538, + "mp": 539, + "_ðə_s": 540, + "_əˈbaʊt": 541, + "_ˈoʊ": 542, + "kʰə": 543, + "d_tɪ": 544, + "ŋga": 545, + "əli": 546, + "_kʰan": 547, + "çi": 548, + "_ˈju": 549, + "_kʊd": 550, + "ɔɫ": 551, + "ɔt": 552, + "_ɪts": 553, + "_san": 554, + "tʃa": 555, + "i_na": 556, + "xə": 557, + "ɛkt": 558, + "_mɔɹ": 559, + "te_kɯ": 560, + "ɪdʒ": 561, + "jʊŋ": 562, + "_wan": 563, + "æt": 564, + "kat": 565, + "ˈsɛɫf": 566, + "_ke": 567, + "aɪnd": 568, + "it": 569, + "_ɑɹ": 570, + "sp": 571, + "oʊnt": 572, + "_tʃi": 573, + "tsʰɹ": 574, + "_xən": 575, + "_əˈg": 576, + "ə_k": 577, + "to_i": 578, + "_tʰi": 579, + "_iŋ": 580, + "aʊn": 581, + "gɯ": 582, + "_ɪkˈs": 583, + "ɛv": 584, + "gi": 585, + "ks": 586, + "_səm": 587, + "ana": 588, + "ɪtəɫ": 589, + "nan": 590, + "_ˈɪntu": 591, + "_hiɹ": 592, + "_te": 593, + "_naʊ": 594, + "ʃiɑʊ": 595, + "ʃo": 596, + "ɹe": 597, + "xaɪ": 598, + "_tʃʰiŋ": 599, + "_sɹ": 600, + "_haʊ": 601, + "?.": 602, + "_feɪ": 603, + "liŋ": 604, + "_ʃja": 605, + "_ˈdʒ": 606, + "_seɪ": 607, + "ˈn": 608, + "soʊ": 609, + "tʰʊŋ": 610, + "_ljoʊ": 611, + "maɪ": 612, + "_bɹ": 613, + "ɹeɪt": 614, + "_nəŋ": 615, + "ʰə": 616, + "æns": 617, + "_ˈɔl": 618, + "tatʃi": 619, + "nto": 620, + "_ˌɪnˈ": 621, + "le": 622, + "nde": 623, + "_ˈvɛɹi": 624, + "mənt": 625, + "ɾima": 626, + "_ðɛn": 627, + "_həz": 628, + "_ɹi": 629, + "ftəɹ": 630, + "_sp": 631, + "ɾewa": 632, + "ga_a": 633, + "z_əv": 634, + "_miŋ": 635, + "_tɪ_ðə": 636, + "ɹaɪ": 637, + "ɛl": 638, + "ɹæ": 639, + "_hoʊ": 640, + "xu": 641, + "oʊnli": 642, + "ŋk": 643, + "i_i": 644, + "_dɪd": 645, + "_dʒɪst": 646, + "ing": 647, + "kai": 648, + "_mæn": 649, + "_in": 650, + "zo": 651, + "əf": 652, + "dake": 653, + "_ˈsəm": 654, + "ɾɯ_no": 655, + "_go": 656, + "tʃəɹ": 657, + "ite": 658, + "`↓.": 659, + "_kʰaɪ": 660, + "sk": 661, + "ɔɹs": 662, + "_tʰiŋ": 663, + "_nə": 664, + "pəɫ": 665, + "_tɪ_bi": 666, + "ˈfɔɹ": 667, + "mu": 668, + "su": 669, + "aa": 670, + "ɪstəɹ": 671, + "ʰan": 672, + "pəɹ": 673, + "ə_p": 674, + "liɑŋ": 675, + "_v": 676, + "oʊst": 677, + "_əˈgɛn": 678, + "ənz": 679, + "No": 680, + "ɔɹt": 681, + "_səˈ": 682, + "_mɯ": 683, + "tʃʰ": 684, + "_ˈlɪtəɫ": 685, + "_xwo": 686, + "_ˌbi": 687, + "_ˈoʊvəɹ": 688, + "_çi": 689, + "_deɪ": 690, + "aɪn": 691, + "_ʃiŋ": 692, + "i_ʃi": 693, + "_tsʰaɪ": 694, + "ʃoo": 695, + "ɾoo": 696, + "bəɹ": 697, + "ʰa": 698, + "ˈɛs": 699, + "_ɪn_ðə_ˈ": 700, + "Nwa": 701, + "_ðən": 702, + "saɪ": 703, + "_ˈjuˈɛs": 704, + "nda": 705, + "_pleɪ": 706, + "ɪŋ_tɪ": 707, + "ɪti": 708, + "_me": 709, + "_ʃʊd": 710, + "_nu": 711, + "_ðə_k": 712, + "za": 713, + "_ˈɛvəɹ": 714, + "əɹn": 715, + "æd": 716, + "ˈm": 717, + "_doʊnt": 718, + "_məst": 719, + "jɯɯ": 720, + "ɑɹd": 721, + "_jɛn": 722, + "ʃɥ": 723, + "_ˈoʊnli": 724, + "_ʃo": 725, + "_liŋ": 726, + "ss": 727, + "ɑl": 728, + "dea": 729, + "ɾeta": 730, + "mjɛn": 731, + "_gʊd": 732, + "_wɔ": 733, + "imo": 734, + "no_ko": 735, + "_ɥæn": 736, + "ndʒ": 737, + "ɪʃən": 738, + "o_ʃi": 739, + "_θɪŋk": 740, + "_nan": 741, + "to_o": 742, + "_tʰʊŋ": 743, + "ljoʊ": 744, + "tai": 745, + "mə_s": 746, + "_jɯ": 747, + "_uɑŋ": 748, + "_ˌbiˈfɔɹ": 749, + "æs": 750, + "_tʃʰjɛn": 751, + "ik": 752, + "_bæk": 753, + "_ˈiv": 754, + "eɪn": 755, + "un": 756, + "la": 757, + "ˈk": 758, + "_daʊn": 759, + "anai": 760, + "_lɛ": 761, + "əɹt": 762, + "ðɛɹ": 763, + "_ˈæftəɹ": 764, + "dat": 765, + "fan": 766, + "bəɫ": 767, + "temo": 768, + "tʰa": 769, + "ɾɯ_ko": 770, + "ˈv": 771, + "feɪ": 772, + "_mətʃ": 773, + "xwo": 774, + "ɹoʊ": 775, + "_ba": 776, + "_ˈnɛvəɹ": 777, + "_meɪd": 778, + "_jʊŋ": 779, + "_əˈpɑn": 780, + "!?": 781, + "_ˈʃ": 782, + "_ðə_ˈk": 783, + "ft": 784, + "_bo": 785, + "_ɪn_ə": 786, + "tʃʰɥæn": 787, + "ˈz": 788, + "`↓,": 789, + "_bɪˈk": 790, + "ɪg": 791, + "kin": 792, + "_kl": 793, + "ɾɯ_n": 794, + "_lɑʊ": 795, + "----": 796, + "ika": 797, + "_ɹaɪt": 798, + "zd": 799, + "z_ənd": 800, + "_kjo": 801, + "xwan": 802, + "too": 803, + "_gɪt": 804, + "_liɑŋ": 805, + "ta_n": 806, + "_keɪm": 807, + "_ˈəðəɹ": 808, + "_wɛɫ": 809, + "teki": 810, + "see": 811, + "jɯ": 812, + "i_o": 813, + "to_ʃi": 814, + "fəɫ": 815, + "bo": 816, + "ˌt": 817, + "ɪp": 818, + "ane": 819, + "_tʰjɛn": 820, + "_tʃo": 821, + "ɾjo": 822, + "ɪns": 823, + "_he": 824, + "ŋka": 825, + "ʃɥɛ": 826, + "dʑa": 827, + "vd": 828, + "ʰwan": 829, + "_gɹeɪt": 830, + "_əv_ə": 831, + "əndəɹ": 832, + "kedo": 833, + "_ðə_b": 834, + "ək": 835, + "_teɪk": 836, + "kʰan": 837, + "_ˈɔlˌ": 838, + "swo": 839, + "_ɪt_wɑz": 840, + "_ʃɥ": 841, + "_sim": 842, + "_ˈfɑ": 843, + "min": 844, + "i_a": 845, + "soo": 846, + "ɛns": 847, + "_sətʃ": 848, + "tʰaɪ": 849, + "_ga": 850, + "i_ka": 851, + "koo": 852, + "_fəɹst": 853, + "_ˈtʃ": 854, + "nno": 855, + "ə_ɹ": 856, + "taɾa": 857, + "tʃʰjoʊ": 858, + "_æm": 859, + "_mu": 860, + "_meɪk": 861, + "↓…": 862, + "ɪˈθ": 863, + "ɑb": 864, + "ɹa": 865, + "_wɛɹ": 866, + "_ðə_ˈs": 867, + "_əˈl": 868, + "_oʊɫd": 869, + "æl": 870, + "_ˈpi": 871, + "_lɔŋ": 872, + "dʑo": 873, + "_tʰaɪ": 874, + "ɔɹn": 875, + "əɫz": 876, + "_təˈ": 877, + "_əˈweɪ": 878, + "pa": 879, + "_ðiz": 880, + "_ˈsp": 881, + "nn": 882, + "mae": 883, + "towa": 884, + "ta_no": 885, + "_an": 886, + "kʰaɪ": 887, + "ɾaɾe": 888, + "eɪs": 889, + "ɑd": 890, + "_wɪˈθ": 891, + "_ˈivɪn": 892, + "_lu": 893, + "ɔɪ": 894, + "lɪŋ": 895, + "əti": 896, + "_ðə_f": 897, + "oʃi": 898, + "_la": 899, + "si": 900, + "tɪd": 901, + "haʊ": 902, + "pʰin": 903, + "ˈst": 904, + "_ˈpəɹ": 905, + "eɹ": 906, + "*!": 907, + "_ˈmɪstəɹ": 908, + "ʃa": 909, + "_ˌɪm": 910, + "ˌθɪŋ": 911, + "_neɪ": 912, + "_nɥ": 913, + "ɑk": 914, + "_ɹu": 915, + "_ʃɯ": 916, + "_ðə_ˈm": 917, + "demo": 918, + "_dɹ": 919, + "dʑoo": 920, + "_stɪɫ": 921, + "_pʰiŋ": 922, + "ə_i": 923, + "_ɪkˈsp": 924, + "_wɛnt": 925, + "ɪɹi": 926, + "əˈm": 927, + "o_ka": 928, + "_əˈk": 929, + "ɔk": 930, + "_ɥɛ": 931, + "_lʊk": 932, + "ˈd": 933, + "kaʃi": 934, + "_wɪθ_ə": 935, + "ljɛn": 936, + "ɔn": 937, + "_ljɛn": 938, + "_hɛɫ": 939, + "uɹ": 940, + "_tʰoʊ": 941, + "_tʃʰɥæn": 942, + "_sk": 943, + "tsʰaɪ": 944, + "ɛtəɹ": 945, + "_min": 946, + "noʊ": 947, + "ʃɯ": 948, + "_θɹu": 949, + "_θɔt": 950, + "dajo": 951, + "wi": 952, + "i_ko": 953, + "_tɹ": 954, + "_fan": 955, + "ɹɛ": 956, + "saN": 957, + "_hi_wɑz": 958, + "_ɾe": 959, + "_əm": 960, + "te_ki": 961, + "_xoʊ": 962, + "ˈl": 963, + "ˈg": 964, + "ga_i": 965, + "_ɔn_ðə": 966, + "_xwa": 967, + "vɪŋ": 968, + "man": 969, + "fəɹ": 970, + "_oʊn": 971, + "ˈɹ": 972, + "_kɹ": 973, + "te_o": 974, + "ɪli": 975, + "_ʃɥɛ": 976, + "_fəŋ": 977, + "æɫ": 978, + "ɑp": 979, + "_ˈɛv": 980, + "eɪndʒ": 981, + "iɫ": 982, + "wət": 983, + "ɛðəɹ": 984, + "_fən": 985, + "ɾee": 986, + "_hi_hæd": 987, + "_maɪt": 988, + "_ge": 989, + "ækt": 990, + "ɪts": 991, + "_hɪm": 992, + "_ze": 993, + "ii": 994, + "_N": 995, + "_əv_hɪz": 996, + "_gɹ": 997, + "ænt": 998, + "ɪˌ": 999, + "_hɪmˈsɛɫf": 1000, + "wa_na": 1001, + "aɪəɹ": 1002, + "dʑanai": 1003, + "kana": 1004, + "aɪz": 1005, + "_ɪt_ɪz": 1006, + "mase": 1007, + "wɪn": 1008, + "əθɪŋ": 1009, + "_pɹəˈ": 1010, + "kɯn": 1011, + "ˈju": 1012, + "_fɔɹ": 1013, + "pʰi": 1014, + "pʰiŋ": 1015, + "o_i": 1016, + "vz": 1017, + "ɔɪn": 1018, + "tʰiŋ": 1019, + "_ne": 1020, + "gəɹ": 1021, + "æts": 1022, + "_ˈɹi": 1023 + }, + "merges": [ + "_ t", + "↓ ↑", + "_ ˈ", + "ə n", + "_ s", + "a ɪ", + "ə ɹ", + "e ɪ", + "o ʊ", + "_ k", + "ʃ i", + "_ w", + "_ ð", + "t s", + "t ʃ", + "_t s", + "_ h", + "_ ə", + "_ m", + "a n", + "_ n", + "_ð ə", + "ɛ n", + "ɑ ʊ", + "ɑ ŋ", + "` ⁼", + "_ p", + "_ i", + "_ ɪ", + "_t ʃ", + "_ l", + "j ɛn", + "_ d", + "_ f", + "_ j", + "w o", + "_ b", + "t a", + "` ↓", + "t e", + "ən d", + "_ ʃi", + "w a", + "k a", + "ɪ ŋ", + "i n", + "s t", + "l i", + "ʊ ŋ", + "_t ɪ", + "t o", + "w eɪ", + "_ ənd", + "ʰ i", + "_ə v", + "ə ŋ", + "n o", + "_ x", + "ɾ ɯ", + "n a", + "_ a", + "_ ɹ", + "ɪ n", + "g a", + "d e", + "j oʊ", + "æ n", + "k ɯ", + "ɾ e", + "m a", + "_ðə _ˈ", + "ɾ a", + "ɛ ɹ", + "m o", + "ɔ ɹ", + "ə ɫ", + "_ g", + "d a", + "* ↑", + "ɪ ˈ", + "_ o", + "_ ʃ", + "i ŋ", + "j a", + "ə m", + "_ ˌ", + "a ʊ", + "_ə ˈ", + "` ↑", + "ə t", + "_ aɪ", + "o o", + "s ɯ", + "↓ .", + "_ɪ n", + "_h i", + "_w ɪ", + "ɪ z", + "_n a", + "w an", + "_k o", + "_w o", + "ɪ d", + "ɾ i", + "_j u", + "m ə", + "_l ə", + "_h æ", + "_ðə t", + "ɑ ɹ", + "t ʰ", + "k i", + "… …", + "ɑ z", + "_ ɔ", + "_m i", + "_w ɑz", + "_ˈ s", + "↓ ,", + "_t ʰ", + "ə ˈ", + "d ʑ", + "ɪ t", + "_k ʰ", + "i ɛ", + "_m a", + "ɪ s", + "ts ɯ", + "_n i", + "_ɪ t", + "k e", + "i ɑʊ", + "_k a", + "_ əɹ", + "n d", + "_ˈ p", + "k o", + "j o", + "ɹ i", + "m ən", + "ʊ d", + "_ˈ m", + "_f əɹ", + "tʃ ʰi", + "s a", + "ʰ ɥ", + "k ʰ", + "ˈ s", + "ɑ t", + "ɛ d", + "s e", + "t ʃi", + "ɛ ɫ", + "_ˈ k", + "_j oʊ", + "t əɹ", + "ɛ z", + "- -", + "v əɹ", + "` →", + "ʃ ən", + "_ɪ z", + "_m eɪ", + "_ æ", + "d ʒ", + "_k i", + "_h ɪz", + "_b i", + "u ɑŋ", + "_ˈ f", + "↓↑ .", + "_wɪ θ", + "j u", + "i ɑŋ", + "→ .", + "_s o", + "_h əɹ", + "↑ .", + "n i", + "_m o", + "_m aɪ", + "l aɪ", + "ɥ ɛ", + "_t a", + "ən t", + "_tʃ ʰi", + "_s ɯ", + "_ θ", + "_ ɛz", + "w ən", + "m e", + "m i", + "_hæ d", + "_h a", + "ə s", + "_ˈ l", + "_s t", + "ð əɹ", + "oʊ n", + "_w a", + "ʰ əŋ", + "_n ɑt", + "* .", + "k t", + "_ˈ h", + "d o", + "ɥ æn", + "n e", + "_t o", + "_w ən", + "_n o", + "_l aɪ", + "_w əɹ", + "↑ ,", + "→ ,", + "ɛ s", + "↓↑ ,", + "_ɔ n", + "ʰ u", + "s o", + "_ˈ b", + "ɫ d", + "ɪ k", + "ɪ st", + "_f ɹ", + "_ð ɛɹ", + "_w eɪ", + "ka ɾa", + "_ˈ d", + "_hæ v", + "ts ʰ", + "w aɪ", + "ɾ o", + "ɛ m", + "_æ t", + "ʊ ɹ", + "_ˈ w", + "b a", + "_n oʊ", + "ʰ jɛn", + "ɹ eɪ", + "_j o", + "ɸ ɯ", + "_s a", + "_ɹ ɪˈ", + "_ˈ n", + "a i", + "_b ət", + "ɪ ɹ", + "tʃ ʰɥ", + "_d ʑ", + "ə ˌ", + "_ð ɪs", + ". .", + "x wa", + "_ɪ m", + "_d ɪˈ", + "_k ən", + "dʑ i", + "* ,", + "ɑ n", + "_ʃi ɑŋ", + "_k ɯ", + "ʃi n", + "_s oʊ", + "b i", + "tʰ jɛn", + "te _i", + "_ts ʰ", + "_ ɯ", + "aɪ t", + "ʰi ŋ", + "ð ə", + "_ɔ ɫ", + "_ˈ ɹ", + "na i", + "əɹ d", + "_ˈ t", + "_ ən", + "_tʃ ʰɥ", + "_i ɛ", + "l eɪ", + "ɛɹ i", + "ˈ t", + "h a", + "ʃi ŋ", + "ɛ vəɹ", + "z ɯ", + "_w i", + "_j a", + "ɛ k", + "ʰ ɑŋ", + "_ts ɯ", + "_əv _ðə", + "ta ʃi", + "_s ɛd", + "_x ə", + "_l i", + "_s i", + "de sɯ", + "_ˌ ɪn", + "ʃ jɛn", + "_b aɪ", + "o n", + "_x ɑʊ", + "_ð eɪ", + "_x aɪ", + "` ↓↑", + "x weɪ", + "h i", + "_s e", + "ə _s", + "_fɹ əm", + "ʊ t", + "d i", + "aʊ t", + "ə b", + "s ɹ", + "ə z", + "_x weɪ", + "_kʰ ə", + "ɹ u", + "_ u", + "_d e", + "aɪ d", + "ɪ v", + "b ɯ", + "_h o", + "əɹ z", + "j oo", + "_b ɪˈ", + "_tʰ a", + "ɛ t", + "e n", + "ɛn i", + "ə st", + "æ k", + "ə _ts", + "_ˈ ɪn", + "t i", + "ɥ n", + "_d ʒ", + "x ɑʊ", + "_ˈ v", + "ʃi ɑŋ", + "p ʰ", + "_wɪ tʃ", + "eɪ m", + "oʊ z", + "ə ðəɹ", + "f ɑŋ", + "_ˈ g", + "_d o", + "_ʃi ɑʊ", + "_ˈ æ", + "_j ʊɹ", + "_ð ɛm", + "ɪ m", + "ɛ st", + "æn d", + "_d u", + "ɯ ɯ", + "k an", + "_d a", + "in o", + "_ e", + "_w ʊd", + "ɛn d", + "m eɪ", + "θ ɪŋ", + "_ʃ jɛn", + "i z", + "aɪ m", + "_h u", + "_əˈ b", + "ən s", + "_wɪ ɫ", + "t ʰi", + "g o", + "ɛn t", + "f u", + "æ p", + "x oʊ", + "eɪ k", + "ʊ k", + "əɹ ˈ", + "_θ ɪŋ", + "ə l", + "p ɹ", + "ə tʃ", + "n t", + "_ ɸɯ", + "l u", + "_ˈ ɔ", + "_i ɑʊ", + "l ə", + "t u", + "_dʑ i", + "eɪ t", + "_ʃi n", + "n na", + "_ˈp ɹ", + "f ən", + "_ə p", + "n jɛn", + "_a ʊt", + "f ɔɹ", + "_t u", + "eɪ ʃən", + "ɪ ɫ", + "_w ət", + "_ɪ f", + "_ ɥ", + "_f a", + "ˈ w", + "tʃ ʰjɛn", + "_w ɪn", + "oʊ ɫd", + "_əˈ p", + "aʊ nd", + "s an", + "h e", + "_b ɪn", + "f a", + "ɪ f", + "ɔ ŋ", + "g e", + "_ɪn _ðə", + "m iŋ", + "_p ɹ", + "in a", + "an o", + "əb əɫ", + "k ˈs", + "_ˈ ɛni", + "n əŋ", + "ə d", + "_əv _ðə_ˈ", + "_w aɪ", + "_t aɪm", + "ˈs ɛɫ", + "ʃi ɛ", + "_k əm", + "æ st", + "_g oʊ", + "m ɯ", + "ˈ p", + "_ˈ st", + "ə _t", + "p t", + "_p ʰ", + "ʰ ɹ", + "ʃ ja", + "i wa", + "ɪ l", + "b ət", + "_f ɑŋ", + "h o", + "i v", + "l oʊ", + "b e", + "_laɪ k", + "ɪ ʃ", + "_f u", + "z e", + "ə _tʃ", + "ɑɹ t", + "ɔɹ d", + "tʃʰi ŋ", + "m p", + "_ðə _s", + "_əˈb aʊt", + "_ˈ oʊ", + "kʰ ə", + "d _tɪ", + "ŋ ga", + "ə li", + "_kʰ an", + "ç i", + "_ˈ ju", + "_k ʊd", + "ɔ ɫ", + "ɔ t", + "_ɪ ts", + "_s an", + "tʃ a", + "i _na", + "x ə", + "ɛ kt", + "_m ɔɹ", + "te _kɯ", + "ɪd ʒ", + "j ʊŋ", + "_w an", + "æ t", + "ka t", + "ˈsɛɫ f", + "_k e", + "aɪ nd", + "i t", + "_ ɑɹ", + "s p", + "oʊn t", + "_t ʃi", + "tsʰ ɹ", + "_x ən", + "_əˈ g", + "ə _k", + "to _i", + "_t ʰi", + "_i ŋ", + "aʊ n", + "g ɯ", + "_ɪ kˈs", + "ɛ v", + "g i", + "k s", + "_s əm", + "an a", + "ɪt əɫ", + "n an", + "_ˈɪn tu", + "_hi ɹ", + "_t e", + "_n aʊ", + "ʃi ɑʊ", + "ʃ o", + "ɹ e", + "x aɪ", + "_tʃʰi ŋ", + "_s ɹ", + "_h aʊ", + "? .", + "_f eɪ", + "li ŋ", + "_ʃ ja", + "_ˈ dʒ", + "_s eɪ", + "ˈ n", + "s oʊ", + "tʰ ʊŋ", + "_l joʊ", + "m aɪ", + "_b ɹ", + "ɹeɪ t", + "_n əŋ", + "ʰ ə", + "æn s", + "_ˈɔ l", + "ta tʃi", + "n to", + "_ˌɪn ˈ", + "l e", + "n de", + "_ˈv ɛɹi", + "mən t", + "ɾi ma", + "_ð ɛn", + "_h əz", + "_ɹ i", + "f təɹ", + "_s p", + "ɾe wa", + "ga _a", + "z _əv", + "_m iŋ", + "_tɪ _ðə", + "ɹ aɪ", + "ɛ l", + "ɹ æ", + "_h oʊ", + "x u", + "oʊn li", + "ŋ k", + "i _i", + "_d ɪd", + "_dʒ ɪst", + "in g", + "ka i", + "_m æn", + "_i n", + "z o", + "ə f", + "da ke", + "_ˈs əm", + "ɾɯ _no", + "_g o", + "tʃ əɹ", + "i te", + "`↓ .", + "_kʰ aɪ", + "s k", + "ɔɹ s", + "_t ʰiŋ", + "_n ə", + "p əɫ", + "_tɪ _bi", + "ˈ fɔɹ", + "m u", + "s u", + "a a", + "ɪst əɹ", + "ʰ an", + "p əɹ", + "ə _p", + "li ɑŋ", + "_ v", + "oʊ st", + "_əˈg ɛn", + "ən z", + "N o", + "ɔɹ t", + "_s əˈ", + "_m ɯ", + "tʃ ʰ", + "_ˈl ɪtəɫ", + "_x wo", + "_ˌ bi", + "_ˈoʊ vəɹ", + "_ çi", + "_d eɪ", + "aɪ n", + "_ʃi ŋ", + "i _ʃi", + "_tsʰ aɪ", + "ʃ oo", + "ɾ oo", + "b əɹ", + "ʰ a", + "ˈ ɛs", + "_ɪn _ðə_ˈ", + "N wa", + "_ð ən", + "s aɪ", + "_ˈju ˈɛs", + "n da", + "_p leɪ", + "ɪŋ _tɪ", + "ɪt i", + "_m e", + "_ʃ ʊd", + "_n u", + "_ðə _k", + "z a", + "_ˈ ɛvəɹ", + "əɹ n", + "æ d", + "ˈ m", + "_d oʊnt", + "_m əst", + "j ɯɯ", + "ɑɹ d", + "_ jɛn", + "ʃ ɥ", + "_ˈ oʊnli", + "_ʃ o", + "_l iŋ", + "s s", + "ɑ l", + "de a", + "ɾe ta", + "m jɛn", + "_g ʊd", + "_w ɔ", + "i mo", + "no _ko", + "_ ɥæn", + "nd ʒ", + "ɪ ʃən", + "o _ʃi", + "_θɪŋ k", + "_n an", + "to _o", + "_tʰ ʊŋ", + "l joʊ", + "ta i", + "mə _s", + "_j ɯ", + "_ uɑŋ", + "_ˌbi ˈfɔɹ", + "æ s", + "_tʃ ʰjɛn", + "i k", + "_b æk", + "_ˈ iv", + "eɪ n", + "u n", + "l a", + "ˈ k", + "_d aʊn", + "an ai", + "_l ɛ", + "əɹ t", + "ð ɛɹ", + "_ˈæ ftəɹ", + "da t", + "f an", + "b əɫ", + "te mo", + "tʰ a", + "ɾɯ _ko", + "ˈ v", + "f eɪ", + "_m ətʃ", + "x wo", + "ɹ oʊ", + "_b a", + "_ˈn ɛvəɹ", + "_meɪ d", + "_j ʊŋ", + "_əˈp ɑn", + "! ?", + "_ˈ ʃ", + "_ðə_ˈ k", + "f t", + "_b o", + "_ɪn _ə", + "tʃʰɥ æn", + "ˈ z", + "`↓ ,", + "_bɪˈ k", + "ɪ g", + "k in", + "_k l", + "ɾɯ _n", + "_l ɑʊ", + "-- --", + "i ka", + "_ɹ aɪt", + "z d", + "z _ənd", + "_k jo", + "x wan", + "to o", + "_g ɪt", + "_l iɑŋ", + "ta _n", + "_k eɪm", + "_ˈ əðəɹ", + "_w ɛɫ", + "te ki", + "se e", + "j ɯ", + "i _o", + "to _ʃi", + "f əɫ", + "b o", + "ˌ t", + "ɪ p", + "an e", + "_tʰ jɛn", + "_tʃ o", + "ɾ jo", + "ɪn s", + "_h e", + "ŋ ka", + "ʃ ɥɛ", + "dʑ a", + "v d", + "ʰ wan", + "_g ɹeɪt", + "_əv _ə", + "ənd əɹ", + "ke do", + "_ðə _b", + "ə k", + "_t eɪk", + "kʰ an", + "_ˈɔl ˌ", + "s wo", + "_ɪt _wɑz", + "_ʃ ɥ", + "_si m", + "_ˈf ɑ", + "m in", + "i _a", + "s oo", + "ɛn s", + "_s ətʃ", + "tʰ aɪ", + "_ ga", + "i _ka", + "k oo", + "_fəɹ st", + "_ˈ tʃ", + "n no", + "ə _ɹ", + "ta ɾa", + "tʃʰ joʊ", + "_æ m", + "_m u", + "_meɪ k", + "↓ …", + "ɪˈ θ", + "ɑ b", + "ɹ a", + "_w ɛɹ", + "_ðə_ˈ s", + "_əˈ l", + "_ oʊɫd", + "æ l", + "_ˈp i", + "_l ɔŋ", + "dʑ o", + "_tʰ aɪ", + "ɔɹ n", + "əɫ z", + "_t əˈ", + "_əˈ weɪ", + "p a", + "_ð iz", + "_ˈs p", + "n n", + "ma e", + "to wa", + "ta _no", + "_ an", + "kʰ aɪ", + "ɾa ɾe", + "eɪ s", + "ɑ d", + "_w ɪˈθ", + "_ˈiv ɪn", + "_l u", + "ɔ ɪ", + "l ɪŋ", + "ət i", + "_ðə _f", + "o ʃi", + "_l a", + "s i", + "t ɪd", + "h aʊ", + "pʰ in", + "ˈ st", + "_ˈp əɹ", + "e ɹ", + "* !", + "_ˈm ɪstəɹ", + "ʃ a", + "_ˌ ɪm", + "ˌ θɪŋ", + "_n eɪ", + "_n ɥ", + "ɑ k", + "_ɹ u", + "_ʃ ɯ", + "_ðə_ˈ m", + "de mo", + "_d ɹ", + "dʑ oo", + "_st ɪɫ", + "_p ʰiŋ", + "ə _i", + "_ɪkˈs p", + "_w ɛnt", + "ɪ ɹi", + "əˈ m", + "o _ka", + "_əˈ k", + "ɔ k", + "_ ɥɛ", + "_l ʊk", + "ˈ d", + "ka ʃi", + "_wɪθ _ə", + "l jɛn", + "ɔ n", + "_l jɛn", + "_h ɛɫ", + "u ɹ", + "_tʰ oʊ", + "_tʃʰɥ æn", + "_s k", + "tsʰ aɪ", + "ɛ təɹ", + "_m in", + "n oʊ", + "ʃ ɯ", + "_θ ɹu", + "_θ ɔt", + "da jo", + "w i", + "i _ko", + "_t ɹ", + "_f an", + "ɹ ɛ", + "sa N", + "_hi _wɑz", + "_ ɾe", + "_ə m", + "te _ki", + "_x oʊ", + "ˈ l", + "ˈ g", + "ga _i", + "_ɔn _ðə", + "_x wa", + "v ɪŋ", + "m an", + "f əɹ", + "_ oʊn", + "ˈ ɹ", + "_k ɹ", + "te _o", + "ɪ li", + "_ʃ ɥɛ", + "_f əŋ", + "æ ɫ", + "ɑ p", + "_ˈ ɛv", + "eɪ ndʒ", + "i ɫ", + "w ət", + "ɛ ðəɹ", + "_f ən", + "ɾe e", + "_hi _hæd", + "_maɪ t", + "_g e", + "æ kt", + "ɪ ts", + "_h ɪm", + "_ ze", + "i i", + "_ N", + "_əv _hɪz", + "_g ɹ", + "æn t", + "ɪ ˌ", + "_hɪm ˈsɛɫf", + "wa _na", + "aɪ əɹ", + "dʑ anai", + "kan a", + "aɪ z", + "_ɪt _ɪz", + "ma se", + "w ɪn", + "ə θɪŋ", + "_pɹ əˈ", + "kɯ n", + "ˈ ju", + "_f ɔɹ", + "p ʰi", + "p ʰiŋ", + "o _i", + "v z", + "ɔ ɪn", + "t ʰiŋ", + "_n e", + "g əɹ", + "æ ts", + "_ˈ ɹi" + ] + } +} \ No newline at end of file diff --git a/utils/g2p/bpe_175.json b/utils/g2p/bpe_175.json new file mode 100644 index 0000000000000000000000000000000000000000..e09eb638e2490f1cd0ba360cee6d8ab15dee05f4 --- /dev/null +++ b/utils/g2p/bpe_175.json @@ -0,0 +1,246 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "[UNK]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "[CLS]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "[SEP]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "[PAD]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 4, + "content": "[MASK]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "Whitespace" + }, + "post_processor": null, + "decoder": null, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "[UNK]", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "vocab": { + "[UNK]": 0, + "[CLS]": 1, + "[SEP]": 2, + "[PAD]": 3, + "[MASK]": 4, + "!": 5, + "#": 6, + "*": 7, + ",": 8, + "-": 9, + ".": 10, + "=": 11, + "?": 12, + "N": 13, + "Q": 14, + "^": 15, + "_": 16, + "`": 17, + "a": 18, + "b": 19, + "d": 20, + "e": 21, + "f": 22, + "g": 23, + "h": 24, + "i": 25, + "j": 26, + "k": 27, + "l": 28, + "m": 29, + "n": 30, + "o": 31, + "p": 32, + "s": 33, + "t": 34, + "u": 35, + "v": 36, + "w": 37, + "x": 38, + "y": 39, + "z": 40, + "~": 41, + "æ": 42, + "ç": 43, + "ð": 44, + "ŋ": 45, + "ɑ": 46, + "ɔ": 47, + "ə": 48, + "ɛ": 49, + "ɥ": 50, + "ɪ": 51, + "ɫ": 52, + "ɯ": 53, + "ɸ": 54, + "ɹ": 55, + "ɾ": 56, + "ʃ": 57, + "ʊ": 58, + "ʑ": 59, + "ʒ": 60, + "ʰ": 61, + "ˈ": 62, + "ˌ": 63, + "θ": 64, + "…": 65, + "⁼": 66, + "↑": 67, + "→": 68, + "↓": 69, + "ɯəj": 70, + "ɤ̆j": 71, + "ʷiə": 72, + "ɤ̆w": 73, + "ɯəw": 74, + "ʷet": 75, + "iəw": 76, + "uəj": 77, + "ʷen": 78, + "tʰw": 79, + "ʷɤ̆": 80, + "ʷiu": 81, + "kwi": 82, + "ŋ͡m": 83, + "k͡p": 84, + "cw": 85, + "jw": 86, + "uə": 87, + "eə": 88, + "bw": 89, + "oj": 90, + "ʷi": 91, + "vw": 92, + "ăw": 93, + "ʈw": 94, + "ʂw": 95, + "aʊ": 96, + "fw": 97, + "ɛu": 98, + "tʰ": 99, + "tʃ": 100, + "ɔɪ": 101, + "xw": 102, + "ʷɤ": 103, + "ɤ̆": 104, + "ŋw": 105, + "ʊə": 106, + "zi": 107, + "ʷă": 108, + "dw": 109, + "eɪ": 110, + "aɪ": 111, + "ew": 112, + "iə": 113, + "ɣw": 114, + "zw": 115, + "ɯj": 116, + "ʷɛ": 117, + "ɯw": 118, + "ɤj": 119, + "ɔ:": 120, + "əʊ": 121, + "ʷa": 122, + "mw": 123, + "ɑ:": 124, + "hw": 125, + "ɔj": 126, + "uj": 127, + "lw": 128, + "ɪə": 129, + "ăj": 130, + "u:": 131, + "aw": 132, + "ɛj": 133, + "iw": 134, + "aj": 135, + "ɜ:": 136, + "kw": 137, + "nw": 138, + "t∫": 139, + "ɲw": 140, + "eo": 141, + "sw": 142, + "tw": 143, + "ʐw": 144, + "iɛ": 145, + "ʷe": 146, + "i:": 147, + "ɯə": 148, + "dʒ": 149, + "ɲ": 150, + "ʌ": 151, + "1": 152, + "∫": 153, + "3": 154, + "ɣ": 155, + "ʧ": 156, + "6": 157, + "ʐ": 158, + "ă": 159, + "ɤ": 160, + "2": 161, + "ʤ": 162, + "ɒ": 163, + "ʂ": 164, + "5": 165, + " ": 166, + "c": 167, + "ʈ": 168, + "4": 169, + "r": 170, + ":": 171, + "η": 172, + ";": 173, + "'": 174 + }, + "merges": [ + ] + } +} \ No newline at end of file diff --git a/utils/g2p/bpe_69.json b/utils/g2p/bpe_69.json new file mode 100644 index 0000000000000000000000000000000000000000..45eba9955fdcf9a7c764027b43930bf28722492b --- /dev/null +++ b/utils/g2p/bpe_69.json @@ -0,0 +1,141 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "[UNK]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "[CLS]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "[SEP]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "[PAD]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 4, + "content": "[MASK]", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "Whitespace" + }, + "post_processor": null, + "decoder": null, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "[UNK]", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "vocab": { + "[UNK]": 0, + "[CLS]": 1, + "[SEP]": 2, + "[PAD]": 3, + "[MASK]": 4, + "!": 5, + "#": 6, + "*": 7, + ",": 8, + "-": 9, + ".": 10, + "=": 11, + "?": 12, + "N": 13, + "Q": 14, + "^": 15, + "_": 16, + "`": 17, + "a": 18, + "b": 19, + "d": 20, + "e": 21, + "f": 22, + "g": 23, + "h": 24, + "i": 25, + "j": 26, + "k": 27, + "l": 28, + "m": 29, + "n": 30, + "o": 31, + "p": 32, + "s": 33, + "t": 34, + "u": 35, + "v": 36, + "w": 37, + "x": 38, + "y": 39, + "z": 40, + "~": 41, + "æ": 42, + "ç": 43, + "ð": 44, + "ŋ": 45, + "ɑ": 46, + "ɔ": 47, + "ə": 48, + "ɛ": 49, + "ɥ": 50, + "ɪ": 51, + "ɫ": 52, + "ɯ": 53, + "ɸ": 54, + "ɹ": 55, + "ɾ": 56, + "ʃ": 57, + "ʊ": 58, + "ʑ": 59, + "ʒ": 60, + "ʰ": 61, + "ˈ": 62, + "ˌ": 63, + "θ": 64, + "…": 65, + "⁼": 66, + "↑": 67, + "→": 68, + "↓": 69 + }, + "merges": [ + ] + } +} \ No newline at end of file diff --git a/utils/g2p/cleaners.py b/utils/g2p/cleaners.py new file mode 100644 index 0000000000000000000000000000000000000000..5aa0e87f5cc81a724d80e8dc54ccd91dbd042390 --- /dev/null +++ b/utils/g2p/cleaners.py @@ -0,0 +1,72 @@ +import re +from utils.g2p.japanese import japanese_to_romaji_with_accent, japanese_to_ipa, japanese_to_ipa2, japanese_to_ipa3 +from utils.g2p.mandarin import number_to_chinese, chinese_to_bopomofo, latin_to_bopomofo, chinese_to_romaji, chinese_to_lazy_ipa, chinese_to_ipa, chinese_to_ipa2 +from utils.g2p.english import english_to_lazy_ipa, english_to_ipa2, english_to_lazy_ipa2 +from utils.g2p.vietnamese import vietnamese_to_ipa + +patterns = [r'\[EN\](.*?)\[EN\]', r'\[ZH\](.*?)\[ZH\]', r'\[JA\](.*?)\[JA\]', r'\[VI\](.*?)\[VI\]'] + +# def vietnamese_cleaners(text): +# text = + +def japanese_cleaners(text): + text = japanese_to_romaji_with_accent(text) + text = re.sub(r'([A-Za-z])$', r'\1.', text) + return text + +def japanese_cleaners2(text): + return japanese_cleaners(text).replace('ts', 'ʦ').replace('...', '…') + +def chinese_cleaners(text): + '''Pipeline for Chinese text''' + text = number_to_chinese(text) + text = chinese_to_bopomofo(text) + text = latin_to_bopomofo(text) + text = re.sub(r'([ˉˊˇˋ˙])$', r'\1。', text) + return text + +def cje_cleaners(text): + matches = [] + for pattern in patterns: + matches.extend(re.finditer(pattern, text)) + + matches.sort(key=lambda x: x.start()) # Sort matches by their start positions + + outputs = "" + output_langs = [] + + for match in matches: + text_segment = text[match.start():match.end()] + phon = clean_one(text_segment) + if "[EN]" in text_segment: + lang = 'en' + elif "[ZH]" in text_segment: + lang = 'zh' + elif "[JA]" in text_segment: + lang = 'ja' + elif "[VI]" in text_segment: + lang = 'ja' + else: + raise ValueError("If you see this error, please report this bug to issues.") + outputs += phon + output_langs += [lang] * len(phon) + assert len(outputs) == len(output_langs) + return outputs, output_langs + + +def clean_one(text): + if text.find('[ZH]') != -1: + text = re.sub(r'\[ZH\](.*?)\[ZH\]', + lambda x: chinese_to_ipa(x.group(1))+' ', text) + if text.find('[JA]') != -1: + text = re.sub(r'\[JA\](.*?)\[JA\]', + lambda x: japanese_to_ipa2(x.group(1))+' ', text) + if text.find('[EN]') != -1: + text = re.sub(r'\[EN\](.*?)\[EN\]', + lambda x: english_to_ipa2(x.group(1))+' ', text) + if text.find('[VI]') != -1: + text = re.sub(r'\[VI\](.*?)\[VI\]', + lambda x: vietnamese_to_ipa(x.group(1))+' ', text) + text = re.sub(r'\s+$', '', text) + text = re.sub(r'([^\.,!\?\-…~])$', r'\1.', text) + return text diff --git a/utils/g2p/english.py b/utils/g2p/english.py new file mode 100644 index 0000000000000000000000000000000000000000..6ac2166d74ce2e24ec5eb844a186d18bf29065d3 --- /dev/null +++ b/utils/g2p/english.py @@ -0,0 +1,188 @@ +""" from https://github.com/keithito/tacotron """ + +''' +Cleaners are transformations that run over the input text at both training and eval time. + +Cleaners can be selected by passing a comma-delimited list of cleaner names as the "cleaners" +hyperparameter. Some cleaners are English-specific. You'll typically want to use: + 1. "english_cleaners" for English text + 2. "transliteration_cleaners" for non-English text that can be transliterated to ASCII using + the Unidecode library (https://pypi.python.org/pypi/Unidecode) + 3. "basic_cleaners" if you do not want to transliterate (in this case, you should also update + the symbols in symbols.py to match your data). +''' + + +# Regular expression matching whitespace: + + +import re +from unidecode import unidecode +import inflect +_inflect = inflect.engine() +_comma_number_re = re.compile(r'([0-9][0-9\,]+[0-9])') +_decimal_number_re = re.compile(r'([0-9]+\.[0-9]+)') +_pounds_re = re.compile(r'£([0-9\,]*[0-9]+)') +_dollars_re = re.compile(r'\$([0-9\.\,]*[0-9]+)') +_ordinal_re = re.compile(r'[0-9]+(st|nd|rd|th)') +_number_re = re.compile(r'[0-9]+') + +# List of (regular expression, replacement) pairs for abbreviations: +_abbreviations = [(re.compile('\\b%s\\.' % x[0], re.IGNORECASE), x[1]) for x in [ + ('mrs', 'misess'), + ('mr', 'mister'), + ('dr', 'doctor'), + ('st', 'saint'), + ('co', 'company'), + ('jr', 'junior'), + ('maj', 'major'), + ('gen', 'general'), + ('drs', 'doctors'), + ('rev', 'reverend'), + ('lt', 'lieutenant'), + ('hon', 'honorable'), + ('sgt', 'sergeant'), + ('capt', 'captain'), + ('esq', 'esquire'), + ('ltd', 'limited'), + ('col', 'colonel'), + ('ft', 'fort'), +]] + + +# List of (ipa, lazy ipa) pairs: +_lazy_ipa = [(re.compile('%s' % x[0]), x[1]) for x in [ + ('r', 'ɹ'), + ('æ', 'e'), + ('ɑ', 'a'), + ('ɔ', 'o'), + ('ð', 'z'), + ('θ', 's'), + ('ɛ', 'e'), + ('ɪ', 'i'), + ('ʊ', 'u'), + ('ʒ', 'ʥ'), + ('ʤ', 'ʥ'), + ('ˈ', '↓'), +]] + +# List of (ipa, lazy ipa2) pairs: +_lazy_ipa2 = [(re.compile('%s' % x[0]), x[1]) for x in [ + ('r', 'ɹ'), + ('ð', 'z'), + ('θ', 's'), + ('ʒ', 'ʑ'), + ('ʤ', 'dʑ'), + ('ˈ', '↓'), +]] + +# List of (ipa, ipa2) pairs +_ipa_to_ipa2 = [(re.compile('%s' % x[0]), x[1]) for x in [ + ('r', 'ɹ'), + ('ʤ', 'dʒ'), + ('ʧ', 'tʃ') +]] + + +def expand_abbreviations(text): + for regex, replacement in _abbreviations: + text = re.sub(regex, replacement, text) + return text + + +def collapse_whitespace(text): + return re.sub(r'\s+', ' ', text) + + +def _remove_commas(m): + return m.group(1).replace(',', '') + + +def _expand_decimal_point(m): + return m.group(1).replace('.', ' point ') + + +def _expand_dollars(m): + match = m.group(1) + parts = match.split('.') + if len(parts) > 2: + return match + ' dollars' # Unexpected format + dollars = int(parts[0]) if parts[0] else 0 + cents = int(parts[1]) if len(parts) > 1 and parts[1] else 0 + if dollars and cents: + dollar_unit = 'dollar' if dollars == 1 else 'dollars' + cent_unit = 'cent' if cents == 1 else 'cents' + return '%s %s, %s %s' % (dollars, dollar_unit, cents, cent_unit) + elif dollars: + dollar_unit = 'dollar' if dollars == 1 else 'dollars' + return '%s %s' % (dollars, dollar_unit) + elif cents: + cent_unit = 'cent' if cents == 1 else 'cents' + return '%s %s' % (cents, cent_unit) + else: + return 'zero dollars' + + +def _expand_ordinal(m): + return _inflect.number_to_words(m.group(0)) + + +def _expand_number(m): + num = int(m.group(0)) + if num > 1000 and num < 3000: + if num == 2000: + return 'two thousand' + elif num > 2000 and num < 2010: + return 'two thousand ' + _inflect.number_to_words(num % 100) + elif num % 100 == 0: + return _inflect.number_to_words(num // 100) + ' hundred' + else: + return _inflect.number_to_words(num, andword='', zero='oh', group=2).replace(', ', ' ') + else: + return _inflect.number_to_words(num, andword='') + + +def normalize_numbers(text): + text = re.sub(_comma_number_re, _remove_commas, text) + text = re.sub(_pounds_re, r'\1 pounds', text) + text = re.sub(_dollars_re, _expand_dollars, text) + text = re.sub(_decimal_number_re, _expand_decimal_point, text) + text = re.sub(_ordinal_re, _expand_ordinal, text) + text = re.sub(_number_re, _expand_number, text) + return text + + +def mark_dark_l(text): + return re.sub(r'l([^aeiouæɑɔəɛɪʊ ]*(?: |$))', lambda x: 'ɫ'+x.group(1), text) + + +def english_to_ipa(text): + import eng_to_ipa as ipa + text = unidecode(text).lower() + text = expand_abbreviations(text) + text = normalize_numbers(text) + phonemes = ipa.convert(text) + phonemes = collapse_whitespace(phonemes) + return phonemes + + +def english_to_lazy_ipa(text): + text = english_to_ipa(text) + for regex, replacement in _lazy_ipa: + text = re.sub(regex, replacement, text) + return text + + +def english_to_ipa2(text): + text = english_to_ipa(text) + text = mark_dark_l(text) + for regex, replacement in _ipa_to_ipa2: + text = re.sub(regex, replacement, text) + return text.replace('...', '…') + + +def english_to_lazy_ipa2(text): + text = english_to_ipa(text) + for regex, replacement in _lazy_ipa2: + text = re.sub(regex, replacement, text) + return text diff --git a/utils/g2p/japanese.py b/utils/g2p/japanese.py new file mode 100644 index 0000000000000000000000000000000000000000..75716c69496397e1d03fd4c2e87a38860404d11b --- /dev/null +++ b/utils/g2p/japanese.py @@ -0,0 +1,154 @@ +import re +from unidecode import unidecode + + + +# Regular expression matching Japanese without punctuation marks: +_japanese_characters = re.compile( + r'[A-Za-z\d\u3005\u3040-\u30ff\u4e00-\u9fff\uff11-\uff19\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d]') + +# Regular expression matching non-Japanese characters or punctuation marks: +_japanese_marks = re.compile( + r'[^A-Za-z\d\u3005\u3040-\u30ff\u4e00-\u9fff\uff11-\uff19\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d]') + +# List of (symbol, Japanese) pairs for marks: +_symbols_to_japanese = [(re.compile('%s' % x[0]), x[1]) for x in [ + ('%', 'パーセント') +]] + +# List of (romaji, ipa) pairs for marks: +_romaji_to_ipa = [(re.compile('%s' % x[0]), x[1]) for x in [ + ('ts', 'ʦ'), + ('u', 'ɯ'), + ('j', 'ʥ'), + ('y', 'j'), + ('ni', 'n^i'), + ('nj', 'n^'), + ('hi', 'çi'), + ('hj', 'ç'), + ('f', 'ɸ'), + ('I', 'i*'), + ('U', 'ɯ*'), + ('r', 'ɾ') +]] + +# List of (romaji, ipa2) pairs for marks: +_romaji_to_ipa2 = [(re.compile('%s' % x[0]), x[1]) for x in [ + ('u', 'ɯ'), + ('ʧ', 'tʃ'), + ('j', 'dʑ'), + ('y', 'j'), + ('ni', 'n^i'), + ('nj', 'n^'), + ('hi', 'çi'), + ('hj', 'ç'), + ('f', 'ɸ'), + ('I', 'i*'), + ('U', 'ɯ*'), + ('r', 'ɾ') +]] + +# List of (consonant, sokuon) pairs: +_real_sokuon = [(re.compile('%s' % x[0]), x[1]) for x in [ + (r'Q([↑↓]*[kg])', r'k#\1'), + (r'Q([↑↓]*[tdjʧ])', r't#\1'), + (r'Q([↑↓]*[sʃ])', r's\1'), + (r'Q([↑↓]*[pb])', r'p#\1') +]] + +# List of (consonant, hatsuon) pairs: +_real_hatsuon = [(re.compile('%s' % x[0]), x[1]) for x in [ + (r'N([↑↓]*[pbm])', r'm\1'), + (r'N([↑↓]*[ʧʥj])', r'n^\1'), + (r'N([↑↓]*[tdn])', r'n\1'), + (r'N([↑↓]*[kg])', r'ŋ\1') +]] + + +def symbols_to_japanese(text): + for regex, replacement in _symbols_to_japanese: + text = re.sub(regex, replacement, text) + return text + + +def japanese_to_romaji_with_accent(text): + '''Reference https://r9y9.github.io/ttslearn/latest/notebooks/ch10_Recipe-Tacotron.html''' + import pyopenjtalk + text = symbols_to_japanese(text) + sentences = re.split(_japanese_marks, text) + marks = re.findall(_japanese_marks, text) + text = '' + for i, sentence in enumerate(sentences): + if re.match(_japanese_characters, sentence): + if text != '': + text += ' ' + labels = pyopenjtalk.extract_fullcontext(sentence) + for n, label in enumerate(labels): + phoneme = re.search(r'\-([^\+]*)\+', label).group(1) + if phoneme not in ['sil', 'pau']: + text += phoneme.replace('ch', 'ʧ').replace('sh', + 'ʃ').replace('cl', 'Q') + else: + continue + # n_moras = int(re.search(r'/F:(\d+)_', label).group(1)) + a1 = int(re.search(r"/A:(\-?[0-9]+)\+", label).group(1)) + a2 = int(re.search(r"\+(\d+)\+", label).group(1)) + a3 = int(re.search(r"\+(\d+)/", label).group(1)) + if re.search(r'\-([^\+]*)\+', labels[n + 1]).group(1) in ['sil', 'pau']: + a2_next = -1 + else: + a2_next = int( + re.search(r"\+(\d+)\+", labels[n + 1]).group(1)) + # Accent phrase boundary + if a3 == 1 and a2_next == 1: + text += ' ' + # Falling + elif a1 == 0 and a2_next == a2 + 1: + text += '↓' + # Rising + elif a2 == 1 and a2_next == 2: + text += '↑' + if i < len(marks): + text += unidecode(marks[i]).replace(' ', '') + return text + + +def get_real_sokuon(text): + for regex, replacement in _real_sokuon: + text = re.sub(regex, replacement, text) + return text + + +def get_real_hatsuon(text): + for regex, replacement in _real_hatsuon: + text = re.sub(regex, replacement, text) + return text + + +def japanese_to_ipa(text): + text = japanese_to_romaji_with_accent(text).replace('...', '…') + text = re.sub( + r'([aiueo])\1+', lambda x: x.group(0)[0]+'ː'*(len(x.group(0))-1), text) + text = get_real_sokuon(text) + text = get_real_hatsuon(text) + for regex, replacement in _romaji_to_ipa: + text = re.sub(regex, replacement, text) + return text + + +def japanese_to_ipa2(text): + text = japanese_to_romaji_with_accent(text).replace('...', '…') + text = get_real_sokuon(text) + text = get_real_hatsuon(text) + for regex, replacement in _romaji_to_ipa2: + text = re.sub(regex, replacement, text) + return text + + +def japanese_to_ipa3(text): + text = japanese_to_ipa2(text).replace('n^', 'ȵ').replace( + 'ʃ', 'ɕ').replace('*', '\u0325').replace('#', '\u031a') + text = re.sub( + r'([aiɯeo])\1+', lambda x: x.group(0)[0]+'ː'*(len(x.group(0))-1), text) + text = re.sub(r'((?:^|\s)(?:ts|tɕ|[kpt]))', r'\1ʰ', text) + return text diff --git a/utils/g2p/mandarin.py b/utils/g2p/mandarin.py new file mode 100644 index 0000000000000000000000000000000000000000..da7680b7a4e65de8cac1c9afd9a271b0bc666a7c --- /dev/null +++ b/utils/g2p/mandarin.py @@ -0,0 +1,326 @@ +import os +import sys +import re +import jieba +import cn2an +import logging + + +# List of (Latin alphabet, bopomofo) pairs: +_latin_to_bopomofo = [(re.compile('%s' % x[0], re.IGNORECASE), x[1]) for x in [ + ('a', 'ㄟˉ'), + ('b', 'ㄅㄧˋ'), + ('c', 'ㄙㄧˉ'), + ('d', 'ㄉㄧˋ'), + ('e', 'ㄧˋ'), + ('f', 'ㄝˊㄈㄨˋ'), + ('g', 'ㄐㄧˋ'), + ('h', 'ㄝˇㄑㄩˋ'), + ('i', 'ㄞˋ'), + ('j', 'ㄐㄟˋ'), + ('k', 'ㄎㄟˋ'), + ('l', 'ㄝˊㄛˋ'), + ('m', 'ㄝˊㄇㄨˋ'), + ('n', 'ㄣˉ'), + ('o', 'ㄡˉ'), + ('p', 'ㄆㄧˉ'), + ('q', 'ㄎㄧㄡˉ'), + ('r', 'ㄚˋ'), + ('s', 'ㄝˊㄙˋ'), + ('t', 'ㄊㄧˋ'), + ('u', 'ㄧㄡˉ'), + ('v', 'ㄨㄧˉ'), + ('w', 'ㄉㄚˋㄅㄨˋㄌㄧㄡˋ'), + ('x', 'ㄝˉㄎㄨˋㄙˋ'), + ('y', 'ㄨㄞˋ'), + ('z', 'ㄗㄟˋ') +]] + +# List of (bopomofo, romaji) pairs: +_bopomofo_to_romaji = [(re.compile('%s' % x[0]), x[1]) for x in [ + ('ㄅㄛ', 'p⁼wo'), + ('ㄆㄛ', 'pʰwo'), + ('ㄇㄛ', 'mwo'), + ('ㄈㄛ', 'fwo'), + ('ㄅ', 'p⁼'), + ('ㄆ', 'pʰ'), + ('ㄇ', 'm'), + ('ㄈ', 'f'), + ('ㄉ', 't⁼'), + ('ㄊ', 'tʰ'), + ('ㄋ', 'n'), + ('ㄌ', 'l'), + ('ㄍ', 'k⁼'), + ('ㄎ', 'kʰ'), + ('ㄏ', 'h'), + ('ㄐ', 'ʧ⁼'), + ('ㄑ', 'ʧʰ'), + ('ㄒ', 'ʃ'), + ('ㄓ', 'ʦ`⁼'), + ('ㄔ', 'ʦ`ʰ'), + ('ㄕ', 's`'), + ('ㄖ', 'ɹ`'), + ('ㄗ', 'ʦ⁼'), + ('ㄘ', 'ʦʰ'), + ('ㄙ', 's'), + ('ㄚ', 'a'), + ('ㄛ', 'o'), + ('ㄜ', 'ə'), + ('ㄝ', 'e'), + ('ㄞ', 'ai'), + ('ㄟ', 'ei'), + ('ㄠ', 'au'), + ('ㄡ', 'ou'), + ('ㄧㄢ', 'yeNN'), + ('ㄢ', 'aNN'), + ('ㄧㄣ', 'iNN'), + ('ㄣ', 'əNN'), + ('ㄤ', 'aNg'), + ('ㄧㄥ', 'iNg'), + ('ㄨㄥ', 'uNg'), + ('ㄩㄥ', 'yuNg'), + ('ㄥ', 'əNg'), + ('ㄦ', 'əɻ'), + ('ㄧ', 'i'), + ('ㄨ', 'u'), + ('ㄩ', 'ɥ'), + ('ˉ', '→'), + ('ˊ', '↑'), + ('ˇ', '↓↑'), + ('ˋ', '↓'), + ('˙', ''), + (',', ','), + ('。', '.'), + ('!', '!'), + ('?', '?'), + ('—', '-') +]] + +# List of (romaji, ipa) pairs: +_romaji_to_ipa = [(re.compile('%s' % x[0], re.IGNORECASE), x[1]) for x in [ + ('ʃy', 'ʃ'), + ('ʧʰy', 'ʧʰ'), + ('ʧ⁼y', 'ʧ⁼'), + ('NN', 'n'), + ('Ng', 'ŋ'), + ('y', 'j'), + ('h', 'x') +]] + +# List of (bopomofo, ipa) pairs: +_bopomofo_to_ipa = [(re.compile('%s' % x[0]), x[1]) for x in [ + ('ㄅㄛ', 'p⁼wo'), + ('ㄆㄛ', 'pʰwo'), + ('ㄇㄛ', 'mwo'), + ('ㄈㄛ', 'fwo'), + ('ㄅ', 'p⁼'), + ('ㄆ', 'pʰ'), + ('ㄇ', 'm'), + ('ㄈ', 'f'), + ('ㄉ', 't⁼'), + ('ㄊ', 'tʰ'), + ('ㄋ', 'n'), + ('ㄌ', 'l'), + ('ㄍ', 'k⁼'), + ('ㄎ', 'kʰ'), + ('ㄏ', 'x'), + ('ㄐ', 'tʃ⁼'), + ('ㄑ', 'tʃʰ'), + ('ㄒ', 'ʃ'), + ('ㄓ', 'ts`⁼'), + ('ㄔ', 'ts`ʰ'), + ('ㄕ', 's`'), + ('ㄖ', 'ɹ`'), + ('ㄗ', 'ts⁼'), + ('ㄘ', 'tsʰ'), + ('ㄙ', 's'), + ('ㄚ', 'a'), + ('ㄛ', 'o'), + ('ㄜ', 'ə'), + ('ㄝ', 'ɛ'), + ('ㄞ', 'aɪ'), + ('ㄟ', 'eɪ'), + ('ㄠ', 'ɑʊ'), + ('ㄡ', 'oʊ'), + ('ㄧㄢ', 'jɛn'), + ('ㄩㄢ', 'ɥæn'), + ('ㄢ', 'an'), + ('ㄧㄣ', 'in'), + ('ㄩㄣ', 'ɥn'), + ('ㄣ', 'ən'), + ('ㄤ', 'ɑŋ'), + ('ㄧㄥ', 'iŋ'), + ('ㄨㄥ', 'ʊŋ'), + ('ㄩㄥ', 'jʊŋ'), + ('ㄥ', 'əŋ'), + ('ㄦ', 'əɻ'), + ('ㄧ', 'i'), + ('ㄨ', 'u'), + ('ㄩ', 'ɥ'), + ('ˉ', '→'), + ('ˊ', '↑'), + ('ˇ', '↓↑'), + ('ˋ', '↓'), + ('˙', ''), + (',', ','), + ('。', '.'), + ('!', '!'), + ('?', '?'), + ('—', '-') +]] + +# List of (bopomofo, ipa2) pairs: +_bopomofo_to_ipa2 = [(re.compile('%s' % x[0]), x[1]) for x in [ + ('ㄅㄛ', 'pwo'), + ('ㄆㄛ', 'pʰwo'), + ('ㄇㄛ', 'mwo'), + ('ㄈㄛ', 'fwo'), + ('ㄅ', 'p'), + ('ㄆ', 'pʰ'), + ('ㄇ', 'm'), + ('ㄈ', 'f'), + ('ㄉ', 't'), + ('ㄊ', 'tʰ'), + ('ㄋ', 'n'), + ('ㄌ', 'l'), + ('ㄍ', 'k'), + ('ㄎ', 'kʰ'), + ('ㄏ', 'h'), + ('ㄐ', 'tɕ'), + ('ㄑ', 'tɕʰ'), + ('ㄒ', 'ɕ'), + ('ㄓ', 'tʂ'), + ('ㄔ', 'tʂʰ'), + ('ㄕ', 'ʂ'), + ('ㄖ', 'ɻ'), + ('ㄗ', 'ts'), + ('ㄘ', 'tsʰ'), + ('ㄙ', 's'), + ('ㄚ', 'a'), + ('ㄛ', 'o'), + ('ㄜ', 'ɤ'), + ('ㄝ', 'ɛ'), + ('ㄞ', 'aɪ'), + ('ㄟ', 'eɪ'), + ('ㄠ', 'ɑʊ'), + ('ㄡ', 'oʊ'), + ('ㄧㄢ', 'jɛn'), + ('ㄩㄢ', 'yæn'), + ('ㄢ', 'an'), + ('ㄧㄣ', 'in'), + ('ㄩㄣ', 'yn'), + ('ㄣ', 'ən'), + ('ㄤ', 'ɑŋ'), + ('ㄧㄥ', 'iŋ'), + ('ㄨㄥ', 'ʊŋ'), + ('ㄩㄥ', 'jʊŋ'), + ('ㄥ', 'ɤŋ'), + ('ㄦ', 'əɻ'), + ('ㄧ', 'i'), + ('ㄨ', 'u'), + ('ㄩ', 'y'), + ('ˉ', '˥'), + ('ˊ', '˧˥'), + ('ˇ', '˨˩˦'), + ('ˋ', '˥˩'), + ('˙', ''), + (',', ','), + ('。', '.'), + ('!', '!'), + ('?', '?'), + ('—', '-') +]] + + +def number_to_chinese(text): + numbers = re.findall(r'\d+(?:\.?\d+)?', text) + for number in numbers: + text = text.replace(number, cn2an.an2cn(number), 1) + return text + + +def chinese_to_bopomofo(text): + from pypinyin import lazy_pinyin, BOPOMOFO + text = text.replace('、', ',').replace(';', ',').replace(':', ',') + words = jieba.lcut(text, cut_all=False) + text = '' + for word in words: + bopomofos = lazy_pinyin(word, BOPOMOFO) + if not re.search('[\u4e00-\u9fff]', word): + text += word + continue + for i in range(len(bopomofos)): + bopomofos[i] = re.sub(r'([\u3105-\u3129])$', r'\1ˉ', bopomofos[i]) + if text != '': + text += ' ' + text += ''.join(bopomofos) + return text + + +def latin_to_bopomofo(text): + for regex, replacement in _latin_to_bopomofo: + text = re.sub(regex, replacement, text) + return text + + +def bopomofo_to_romaji(text): + for regex, replacement in _bopomofo_to_romaji: + text = re.sub(regex, replacement, text) + return text + + +def bopomofo_to_ipa(text): + for regex, replacement in _bopomofo_to_ipa: + text = re.sub(regex, replacement, text) + return text + + +def bopomofo_to_ipa2(text): + for regex, replacement in _bopomofo_to_ipa2: + text = re.sub(regex, replacement, text) + return text + + +def chinese_to_romaji(text): + text = number_to_chinese(text) + text = chinese_to_bopomofo(text) + text = latin_to_bopomofo(text) + text = bopomofo_to_romaji(text) + text = re.sub('i([aoe])', r'y\1', text) + text = re.sub('u([aoəe])', r'w\1', text) + text = re.sub('([ʦsɹ]`[⁼ʰ]?)([→↓↑ ]+|$)', + r'\1ɹ`\2', text).replace('ɻ', 'ɹ`') + text = re.sub('([ʦs][⁼ʰ]?)([→↓↑ ]+|$)', r'\1ɹ\2', text) + return text + + +def chinese_to_lazy_ipa(text): + text = chinese_to_romaji(text) + for regex, replacement in _romaji_to_ipa: + text = re.sub(regex, replacement, text) + return text + + +def chinese_to_ipa(text): + text = number_to_chinese(text) + text = chinese_to_bopomofo(text) + text = latin_to_bopomofo(text) + text = bopomofo_to_ipa(text) + text = re.sub('i([aoe])', r'j\1', text) + text = re.sub('u([aoəe])', r'w\1', text) + text = re.sub('([sɹ]`[⁼ʰ]?)([→↓↑ ]+|$)', + r'\1ɹ`\2', text).replace('ɻ', 'ɹ`') + text = re.sub('([s][⁼ʰ]?)([→↓↑ ]+|$)', r'\1ɹ\2', text) + return text + + +def chinese_to_ipa2(text): + text = number_to_chinese(text) + text = chinese_to_bopomofo(text) + text = latin_to_bopomofo(text) + text = bopomofo_to_ipa2(text) + text = re.sub(r'i([aoe])', r'j\1', text) + text = re.sub(r'u([aoəe])', r'w\1', text) + text = re.sub(r'([ʂɹ]ʰ?)([˩˨˧˦˥ ]+|$)', r'\1ʅ\2', text) + text = re.sub(r'(sʰ?)([˩˨˧˦˥ ]+|$)', r'\1ɿ\2', text) + return text diff --git a/utils/g2p/symbols.py b/utils/g2p/symbols.py new file mode 100644 index 0000000000000000000000000000000000000000..789e9df25d3d93d1976ef22d15d77f51d170ed00 --- /dev/null +++ b/utils/g2p/symbols.py @@ -0,0 +1,76 @@ +''' +Defines the set of symbols used in text input to the model. +''' + +# japanese_cleaners +# _pad = '_' +# _punctuation = ',.!?-' +# _letters = 'AEINOQUabdefghijkmnoprstuvwyzʃʧ↓↑ ' + + +'''# japanese_cleaners2 +_pad = '_' +_punctuation = ',.!?-~…' +_letters = 'AEINOQUabdefghijkmnoprstuvwyzʃʧʦ↓↑ ' +''' + + +'''# korean_cleaners +_pad = '_' +_punctuation = ',.!?…~' +_letters = 'ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅋㅌㅍㅎㄲㄸㅃㅆㅉㅏㅓㅗㅜㅡㅣㅐㅔ ' +''' + +'''# chinese_cleaners +_pad = '_' +_punctuation = ',。!?—…' +_letters = 'ㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥㄦㄧㄨㄩˉˊˇˋ˙ ' +''' + +# # zh_ja_mixture_cleaners +# _pad = '_' +# _punctuation = ',.!?-~…' +# _letters = 'AEINOQUabdefghijklmnoprstuvwyzʃʧʦɯɹəɥ⁼ʰ`→↓↑ ' + + +'''# sanskrit_cleaners +_pad = '_' +_punctuation = '।' +_letters = 'ँंःअआइईउऊऋएऐओऔकखगघङचछजझञटठडढणतथदधनपफबभमयरलळवशषसहऽािीुूृॄेैोौ्ॠॢ ' +''' + +'''# cjks_cleaners +_pad = '_' +_punctuation = ',.!?-~…' +_letters = 'NQabdefghijklmnopstuvwxyzʃʧʥʦɯɹəɥçɸɾβŋɦː⁼ʰ`^#*=→↓↑ ' +''' + +'''# thai_cleaners +_pad = '_' +_punctuation = '.!? ' +_letters = 'กขฃคฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลวศษสหฬอฮฯะัาำิีึืุูเแโใไๅๆ็่้๊๋์' +''' + +# # cjke_cleaners2 +_pad = '_' +_punctuation = ',.!?-~…' +_letters = 'NQabdefghijklmnopstuvwxyzɑæʃʑçɯɪɔɛɹðəɫɥɸʊɾʒθβŋɦ⁼ʰ`^#*=ˈˌ→↓↑ ' + + +'''# shanghainese_cleaners +_pad = '_' +_punctuation = ',.!?…' +_letters = 'abdfghiklmnopstuvyzøŋȵɑɔɕəɤɦɪɿʑʔʰ̩̃ᴀᴇ15678 ' +''' + +'''# chinese_dialect_cleaners +_pad = '_' +_punctuation = ',.!?~…─' +_letters = '#Nabdefghijklmnoprstuvwxyzæçøŋœȵɐɑɒɓɔɕɗɘəɚɛɜɣɤɦɪɭɯɵɷɸɻɾɿʂʅʊʋʌʏʑʔʦʮʰʷˀː˥˦˧˨˩̥̩̃̚ᴀᴇ↑↓∅ⱼ ' +''' + +# Export all symbols: +symbols = [_pad] + list(_punctuation) + list(_letters) + +# Special symbol ids +SPACE_ID = symbols.index(" ") diff --git a/utils/g2p/vietnamese.py b/utils/g2p/vietnamese.py new file mode 100644 index 0000000000000000000000000000000000000000..ab6072604700212575b34afc7750f21018b7791f --- /dev/null +++ b/utils/g2p/vietnamese.py @@ -0,0 +1,6 @@ +from viphoneme import vi2IPA + + +def vietnamese_to_ipa(text): + text = vi2IPA(text) + return text.replace('...', '…') \ No newline at end of file diff --git a/utils/generation.py b/utils/generation.py new file mode 100644 index 0000000000000000000000000000000000000000..d58b0a961546638d9c8bc777c3cdc8d381db197a --- /dev/null +++ b/utils/generation.py @@ -0,0 +1,275 @@ +# coding: utf-8 +import os +import torch +from vocos import Vocos +import logging +import py3langid as langid +langid.set_languages(['en', 'zh', 'ja', 'vi']) + +import pathlib +import platform +if platform.system().lower() == 'windows': + temp = pathlib.PosixPath + pathlib.PosixPath = pathlib.WindowsPath +else: + temp = pathlib.WindowsPath + pathlib.WindowsPath = pathlib.PosixPath + +import numpy as np +from data.tokenizer import ( + AudioTokenizer, + tokenize_audio, +) +from data.collation import get_text_token_collater +from models.vallex import VALLE +from utils.g2p import PhonemeBpeTokenizer +from utils.sentence_cutter import split_text_into_sentences + +from macros import * + +device = torch.device("cpu") +if torch.cuda.is_available(): + device = torch.device("cuda", 0) + +url = 'https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt' + +checkpoints_dir = "/checkpoints/" + +model_checkpoint_name = "vallex-checkpoint.pt" + +model = None + +codec = None + +vocos = None + +text_tokenizer = PhonemeBpeTokenizer(tokenizer_path="/utils/g2p/bpe_175.json") +text_collater = get_text_token_collater() + +def preload_models(): + global model, codec, vocos + if not os.path.exists(checkpoints_dir): os.mkdir(checkpoints_dir) + if not os.path.exists(os.path.join(checkpoints_dir, model_checkpoint_name)): + import wget + try: + logging.info( + "Downloading model from https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt ...") + # download from https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt to ./checkpoints/vallex-checkpoint.pt + wget.download("https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt", + out="/checkpoints/vallex-checkpoint.pt", bar=wget.bar_adaptive) + except Exception as e: + logging.info(e) + raise Exception( + "\n Model weights download failed, please go to 'https://huggingface.co/Plachta/VALL-E-X/resolve/main/vallex-checkpoint.pt'" + "\n manually download model weights and put it to {} .".format(os.getcwd() + "\checkpoints")) + # VALL-E + model = VALLE( + N_DIM, + NUM_HEAD, + NUM_LAYERS, + norm_first=True, + add_prenet=False, + prefix_mode=PREFIX_MODE, + share_embedding=True, + nar_scale_factor=1.0, + prepend_bos=True, + num_quantizers=NUM_QUANTIZERS, + ).to(device) + checkpoint = torch.load(os.path.join(checkpoints_dir, model_checkpoint_name), map_location='cpu') + missing_keys, unexpected_keys = model.load_state_dict( + checkpoint["model"], strict=True + ) + assert not missing_keys + model.eval() + + # Encodec + codec = AudioTokenizer(device) + + vocos = Vocos.from_pretrained('charactr/vocos-encodec-24khz').to(device) + +@torch.no_grad() +def generate_audio(text, prompt=None, language='auto', accent='no-accent'): + global model, codec, vocos, text_tokenizer, text_collater + text = text.replace("\n", "").strip(" ") + # detect language + if language == "auto": + language = langid.classify(text)[0] + lang_token = lang2token[language] + lang = token2lang[lang_token] + text = lang_token + text + lang_token + + # load prompt + if prompt is not None: + prompt_path = prompt + if not os.path.exists(prompt_path): + prompt_path = "/presets/" + prompt + ".npz" + if not os.path.exists(prompt_path): + prompt_path = "/customs/" + prompt + ".npz" + if not os.path.exists(prompt_path): + raise ValueError(f"Cannot find prompt {prompt}") + prompt_data = np.load(prompt_path) + audio_prompts = prompt_data['audio_tokens'] + text_prompts = prompt_data['text_tokens'] + lang_pr = prompt_data['lang_code'] + lang_pr = code2lang[int(lang_pr)] + + # numpy to tensor + audio_prompts = torch.tensor(audio_prompts).type(torch.int32).to(device) + text_prompts = torch.tensor(text_prompts).type(torch.int32) + else: + audio_prompts = torch.zeros([1, 0, NUM_QUANTIZERS]).type(torch.int32).to(device) + text_prompts = torch.zeros([1, 0]).type(torch.int32) + lang_pr = lang if lang != 'mix' else 'en' + + enroll_x_lens = text_prompts.shape[-1] + logging.info(f"synthesize text: {text}") + phone_tokens, langs = text_tokenizer.tokenize(text=f"_{text}".strip()) + text_tokens, text_tokens_lens = text_collater( + [ + phone_tokens + ] + ) + text_tokens = torch.cat([text_prompts, text_tokens], dim=-1) + text_tokens_lens += enroll_x_lens + # accent control + lang = lang if accent == "no-accent" else token2lang[langdropdown2token[accent]] + encoded_frames = model.inference( + text_tokens.to(device), + text_tokens_lens.to(device), + audio_prompts, + enroll_x_lens=enroll_x_lens, + top_k=-100, + temperature=1, + prompt_language=lang_pr, + text_language=langs if accent == "no-accent" else lang, + ) + # Decode with Vocos + frames = encoded_frames.permute(2,0,1) + features = vocos.codes_to_features(frames) + samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device)) + + return samples.squeeze().cpu().numpy() + +@torch.no_grad() +def generate_audio_from_long_text(text, prompt=None, language='auto', accent='no-accent', mode='sliding-window'): + """ + For long audio generation, two modes are available. + fixed-prompt: This mode will keep using the same prompt the user has provided, and generate audio sentence by sentence. + sliding-window: This mode will use the last sentence as the prompt for the next sentence, but has some concern on speaker maintenance. + """ + global model, codec, vocos, text_tokenizer, text_collater + if prompt is None or prompt == "": + mode = 'sliding-window' # If no prompt is given, use sliding-window mode + sentences = split_text_into_sentences(text) + # detect language + if language == "auto": + language = langid.classify(text)[0] + + # if initial prompt is given, encode it + if prompt is not None and prompt != "": + prompt_path = prompt + if not os.path.exists(prompt_path): + prompt_path = "/presets/" + prompt + ".npz" + if not os.path.exists(prompt_path): + prompt_path = "/customs/" + prompt + ".npz" + if not os.path.exists(prompt_path): + raise ValueError(f"Cannot find prompt {prompt}") + prompt_data = np.load(prompt_path) + audio_prompts = prompt_data['audio_tokens'] + text_prompts = prompt_data['text_tokens'] + lang_pr = prompt_data['lang_code'] + lang_pr = code2lang[int(lang_pr)] + + # numpy to tensor + audio_prompts = torch.tensor(audio_prompts).type(torch.int32).to(device) + text_prompts = torch.tensor(text_prompts).type(torch.int32) + else: + audio_prompts = torch.zeros([1, 0, NUM_QUANTIZERS]).type(torch.int32).to(device) + text_prompts = torch.zeros([1, 0]).type(torch.int32) + lang_pr = language if language != 'mix' else 'en' + if mode == 'fixed-prompt': + complete_tokens = torch.zeros([1, NUM_QUANTIZERS, 0]).type(torch.LongTensor).to(device) + for text in sentences: + text = text.replace("\n", "").strip(" ") + if text == "": + continue + lang_token = lang2token[language] + lang = token2lang[lang_token] + text = lang_token + text + lang_token + + enroll_x_lens = text_prompts.shape[-1] + logging.info(f"synthesize text: {text}") + phone_tokens, langs = text_tokenizer.tokenize(text=f"_{text}".strip()) + text_tokens, text_tokens_lens = text_collater( + [ + phone_tokens + ] + ) + text_tokens = torch.cat([text_prompts, text_tokens], dim=-1) + text_tokens_lens += enroll_x_lens + # accent control + lang = lang if accent == "no-accent" else token2lang[langdropdown2token[accent]] + encoded_frames = model.inference( + text_tokens.to(device), + text_tokens_lens.to(device), + audio_prompts, + enroll_x_lens=enroll_x_lens, + top_k=-100, + temperature=1, + prompt_language=lang_pr, + text_language=langs if accent == "no-accent" else lang, + ) + complete_tokens = torch.cat([complete_tokens, encoded_frames.transpose(2, 1)], dim=-1) + # Decode with Vocos + frames = complete_tokens.permute(1,0,2) + features = vocos.codes_to_features(frames) + samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device)) + return samples.squeeze().cpu().numpy() + elif mode == "sliding-window": + complete_tokens = torch.zeros([1, NUM_QUANTIZERS, 0]).type(torch.LongTensor).to(device) + original_audio_prompts = audio_prompts + original_text_prompts = text_prompts + for text in sentences: + text = text.replace("\n", "").strip(" ") + if text == "": + continue + lang_token = lang2token[language] + lang = token2lang[lang_token] + text = lang_token + text + lang_token + + enroll_x_lens = text_prompts.shape[-1] + logging.info(f"synthesize text: {text}") + phone_tokens, langs = text_tokenizer.tokenize(text=f"_{text}".strip()) + text_tokens, text_tokens_lens = text_collater( + [ + phone_tokens + ] + ) + text_tokens = torch.cat([text_prompts, text_tokens], dim=-1) + text_tokens_lens += enroll_x_lens + # accent control + lang = lang if accent == "no-accent" else token2lang[langdropdown2token[accent]] + encoded_frames = model.inference( + text_tokens.to(device), + text_tokens_lens.to(device), + audio_prompts, + enroll_x_lens=enroll_x_lens, + top_k=-100, + temperature=1, + prompt_language=lang_pr, + text_language=langs if accent == "no-accent" else lang, + ) + complete_tokens = torch.cat([complete_tokens, encoded_frames.transpose(2, 1)], dim=-1) + if torch.rand(1) < 0.5: + audio_prompts = encoded_frames[:, :, -NUM_QUANTIZERS:] + text_prompts = text_tokens[:, enroll_x_lens:] + else: + audio_prompts = original_audio_prompts + text_prompts = original_text_prompts + # Decode with Vocos + frames = complete_tokens.permute(1,0,2) + features = vocos.codes_to_features(frames) + samples = vocos.decode(features, bandwidth_id=torch.tensor([2], device=device)) + return samples.squeeze().cpu().numpy() + else: + raise ValueError(f"No such mode {mode}") \ No newline at end of file diff --git a/utils/prompt_making.py b/utils/prompt_making.py new file mode 100644 index 0000000000000000000000000000000000000000..d72715475d22a6bdd2967ba899fedbdaa39e69d1 --- /dev/null +++ b/utils/prompt_making.py @@ -0,0 +1,116 @@ +import os +import torch +import torchaudio +import logging +import py3langid as langid +import whisper +langid.set_languages(['en', 'zh', 'ja', 'vi']) + +import numpy as np +from data.tokenizer import ( + AudioTokenizer, + tokenize_audio, +) +from data.collation import get_text_token_collater +from utils.g2p import PhonemeBpeTokenizer + +from macros import * + +text_tokenizer = PhonemeBpeTokenizer(tokenizer_path="/utils/g2p/bpe_175.json") +text_collater = get_text_token_collater() + +device = torch.device("cpu") +if torch.cuda.is_available(): + device = torch.device("cuda", 0) + +codec = AudioTokenizer(device) + +if not os.path.exists("/whisper/"): os.mkdir("/whisper/") +whisper_model = None + +@torch.no_grad() +def transcribe_one(model, audio_path): + # load audio and pad/trim it to fit 30 seconds + audio = whisper.load_audio(audio_path) + audio = whisper.pad_or_trim(audio) + + # make log-Mel spectrogram and move to the same device as the model + mel = whisper.log_mel_spectrogram(audio).to(model.device) + + # detect the spoken language + _, probs = model.detect_language(mel) + print(f"Detected language: {max(probs, key=probs.get)}") + lang = max(probs, key=probs.get) + # decode the audio + options = whisper.DecodingOptions(temperature=1.0, best_of=5, fp16=False if device == torch.device("cpu") else True, sample_len=150) + result = whisper.decode(model, mel, options) + + # print the recognized text + print(result.text) + + text_pr = result.text + if text_pr.strip(" ")[-1] not in "?!.,。,?!。、": + text_pr += "." + return lang, text_pr + +def make_prompt(name, audio_prompt_path, transcript=None): + global model, text_collater, text_tokenizer, codec + wav_pr, sr = torchaudio.load(audio_prompt_path) + # check length + if wav_pr.size(-1) / sr > 15: + raise ValueError(f"Prompt too long, expect length below 15 seconds, got {wav_pr / sr} seconds.") + if wav_pr.size(0) == 2: + wav_pr = wav_pr.mean(0, keepdim=True) + text_pr, lang_pr = make_transcript(name, wav_pr, sr, transcript) + + # tokenize audio + encoded_frames = tokenize_audio(codec, (wav_pr, sr)) + audio_tokens = encoded_frames[0][0].transpose(2, 1).cpu().numpy() + + # tokenize text + phonemes, langs = text_tokenizer.tokenize(text=f"{text_pr}".strip()) + text_tokens, enroll_x_lens = text_collater( + [ + phonemes + ] + ) + + message = f"Detected language: {lang_pr}\n Detected text {text_pr}\n" + + # save as npz file + save_path = os.path.join("/customs/", f"{name}.npz") + np.savez(save_path, audio_tokens=audio_tokens, text_tokens=text_tokens, lang_code=lang2code[lang_pr]) + logging.info(f"Successful. Prompt saved to {save_path}") + + +def make_transcript(name, wav, sr, transcript=None): + + if not isinstance(wav, torch.FloatTensor): + wav = torch.tensor(wav) + if wav.abs().max() > 1: + wav /= wav.abs().max() + if wav.size(-1) == 2: + wav = wav.mean(-1, keepdim=False) + if wav.ndim == 1: + wav = wav.unsqueeze(0) + assert wav.ndim and wav.size(0) == 1 + if transcript is None or transcript == "": + logging.info("Transcript not given, using Whisper...") + global whisper_model + if whisper_model is None: + whisper_model = whisper.load_model("medium", download_root=os.path.join(os.getcwd(), "whisper")) + whisper_model.to(device) + torchaudio.save(f"./prompts/{name}.wav", wav, sr) + lang, text = transcribe_one(whisper_model, f"./prompts/{name}.wav") + lang_token = lang2token[lang] + text = lang_token + text + lang_token + os.remove(f"./prompts/{name}.wav") + whisper_model.cpu() + else: + text = transcript + lang, _ = langid.classify(text) + lang_token = lang2token[lang] + text = lang_token + text + lang_token + + torch.cuda.empty_cache() + return text, lang \ No newline at end of file diff --git a/utils/sentence_cutter.py b/utils/sentence_cutter.py new file mode 100644 index 0000000000000000000000000000000000000000..bca6bf77905f51ea0efba08e9526a61a4b19af49 --- /dev/null +++ b/utils/sentence_cutter.py @@ -0,0 +1,59 @@ +import nltk +nltk.download('punkt_tab') +nltk.download('punkt') +nltk.download('wordnet') +nltk.download('omw-1.4') + +import jieba +import sudachipy +import py3langid as langid +langid.set_languages(['en', 'zh', 'ja', 'vi']) + +def split_text_into_sentences(text): + if langid.classify(text)[0] == "en": + sentences = nltk.tokenize.sent_tokenize(text) + + return sentences + elif langid.classify(text)[0] == "zh": + sentences = [] + segs = jieba.cut(text, cut_all=False) + segs = list(segs) + start = 0 + for i, seg in enumerate(segs): + if seg in ["。", "!", "?", "……"]: + sentences.append("".join(segs[start:i + 1])) + start = i + 1 + if start < len(segs): + sentences.append("".join(segs[start:])) + + return sentences + elif langid.classify(text)[0] == "ja": + sentences = [] + tokenizer = sudachipy.Dictionary().create() + tokens = tokenizer.tokenize(text) + current_sentence = "" + + for token in tokens: + current_sentence += token.surface() + if token.part_of_speech()[0] == "補助記号" and token.part_of_speech()[1] == "句点": + sentences.append(current_sentence) + current_sentence = "" + + if current_sentence: + sentences.append(current_sentence) + + return sentences + + raise RuntimeError("It is impossible to reach here.") + +long_text = """ +This is a very long paragraph, so most TTS model is unable to handle it. Hence, we have to split it into several sentences. With the help of NLTK, we can split it into sentences. However, the punctuation is not preserved, so we have to add it back. How are we going to do write this code? Let's see. +""" + +long_text = """ +现在我们要来尝试一下中文分句。因为很不幸的是,NLTK不支持中文分句。幸运的是,我们可以使用jieba来分句。但是,jieba分句后,标点符号会丢失,所以我们要手动添加回去。我现在正在想办法把这个例句写的更长更复杂一点,来测试jieba分句的性能。嗯......省略号,感觉不太好,因为省略号不是句号,所以jieba不会把它当作句子的结尾。会这样吗?我们来试试看。 +""" + +long_text = """ +これなら、英語と中国語の分句もできる。でも、日本語はどうする?まつわ、ChatGPTに僕と教えてください。ちょーと待ってください。あ、出来た! +""" \ No newline at end of file diff --git a/utils/symbol_table.py b/utils/symbol_table.py new file mode 100644 index 0000000000000000000000000000000000000000..e86c9eaa4cf5194858e93b564f61f4154eed1ce7 --- /dev/null +++ b/utils/symbol_table.py @@ -0,0 +1,287 @@ +# Copyright 2020 Mobvoi Inc. (authors: Fangjun Kuang) +# +# See ../../../LICENSE for clarification regarding multiple authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from dataclasses import dataclass +from dataclasses import field +from typing import Dict +from typing import Generic +from typing import List +from typing import Optional +from typing import TypeVar +from typing import Union + +Symbol = TypeVar('Symbol') + + +# Disable __repr__ otherwise it could freeze e.g. Jupyter. +@dataclass(repr=False) +class SymbolTable(Generic[Symbol]): + '''SymbolTable that maps symbol IDs, found on the FSA arcs to + actual objects. These objects can be arbitrary Python objects + that can serve as keys in a dictionary (i.e. they need to be + hashable and immutable). + + The SymbolTable can only be read to/written from disk if the + symbols are strings. + ''' + _id2sym: Dict[int, Symbol] = field(default_factory=dict) + '''Map an integer to a symbol. + ''' + + _sym2id: Dict[Symbol, int] = field(default_factory=dict) + '''Map a symbol to an integer. + ''' + + _next_available_id: int = 1 + '''A helper internal field that helps adding new symbols + to the table efficiently. + ''' + + eps: Symbol = '' + '''Null symbol, always mapped to index 0. + ''' + + def __post_init__(self): + for idx, sym in self._id2sym.items(): + assert self._sym2id[sym] == idx + assert idx >= 0 + + for sym, idx in self._sym2id.items(): + assert idx >= 0 + assert self._id2sym[idx] == sym + + if 0 not in self._id2sym: + self._id2sym[0] = self.eps + self._sym2id[self.eps] = 0 + else: + assert self._id2sym[0] == self.eps + assert self._sym2id[self.eps] == 0 + + self._next_available_id = max(self._id2sym) + 1 + + @staticmethod + def from_str(s: str) -> 'SymbolTable': + '''Build a symbol table from a string. + + The string consists of lines. Every line has two fields separated + by space(s), tab(s) or both. The first field is the symbol and the + second the integer id of the symbol. + + Args: + s: + The input string with the format described above. + Returns: + An instance of :class:`SymbolTable`. + ''' + id2sym: Dict[int, str] = dict() + sym2id: Dict[str, int] = dict() + + for line in s.split('\n'): + fields = line.split() + if len(fields) == 0: + continue # skip empty lines + assert len(fields) == 2, \ + f'Expect a line with 2 fields. Given: {len(fields)}' + sym, idx = fields[0], int(fields[1]) + assert sym not in sym2id, f'Duplicated symbol {sym}' + assert idx not in id2sym, f'Duplicated id {idx}' + id2sym[idx] = sym + sym2id[sym] = idx + + eps = id2sym.get(0, '') + + return SymbolTable(_id2sym=id2sym, _sym2id=sym2id, eps=eps) + + @staticmethod + def from_file(filename: str) -> 'SymbolTable': + '''Build a symbol table from file. + + Every line in the symbol table file has two fields separated by + space(s), tab(s) or both. The following is an example file: + + .. code-block:: + + 0 + a 1 + b 2 + c 3 + + Args: + filename: + Name of the symbol table file. Its format is documented above. + + Returns: + An instance of :class:`SymbolTable`. + + ''' + with open(filename, 'r', encoding='utf-8') as f: + return SymbolTable.from_str(f.read().strip()) + + def to_str(self) -> str: + ''' + Returns: + Return a string representation of this object. You can pass + it to the method ``from_str`` to recreate an identical object. + ''' + s = '' + for idx, symbol in sorted(self._id2sym.items()): + s += f'{symbol} {idx}\n' + return s + + def to_file(self, filename: str): + '''Serialize the SymbolTable to a file. + + Every line in the symbol table file has two fields separated by + space(s), tab(s) or both. The following is an example file: + + .. code-block:: + + 0 + a 1 + b 2 + c 3 + + Args: + filename: + Name of the symbol table file. Its format is documented above. + ''' + with open(filename, 'w', encoding='utf-8') as f: + for idx, symbol in sorted(self._id2sym.items()): + print(symbol, idx, file=f) + + def add(self, symbol: Symbol, index: Optional[int] = None) -> int: + '''Add a new symbol to the SymbolTable. + + Args: + symbol: + The symbol to be added. + index: + Optional int id to which the symbol should be assigned. + If it is not available, a ValueError will be raised. + + Returns: + The int id to which the symbol has been assigned. + ''' + # Already in the table? Return its ID. + if symbol in self._sym2id: + return self._sym2id[symbol] + # Specific ID not provided - use next available. + if index is None: + index = self._next_available_id + # Specific ID provided but not available. + if index in self._id2sym: + raise ValueError(f"Cannot assign id '{index}' to '{symbol}' - " + f"already occupied by {self._id2sym[index]}") + self._sym2id[symbol] = index + self._id2sym[index] = symbol + + # Update next available ID if needed + if self._next_available_id <= index: + self._next_available_id = index + 1 + + return index + + def get(self, k: Union[int, Symbol]) -> Union[Symbol, int]: + '''Get a symbol for an id or get an id for a symbol + + Args: + k: + If it is an id, it tries to find the symbol corresponding + to the id; if it is a symbol, it tries to find the id + corresponding to the symbol. + + Returns: + An id or a symbol depending on the given `k`. + ''' + if isinstance(k, int): + return self._id2sym[k] + else: + return self._sym2id[k] + + def merge(self, other: 'SymbolTable') -> 'SymbolTable': + '''Create a union of two SymbolTables. + Raises an AssertionError if the same IDs are occupied by + different symbols. + + Args: + other: + A symbol table to merge with ``self``. + + Returns: + A new symbol table. + ''' + self._check_compatible(other) + + id2sym = {**self._id2sym, **other._id2sym} + sym2id = {**self._sym2id, **other._sym2id} + + return SymbolTable(_id2sym=id2sym, _sym2id=sym2id, eps=self.eps) + + def _check_compatible(self, other: 'SymbolTable') -> None: + # Epsilon compatibility + assert self.eps == other.eps, f'Mismatched epsilon symbol: ' \ + f'{self.eps} != {other.eps}' + # IDs compatibility + common_ids = set(self._id2sym).intersection(other._id2sym) + for idx in common_ids: + assert self[idx] == other[idx], f'ID conflict for id: {idx}, ' \ + f'self[idx] = "{self[idx]}", ' \ + f'other[idx] = "{other[idx]}"' + # Symbols compatibility + common_symbols = set(self._sym2id).intersection(other._sym2id) + for sym in common_symbols: + assert self[sym] == other[sym], f'ID conflict for id: {sym}, ' \ + f'self[sym] = "{self[sym]}", ' \ + f'other[sym] = "{other[sym]}"' + + def __getitem__(self, item: Union[int, Symbol]) -> Union[Symbol, int]: + return self.get(item) + + def __contains__(self, item: Union[int, Symbol]) -> bool: + if isinstance(item, int): + return item in self._id2sym + else: + return item in self._sym2id + + def __len__(self) -> int: + return len(self._id2sym) + + def __eq__(self, other: 'SymbolTable') -> bool: + if len(self) != len(other): + return False + + for s in self.symbols: + if self[s] != other[s]: + return False + + return True + + @property + def ids(self) -> List[int]: + '''Returns a list of integer IDs corresponding to the symbols. + ''' + ans = list(self._id2sym.keys()) + ans.sort() + return ans + + @property + def symbols(self) -> List[Symbol]: + '''Returns a list of symbols (e.g., strings) corresponding to + the integer IDs. + ''' + ans = list(self._sym2id.keys()) + ans.sort() + return ans diff --git a/vall-e-x-fine-tune-for-vi.ipynb b/vall-e-x-fine-tune-for-vi.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..5e6e3898044932f1789276320ea63c8c8b10491a --- /dev/null +++ b/vall-e-x-fine-tune-for-vi.ipynb @@ -0,0 +1,928 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "6e3c72a5", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T11:48:16.063328Z", + "iopub.status.busy": "2024-10-18T11:48:16.062890Z", + "iopub.status.idle": "2024-10-18T11:48:17.059345Z", + "shell.execute_reply": "2024-10-18T11:48:17.058073Z" + }, + "papermill": { + "duration": 1.004239, + "end_time": "2024-10-18T11:48:17.061662", + "exception": false, + "start_time": "2024-10-18T11:48:16.057423", + "status": "completed" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "!rm -rf /kaggle/working/*" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "670bfb10", + "metadata": { + "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19", + "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5", + "execution": { + "iopub.execute_input": "2024-10-18T11:48:17.070672Z", + "iopub.status.busy": "2024-10-18T11:48:17.070323Z", + "iopub.status.idle": "2024-10-18T11:48:21.684129Z", + "shell.execute_reply": "2024-10-18T11:48:21.682796Z" + }, + "papermill": { + "duration": 4.621045, + "end_time": "2024-10-18T11:48:21.686673", + "exception": false, + "start_time": "2024-10-18T11:48:17.065628", + "status": "completed" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cloning into 'VALL_E_X'...\r\n", + "remote: Enumerating objects: 230, done.\u001b[K\r\n", + "remote: Counting objects: 100% (230/230), done.\u001b[K\r\n", + "remote: Compressing objects: 100% (189/189), done.\u001b[K\r\n", + "remote: Total 230 (delta 47), reused 214 (delta 31), pack-reused 0 (from 0)\u001b[K\r\n", + "Receiving objects: 100% (230/230), 15.25 MiB | 26.12 MiB/s, done.\r\n", + "Resolving deltas: 100% (47/47), done.\r\n", + "renamed '/kaggle/working/VALL_E_X/LICENSE' -> '/kaggle/working/LICENSE'\r\n", + "renamed '/kaggle/working/VALL_E_X/README.md' -> '/kaggle/working/README.md'\r\n", + "renamed '/kaggle/working/VALL_E_X/customs' -> '/kaggle/working/customs'\r\n", + "renamed '/kaggle/working/VALL_E_X/data' -> '/kaggle/working/data'\r\n", + "renamed '/kaggle/working/VALL_E_X/descriptions.py' -> '/kaggle/working/descriptions.py'\r\n", + "renamed '/kaggle/working/VALL_E_X/examples.py' -> '/kaggle/working/examples.py'\r\n", + "renamed '/kaggle/working/VALL_E_X/exp' -> '/kaggle/working/exp'\r\n", + "renamed '/kaggle/working/VALL_E_X/images' -> '/kaggle/working/images'\r\n", + "renamed '/kaggle/working/VALL_E_X/infer.ipynb' -> '/kaggle/working/infer.ipynb'\r\n", + "renamed '/kaggle/working/VALL_E_X/launch-ui.py' -> '/kaggle/working/launch-ui.py'\r\n", + "renamed '/kaggle/working/VALL_E_X/macros.py' -> '/kaggle/working/macros.py'\r\n", + "renamed '/kaggle/working/VALL_E_X/makedata.ipynb' -> '/kaggle/working/makedata.ipynb'\r\n", + "renamed '/kaggle/working/VALL_E_X/model-card.md' -> '/kaggle/working/model-card.md'\r\n", + "renamed '/kaggle/working/VALL_E_X/models' -> '/kaggle/working/models'\r\n", + "renamed '/kaggle/working/VALL_E_X/modules' -> '/kaggle/working/modules'\r\n", + "renamed '/kaggle/working/VALL_E_X/nltk_data' -> '/kaggle/working/nltk_data'\r\n", + "renamed '/kaggle/working/VALL_E_X/presets' -> '/kaggle/working/presets'\r\n", + "renamed '/kaggle/working/VALL_E_X/prompts' -> '/kaggle/working/prompts'\r\n", + "renamed '/kaggle/working/VALL_E_X/requirements.txt' -> '/kaggle/working/requirements.txt'\r\n", + "renamed '/kaggle/working/VALL_E_X/test.py' -> '/kaggle/working/test.py'\r\n", + "renamed '/kaggle/working/VALL_E_X/train.py' -> '/kaggle/working/train.py'\r\n", + "renamed '/kaggle/working/VALL_E_X/train_utils' -> '/kaggle/working/train_utils'\r\n", + "renamed '/kaggle/working/VALL_E_X/utils' -> '/kaggle/working/utils'\r\n" + ] + } + ], + "source": [ + "!git clone https://github.com/windymv025/VALL_E_X.git\n", + "!mv -v /kaggle/working/VALL_E_X/* /kaggle/working/\n", + "!rm -rf VALL_E_X" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "aee02f01", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T11:48:21.699113Z", + "iopub.status.busy": "2024-10-18T11:48:21.698730Z", + "iopub.status.idle": "2024-10-18T11:49:19.670857Z", + "shell.execute_reply": "2024-10-18T11:49:19.669797Z" + }, + "papermill": { + "duration": 57.981266, + "end_time": "2024-10-18T11:49:19.673452", + "exception": false, + "start_time": "2024-10-18T11:48:21.692186", + "status": "completed" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "!pip install -q -r requirements.txt" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "d6e3a184", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T11:49:19.685851Z", + "iopub.status.busy": "2024-10-18T11:49:19.685509Z", + "iopub.status.idle": "2024-10-18T11:49:19.690359Z", + "shell.execute_reply": "2024-10-18T11:49:19.689598Z" + }, + "papermill": { + "duration": 0.013814, + "end_time": "2024-10-18T11:49:19.692777", + "exception": false, + "start_time": "2024-10-18T11:49:19.678963", + "status": "completed" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "input_dataset_path = '/kaggle/input/vivos-vietnamese-speech-dataset-ljspeech-format/vivos'\n", + "input_train_path = f'{input_dataset_path}/train'\n", + "input_test_path = f'{input_dataset_path}/test'\n", + "prompt_file_name = 'audio_ann_sum.txt'\n", + "\n", + "# dataset_path = 'vivos_datasets'\n", + "# train_path = f'{dataset_path}/train'\n", + "# test_path = f'{dataset_path}/test'" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "9793eb64", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T11:49:19.704857Z", + "iopub.status.busy": "2024-10-18T11:49:19.704573Z", + "iopub.status.idle": "2024-10-18T11:49:21.671192Z", + "shell.execute_reply": "2024-10-18T11:49:21.670080Z" + }, + "papermill": { + "duration": 1.975192, + "end_time": "2024-10-18T11:49:21.673667", + "exception": false, + "start_time": "2024-10-18T11:49:19.698475", + "status": "completed" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mkdir: missing operand\r\n", + "Try 'mkdir --help' for more information.\r\n", + "mkdir: missing operand\r\n", + "Try 'mkdir --help' for more information.\r\n" + ] + } + ], + "source": [ + "!mkdir -p $train_path\n", + "!mkdir -p $test_path" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "ff3ece1b", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T11:49:21.687532Z", + "iopub.status.busy": "2024-10-18T11:49:21.687180Z", + "iopub.status.idle": "2024-10-18T11:49:26.076048Z", + "shell.execute_reply": "2024-10-18T11:49:26.075068Z" + }, + "papermill": { + "duration": 4.398011, + "end_time": "2024-10-18T11:49:26.078461", + "exception": false, + "start_time": "2024-10-18T11:49:21.680450", + "status": "completed" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "import shutil\n", + "import os\n", + "import h5py\n", + "import glob\n", + "import torch\n", + "import torchaudio\n", + "\n", + "# import torch_xla\n", + "# import torch_xla.core.xla_model as xm\n", + "\n", + "# print(f'PyTorch can access {xm.xla_device()} TPU cores')\n", + "# tpu_device = xm.xla_device()\n", + "\n", + "# torch_xla.device_count()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "900540c2", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T11:49:26.091112Z", + "iopub.status.busy": "2024-10-18T11:49:26.090666Z", + "iopub.status.idle": "2024-10-18T11:50:00.674322Z", + "shell.execute_reply": "2024-10-18T11:50:00.673279Z" + }, + "papermill": { + "duration": 34.592637, + "end_time": "2024-10-18T11:50:00.676891", + "exception": false, + "start_time": "2024-10-18T11:49:26.084254", + "status": "completed" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Downloading...\r\n", + "From (original): https://drive.google.com/uc?id=10gdQWvP-K_e1undkvv0p2b7SU6I4Egyl\r\n", + "From (redirected): https://drive.google.com/uc?id=10gdQWvP-K_e1undkvv0p2b7SU6I4Egyl&confirm=t&uuid=da3af224-2df8-4b61-b5f0-74a8f0598aef\r\n", + "To: /kaggle/working/vallex-checkpoint.pt\r\n", + "100%|██████████████████████████████████████| 1.48G/1.48G [00:16<00:00, 89.8MB/s]\r\n" + ] + } + ], + "source": [ + "!pip install -q gdown\n", + "!gdown 10gdQWvP-K_e1undkvv0p2b7SU6I4Egyl" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "06666c0f", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T11:50:00.704880Z", + "iopub.status.busy": "2024-10-18T11:50:00.704061Z", + "iopub.status.idle": "2024-10-18T11:50:04.862134Z", + "shell.execute_reply": "2024-10-18T11:50:04.860704Z" + }, + "papermill": { + "duration": 4.174612, + "end_time": "2024-10-18T11:50:04.864561", + "exception": false, + "start_time": "2024-10-18T11:50:00.689949", + "status": "completed" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "!mkdir -p checkpoints\n", + "!cp vallex-checkpoint.pt checkpoints/vallex-checkpoint_modified.pt\n", + "!mv vallex-checkpoint.pt checkpoints/vallex-checkpoint.pt" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "a110952f", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T11:50:04.893717Z", + "iopub.status.busy": "2024-10-18T11:50:04.893349Z", + "iopub.status.idle": "2024-10-18T11:50:04.897543Z", + "shell.execute_reply": "2024-10-18T11:50:04.896741Z" + }, + "papermill": { + "duration": 0.02051, + "end_time": "2024-10-18T11:50:04.899480", + "exception": false, + "start_time": "2024-10-18T11:50:04.878970", + "status": "completed" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "# !python -X utf8 launch-ui.py\n", + "# --keep-last-k 2 \\" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "e5244bba", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T11:50:04.925704Z", + "iopub.status.busy": "2024-10-18T11:50:04.925397Z", + "iopub.status.idle": "2024-10-18T13:49:31.548142Z", + "shell.execute_reply": "2024-10-18T13:49:31.546830Z" + }, + "papermill": { + "duration": 7166.640325, + "end_time": "2024-10-18T13:49:31.552320", + "exception": false, + "start_time": "2024-10-18T11:50:04.911995", + "status": "completed" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Operating System: Linux\r\n", + "Downloading: \"https://dl.fbaipublicfiles.com/encodec/v0/encodec_24khz-d7cc33bc.th\" to /root/.cache/torch/hub/checkpoints/encodec_24khz-d7cc33bc.th\r\n", + "100%|███████████████████████████████████████| 88.9M/88.9M [00:00<00:00, 179MB/s]\r\n", + "2024-10-18 11:50:35,401 INFO [train.py:861] Training started\r\n", + "2024-10-18 11:50:35,402 INFO [train.py:880] Device: cuda:0\r\n", + "2024-10-18 11:50:35,403 INFO [train.py:881] {'best_train_loss': inf, 'best_valid_loss': inf, 'best_train_epoch': -1, 'best_valid_epoch': -1, 'batch_idx_train': 0, 'log_interval': 100, 'reset_interval': 200, 'valid_interval': 10000, 'world_size': 1, 'master_port': 12354, 'tensorboard': True, 'num_epochs': 100, 'start_epoch': 1, 'start_batch': 0, 'exp_dir': PosixPath('exp/valle_dev'), 'optimizer_name': 'ScaledAdam', 'scheduler_name': 'Eden', 'base_lr': 0.005, 'warmup_steps': 200, 'seed': 42, 'inf_check': False, 'save_every_n': 10, 'keep_last_k': 2, 'average_period': 0, 'accumulate_grad_steps': 1, 'dtype': 'bfloat16', 'filter_min_duration': 0.0, 'filter_max_duration': 20.0, 'train_stage': 0, 'visualize': True, 'oom_check': True, 'train_dir': '/kaggle/input/vivos-vietnamese-speech-dataset-ljspeech-format/vivos/train', 'valid_dir': '/kaggle/input/vivos-vietnamese-speech-dataset-ljspeech-format/vivos/test', 'checkpoint_path': None, 'model_name': 'VALL-E', 'decoder_dim': 1024, 'nhead': 16, 'num_decoder_layers': 12, 'scale_factor': 1.0, 'norm_first': True, 'add_prenet': False, 'prefix_mode': 0, 'share_embedding': True, 'prepend_bos': False, 'num_quantizers': 8, 'scaling_xformers': False}\r\n", + "2024-10-18 11:50:35,403 INFO [train.py:883] About to create model\r\n", + "config.yaml: 100%|█████████████████████████████| 503/503 [00:00<00:00, 3.24MB/s]\r\n", + "pytorch_model.bin: 100%|████████████████████| 40.4M/40.4M [00:00<00:00, 174MB/s]\r\n", + "2024-10-18 11:50:39,524 INFO [train.py:887] Number of model parameters: 370539524\r\n", + "2024-10-18 11:50:51,676 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-10.pt\r\n", + "2024-10-18 11:51:09,403 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-20.pt\r\n", + "2024-10-18 11:51:27,320 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-30.pt\r\n", + "2024-10-18 11:51:45,896 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-40.pt\r\n", + "2024-10-18 11:52:08,375 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-50.pt\r\n", + "2024-10-18 11:52:33,732 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-60.pt\r\n", + "2024-10-18 11:52:52,032 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-70.pt\r\n", + "2024-10-18 11:53:10,370 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-80.pt\r\n", + "2024-10-18 11:53:28,424 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-90.pt\r\n", + "2024-10-18 11:53:56,977 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-100.pt\r\n", + "2024-10-18 11:54:06,210 INFO [train.py:774] Epoch 1, batch 100, train_loss[loss=3.156, ArTop10Accuracy=0.7427, NarTop10Accuracy=0.6508, over 991.00 frames. ], tot_loss[loss=3.339, ArTop10Accuracy=0.7312, NarTop10Accuracy=0.5875, over 444.10 frames. ], batch size: 4, lr: 3.75e-03\r\n", + "2024-10-18 11:54:15,313 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-110.pt\r\n", + "2024-10-18 11:54:43,755 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-120.pt\r\n", + "2024-10-18 11:55:02,218 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-130.pt\r\n", + "2024-10-18 11:55:20,752 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-140.pt\r\n", + "2024-10-18 11:55:39,342 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-150.pt\r\n", + "2024-10-18 11:55:58,052 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-160.pt\r\n", + "2024-10-18 11:56:18,573 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-170.pt\r\n", + "2024-10-18 11:56:36,762 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-180.pt\r\n", + "2024-10-18 11:56:55,045 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-190.pt\r\n", + "2024-10-18 11:57:17,998 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-200.pt\r\n", + "2024-10-18 11:57:26,861 INFO [train.py:774] Epoch 1, batch 200, train_loss[loss=3.178, ArTop10Accuracy=0.7536, NarTop10Accuracy=0.5949, over 1319.00 frames. ], tot_loss[loss=3.276, ArTop10Accuracy=0.7475, NarTop10Accuracy=0.5947, over 720.18 frames. ], batch size: 5, lr: 5.00e-03\r\n", + "2024-10-18 11:57:35,984 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-210.pt\r\n", + "2024-10-18 11:57:57,868 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-220.pt\r\n", + "2024-10-18 11:58:25,855 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-230.pt\r\n", + "2024-10-18 11:58:44,087 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-240.pt\r\n", + "2024-10-18 11:59:02,328 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-250.pt\r\n", + "2024-10-18 11:59:24,312 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-260.pt\r\n", + "2024-10-18 11:59:42,035 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-270.pt\r\n", + "2024-10-18 12:00:02,784 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-280.pt\r\n", + "2024-10-18 12:00:21,521 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-290.pt\r\n", + "2024-10-18 12:00:39,680 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-300.pt\r\n", + "2024-10-18 12:00:51,542 INFO [train.py:774] Epoch 1, batch 300, train_loss[loss=3.129, ArTop10Accuracy=0.8019, NarTop10Accuracy=0.6124, over 1141.00 frames. ], tot_loss[loss=3.284, ArTop10Accuracy=0.7595, NarTop10Accuracy=0.5824, over 899.16 frames. ], batch size: 3, lr: 5.00e-03\r\n", + "2024-10-18 12:01:10,918 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-310.pt\r\n", + "2024-10-18 12:01:29,341 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-320.pt\r\n", + "2024-10-18 12:01:47,348 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-330.pt\r\n", + "2024-10-18 12:02:08,142 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-340.pt\r\n", + "2024-10-18 12:02:30,763 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-350.pt\r\n", + "2024-10-18 12:02:51,610 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-360.pt\r\n", + "2024-10-18 12:03:12,278 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-370.pt\r\n", + "2024-10-18 12:03:31,046 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-380.pt\r\n", + "2024-10-18 12:03:49,715 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-390.pt\r\n", + "2024-10-18 12:04:10,058 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-400.pt\r\n", + "2024-10-18 12:04:23,527 INFO [train.py:774] Epoch 1, batch 400, train_loss[loss=3.847, ArTop10Accuracy=0.7003, NarTop10Accuracy=0.4367, over 1161.00 frames. ], tot_loss[loss=3.301, ArTop10Accuracy=0.7644, NarTop10Accuracy=0.5705, over 1001.79 frames. ], batch size: 2, lr: 4.99e-03\r\n", + "2024-10-18 12:04:33,233 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-410.pt\r\n", + "2024-10-18 12:04:50,999 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-420.pt\r\n", + "2024-10-18 12:05:09,454 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-430.pt\r\n", + "2024-10-18 12:05:31,430 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-440.pt\r\n", + "2024-10-18 12:05:52,910 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-450.pt\r\n", + "2024-10-18 12:06:15,441 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-460.pt\r\n", + "2024-10-18 12:06:33,508 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-470.pt\r\n", + "2024-10-18 12:06:55,605 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-480.pt\r\n", + "2024-10-18 12:07:17,199 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-490.pt\r\n", + "2024-10-18 12:07:42,724 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-500.pt\r\n", + "2024-10-18 12:07:52,702 INFO [train.py:774] Epoch 1, batch 500, train_loss[loss=2.661, ArTop10Accuracy=0.8497, NarTop10Accuracy=0.6367, over 858.00 frames. ], tot_loss[loss=3.297, ArTop10Accuracy=0.7702, NarTop10Accuracy=0.5653, over 1055.81 frames. ], batch size: 1, lr: 4.99e-03\r\n", + "2024-10-18 12:08:01,968 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-510.pt\r\n", + "2024-10-18 12:08:32,336 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-520.pt\r\n", + "2024-10-18 12:08:51,493 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-530.pt\r\n", + "2024-10-18 12:09:10,769 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-540.pt\r\n", + "2024-10-18 12:09:29,322 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-550.pt\r\n", + "2024-10-18 12:09:47,394 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-560.pt\r\n", + "2024-10-18 12:10:05,328 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-570.pt\r\n", + "2024-10-18 12:10:23,755 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-580.pt\r\n", + "2024-10-18 12:10:45,250 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-590.pt\r\n", + "2024-10-18 12:11:05,189 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-600.pt\r\n", + "2024-10-18 12:11:17,042 INFO [train.py:774] Epoch 1, batch 600, train_loss[loss=3.634, ArTop10Accuracy=0.7451, NarTop10Accuracy=0.4745, over 1334.00 frames. ], tot_loss[loss=3.297, ArTop10Accuracy=0.773, NarTop10Accuracy=0.5634, over 1088.47 frames. ], batch size: 5, lr: 4.98e-03\r\n", + "2024-10-18 12:11:25,469 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-610.pt\r\n", + "2024-10-18 12:11:44,686 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-620.pt\r\n", + "2024-10-18 12:12:13,647 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-630.pt\r\n", + "2024-10-18 12:12:32,573 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-640.pt\r\n", + "2024-10-18 12:12:51,311 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-650.pt\r\n", + "2024-10-18 12:13:09,299 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-660.pt\r\n", + "2024-10-18 12:13:27,208 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-670.pt\r\n", + "2024-10-18 12:13:48,102 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-680.pt\r\n", + "2024-10-18 12:14:06,664 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-690.pt\r\n", + "2024-10-18 12:14:38,245 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-700.pt\r\n", + "2024-10-18 12:14:47,729 INFO [train.py:774] Epoch 1, batch 700, train_loss[loss=3.533, ArTop10Accuracy=0.7197, NarTop10Accuracy=0.534, over 1295.00 frames. ], tot_loss[loss=3.283, ArTop10Accuracy=0.7767, NarTop10Accuracy=0.5662, over 1116.67 frames. ], batch size: 3, lr: 4.98e-03\r\n", + "2024-10-18 12:14:56,907 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-710.pt\r\n", + "2024-10-18 12:15:14,678 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-720.pt\r\n", + "2024-10-18 12:15:34,418 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-730.pt\r\n", + "2024-10-18 12:16:04,540 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-740.pt\r\n", + "2024-10-18 12:16:24,713 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-750.pt\r\n", + "2024-10-18 12:16:56,082 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-760.pt\r\n", + "2024-10-18 12:17:14,990 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-770.pt\r\n", + "2024-10-18 12:17:34,199 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-780.pt\r\n", + "2024-10-18 12:17:53,479 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-790.pt\r\n", + "2024-10-18 12:18:11,992 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-800.pt\r\n", + "2024-10-18 12:18:21,072 INFO [train.py:774] Epoch 1, batch 800, train_loss[loss=3.517, ArTop10Accuracy=0.7732, NarTop10Accuracy=0.4902, over 1054.00 frames. ], tot_loss[loss=3.275, ArTop10Accuracy=0.7812, NarTop10Accuracy=0.565, over 1138.05 frames. ], batch size: 4, lr: 4.97e-03\r\n", + "2024-10-18 12:18:30,704 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-810.pt\r\n", + "2024-10-18 12:18:48,903 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-820.pt\r\n", + "2024-10-18 12:19:06,523 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-830.pt\r\n", + "2024-10-18 12:19:26,557 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-840.pt\r\n", + "2024-10-18 12:19:45,502 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-850.pt\r\n", + "2024-10-18 12:20:04,069 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-860.pt\r\n", + "2024-10-18 12:20:22,036 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-870.pt\r\n", + "2024-10-18 12:20:54,976 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-880.pt\r\n", + "2024-10-18 12:21:13,593 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-890.pt\r\n", + "2024-10-18 12:21:32,563 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-900.pt\r\n", + "2024-10-18 12:21:41,335 INFO [train.py:774] Epoch 1, batch 900, train_loss[loss=3.443, ArTop10Accuracy=0.7763, NarTop10Accuracy=0.5095, over 1323.00 frames. ], tot_loss[loss=3.282, ArTop10Accuracy=0.7819, NarTop10Accuracy=0.5621, over 1136.99 frames. ], batch size: 6, lr: 4.96e-03\r\n", + "2024-10-18 12:21:51,764 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-910.pt\r\n", + "2024-10-18 12:22:22,454 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-920.pt\r\n", + "2024-10-18 12:22:40,903 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-930.pt\r\n", + "2024-10-18 12:22:59,821 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-940.pt\r\n", + "2024-10-18 12:23:19,585 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-950.pt\r\n", + "2024-10-18 12:23:38,571 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-960.pt\r\n", + "2024-10-18 12:23:59,206 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-970.pt\r\n", + "2024-10-18 12:24:19,152 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-980.pt\r\n", + "2024-10-18 12:24:37,915 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-990.pt\r\n", + "2024-10-18 12:24:57,044 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1000.pt\r\n", + "2024-10-18 12:25:06,750 INFO [train.py:774] Epoch 1, batch 1000, train_loss[loss=3.65, ArTop10Accuracy=0.7215, NarTop10Accuracy=0.5005, over 1185.00 frames. ], tot_loss[loss=3.298, ArTop10Accuracy=0.7809, NarTop10Accuracy=0.5582, over 1152.85 frames. ], batch size: 5, lr: 4.95e-03\r\n", + "2024-10-18 12:25:08,028 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 3.245e+01 5.003e+01 5.612e+01 6.476e+01 1.276e+02, threshold=1.122e+02, percent-clipped=0.0\r\n", + "2024-10-18 12:25:28,894 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1010.pt\r\n", + "2024-10-18 12:25:48,507 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1020.pt\r\n", + "2024-10-18 12:26:07,339 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1030.pt\r\n", + "2024-10-18 12:26:25,959 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1040.pt\r\n", + "2024-10-18 12:26:55,262 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1050.pt\r\n", + "2024-10-18 12:27:14,875 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1060.pt\r\n", + "2024-10-18 12:27:33,949 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1070.pt\r\n", + "2024-10-18 12:27:57,193 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1080.pt\r\n", + "2024-10-18 12:28:19,973 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1090.pt\r\n", + "2024-10-18 12:28:37,820 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1100.pt\r\n", + "2024-10-18 12:28:50,034 INFO [train.py:774] Epoch 1, batch 1100, train_loss[loss=3.756, ArTop10Accuracy=0.7481, NarTop10Accuracy=0.4023, over 1199.00 frames. ], tot_loss[loss=3.299, ArTop10Accuracy=0.7824, NarTop10Accuracy=0.5568, over 1162.96 frames. ], batch size: 3, lr: 4.94e-03\r\n", + "2024-10-18 12:29:00,331 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1110.pt\r\n", + "2024-10-18 12:29:24,861 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1120.pt\r\n", + "2024-10-18 12:29:43,679 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1130.pt\r\n", + "2024-10-18 12:30:12,036 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1140.pt\r\n", + "2024-10-18 12:30:30,831 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1150.pt\r\n", + "2024-10-18 12:30:49,142 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1160.pt\r\n", + "2024-10-18 12:31:11,528 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1170.pt\r\n", + "2024-10-18 12:31:33,167 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1180.pt\r\n", + "2024-10-18 12:31:55,606 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1190.pt\r\n", + "2024-10-18 12:32:18,897 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1200.pt\r\n", + "2024-10-18 12:32:28,516 INFO [train.py:774] Epoch 1, batch 1200, train_loss[loss=3.386, ArTop10Accuracy=0.7247, NarTop10Accuracy=0.6049, over 1246.00 frames. ], tot_loss[loss=3.286, ArTop10Accuracy=0.7832, NarTop10Accuracy=0.5599, over 1157.58 frames. ], batch size: 3, lr: 4.93e-03\r\n", + "2024-10-18 12:32:37,427 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1210.pt\r\n", + "2024-10-18 12:32:56,564 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1220.pt\r\n", + "2024-10-18 12:33:16,694 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1230.pt\r\n", + "2024-10-18 12:33:46,781 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1240.pt\r\n", + "2024-10-18 12:34:05,399 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1250.pt\r\n", + "2024-10-18 12:34:32,676 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1260.pt\r\n", + "2024-10-18 12:34:51,303 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1270.pt\r\n", + "2024-10-18 12:35:09,644 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1280.pt\r\n", + "2024-10-18 12:35:28,364 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1290.pt\r\n", + "2024-10-18 12:35:49,446 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1300.pt\r\n", + "2024-10-18 12:35:58,720 INFO [train.py:774] Epoch 1, batch 1300, train_loss[loss=2.983, ArTop10Accuracy=0.8195, NarTop10Accuracy=0.6625, over 1202.00 frames. ], tot_loss[loss=3.287, ArTop10Accuracy=0.7828, NarTop10Accuracy=0.5606, over 1161.95 frames. ], batch size: 5, lr: 4.92e-03\r\n", + "2024-10-18 12:36:08,326 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1310.pt\r\n", + "2024-10-18 12:36:34,656 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1320.pt\r\n", + "2024-10-18 12:36:53,403 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1330.pt\r\n", + "2024-10-18 12:37:12,072 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1340.pt\r\n", + "2024-10-18 12:37:30,308 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1350.pt\r\n", + "2024-10-18 12:38:06,730 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1360.pt\r\n", + "2024-10-18 12:38:25,110 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1370.pt\r\n", + "2024-10-18 12:38:44,039 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1380.pt\r\n", + "2024-10-18 12:39:02,893 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1390.pt\r\n", + "2024-10-18 12:39:20,715 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1400.pt\r\n", + "2024-10-18 12:39:29,924 INFO [train.py:774] Epoch 1, batch 1400, train_loss[loss=3.524, ArTop10Accuracy=0.741, NarTop10Accuracy=0.5082, over 1112.00 frames. ], tot_loss[loss=3.287, ArTop10Accuracy=0.7829, NarTop10Accuracy=0.5594, over 1152.10 frames. ], batch size: 4, lr: 4.91e-03\r\n", + "2024-10-18 12:39:38,786 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1410.pt\r\n", + "2024-10-18 12:39:57,127 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1420.pt\r\n", + "2024-10-18 12:40:18,678 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1430.pt\r\n", + "2024-10-18 12:40:41,099 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1440.pt\r\n", + "2024-10-18 12:40:59,509 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1450.pt\r\n", + "2024-10-18 12:41:24,433 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1460.pt\r\n", + "2024-10-18 12:41:43,381 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1470.pt\r\n", + "2024-10-18 12:42:02,083 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1480.pt\r\n", + "2024-10-18 12:42:21,170 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1490.pt\r\n", + "2024-10-18 12:42:39,813 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1500.pt\r\n", + "2024-10-18 12:42:49,093 INFO [train.py:774] Epoch 1, batch 1500, train_loss[loss=2.999, ArTop10Accuracy=0.8037, NarTop10Accuracy=0.6299, over 1228.00 frames. ], tot_loss[loss=3.272, ArTop10Accuracy=0.7865, NarTop10Accuracy=0.5621, over 1148.42 frames. ], batch size: 5, lr: 4.89e-03\r\n", + "2024-10-18 12:42:58,447 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1510.pt\r\n", + "2024-10-18 12:43:17,270 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1520.pt\r\n", + "2024-10-18 12:43:35,191 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1530.pt\r\n", + "2024-10-18 12:43:54,065 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1540.pt\r\n", + "2024-10-18 12:44:12,620 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1550.pt\r\n", + "2024-10-18 12:44:31,212 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1560.pt\r\n", + "2024-10-18 12:44:49,152 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1570.pt\r\n", + "2024-10-18 12:45:09,646 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1580.pt\r\n", + "2024-10-18 12:45:31,699 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1590.pt\r\n", + "2024-10-18 12:45:54,783 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1600.pt\r\n", + "2024-10-18 12:46:07,955 INFO [train.py:774] Epoch 1, batch 1600, train_loss[loss=3.369, ArTop10Accuracy=0.8038, NarTop10Accuracy=0.5128, over 1417.00 frames. ], tot_loss[loss=3.277, ArTop10Accuracy=0.7859, NarTop10Accuracy=0.5609, over 1148.74 frames. ], batch size: 4, lr: 4.88e-03\r\n", + "2024-10-18 12:46:18,034 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1610.pt\r\n", + "2024-10-18 12:46:37,391 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1620.pt\r\n", + "2024-10-18 12:46:55,874 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1630.pt\r\n", + "2024-10-18 12:47:14,534 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1640.pt\r\n", + "2024-10-18 12:47:34,239 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1650.pt\r\n", + "2024-10-18 12:47:58,533 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1660.pt\r\n", + "2024-10-18 12:48:17,331 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1670.pt\r\n", + "2024-10-18 12:48:35,091 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1680.pt\r\n", + "2024-10-18 12:48:53,177 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1690.pt\r\n", + "2024-10-18 12:49:12,166 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1700.pt\r\n", + "2024-10-18 12:49:21,346 INFO [train.py:774] Epoch 1, batch 1700, train_loss[loss=3.178, ArTop10Accuracy=0.7873, NarTop10Accuracy=0.6002, over 1072.00 frames. ], tot_loss[loss=3.275, ArTop10Accuracy=0.7868, NarTop10Accuracy=0.56, over 1150.36 frames. ], batch size: 2, lr: 4.87e-03\r\n", + "2024-10-18 12:49:30,173 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1710.pt\r\n", + "2024-10-18 12:49:47,957 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1720.pt\r\n", + "2024-10-18 12:50:05,787 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1730.pt\r\n", + "2024-10-18 12:50:24,988 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1740.pt\r\n", + "2024-10-18 12:50:42,569 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1750.pt\r\n", + "2024-10-18 12:51:01,572 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1760.pt\r\n", + "2024-10-18 12:51:20,385 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1770.pt\r\n", + "2024-10-18 12:51:38,385 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1780.pt\r\n", + "2024-10-18 12:51:56,183 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1790.pt\r\n", + "2024-10-18 12:52:22,902 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1800.pt\r\n", + "2024-10-18 12:52:32,110 INFO [train.py:774] Epoch 1, batch 1800, train_loss[loss=3.588, ArTop10Accuracy=0.7692, NarTop10Accuracy=0.4603, over 1252.00 frames. ], tot_loss[loss=3.256, ArTop10Accuracy=0.7894, NarTop10Accuracy=0.5633, over 1140.03 frames. ], batch size: 3, lr: 4.85e-03\r\n", + "2024-10-18 12:52:51,981 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1810.pt\r\n", + "2024-10-18 12:53:09,856 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1820.pt\r\n", + "2024-10-18 12:53:28,248 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1830.pt\r\n", + "2024-10-18 12:53:46,955 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1840.pt\r\n", + "2024-10-18 12:54:09,462 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1850.pt\r\n", + "2024-10-18 12:54:29,080 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1860.pt\r\n", + "2024-10-18 12:54:47,545 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1870.pt\r\n", + "2024-10-18 12:55:06,285 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1880.pt\r\n", + "2024-10-18 12:55:25,300 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1890.pt\r\n", + "2024-10-18 12:55:44,141 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1900.pt\r\n", + "2024-10-18 12:55:53,118 INFO [train.py:774] Epoch 1, batch 1900, train_loss[loss=3.194, ArTop10Accuracy=0.7953, NarTop10Accuracy=0.5671, over 1158.00 frames. ], tot_loss[loss=3.265, ArTop10Accuracy=0.7882, NarTop10Accuracy=0.5627, over 1149.25 frames. ], batch size: 3, lr: 4.83e-03\r\n", + "2024-10-18 12:56:01,665 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1910.pt\r\n", + "2024-10-18 12:56:20,011 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1920.pt\r\n", + "2024-10-18 12:56:38,949 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1930.pt\r\n", + "2024-10-18 12:56:58,441 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1940.pt\r\n", + "2024-10-18 12:57:15,890 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1950.pt\r\n", + "2024-10-18 12:57:36,778 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1960.pt\r\n", + "2024-10-18 12:57:55,757 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1970.pt\r\n", + "2024-10-18 12:58:14,450 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1980.pt\r\n", + "2024-10-18 12:58:33,023 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-1990.pt\r\n", + "2024-10-18 12:58:56,351 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2000.pt\r\n", + "2024-10-18 12:59:05,683 INFO [train.py:774] Epoch 1, batch 2000, train_loss[loss=3.038, ArTop10Accuracy=0.8255, NarTop10Accuracy=0.6433, over 1026.00 frames. ], tot_loss[loss=3.276, ArTop10Accuracy=0.7868, NarTop10Accuracy=0.5603, over 1142.00 frames. ], batch size: 4, lr: 4.82e-03\r\n", + "2024-10-18 12:59:06,846 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 3.169e+01 4.378e+01 4.693e+01 5.101e+01 1.046e+02, threshold=9.387e+01, percent-clipped=0.0\r\n", + "2024-10-18 12:59:15,965 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2010.pt\r\n", + "2024-10-18 12:59:34,668 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2020.pt\r\n", + "2024-10-18 12:59:53,774 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2030.pt\r\n", + "2024-10-18 13:00:11,941 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2040.pt\r\n", + "2024-10-18 13:00:30,647 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2050.pt\r\n", + "2024-10-18 13:00:58,554 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2060.pt\r\n", + "2024-10-18 13:01:15,869 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2070.pt\r\n", + "2024-10-18 13:01:34,697 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2080.pt\r\n", + "2024-10-18 13:01:54,146 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2090.pt\r\n", + "2024-10-18 13:02:13,045 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2100.pt\r\n", + "2024-10-18 13:02:22,904 INFO [train.py:774] Epoch 1, batch 2100, train_loss[loss=2.903, ArTop10Accuracy=0.8456, NarTop10Accuracy=0.6449, over 1263.00 frames. ], tot_loss[loss=3.262, ArTop10Accuracy=0.7912, NarTop10Accuracy=0.5608, over 1147.32 frames. ], batch size: 5, lr: 4.80e-03\r\n", + "2024-10-18 13:02:31,912 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2110.pt\r\n", + "2024-10-18 13:02:51,217 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2120.pt\r\n", + "2024-10-18 13:03:10,959 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2130.pt\r\n", + "2024-10-18 13:03:30,630 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2140.pt\r\n", + "2024-10-18 13:03:48,488 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2150.pt\r\n", + "2024-10-18 13:04:17,759 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2160.pt\r\n", + "2024-10-18 13:04:35,003 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2170.pt\r\n", + "2024-10-18 13:04:54,375 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2180.pt\r\n", + "2024-10-18 13:05:23,778 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2190.pt\r\n", + "2024-10-18 13:05:48,918 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2200.pt\r\n", + "2024-10-18 13:05:58,233 INFO [train.py:774] Epoch 1, batch 2200, train_loss[loss=3.73, ArTop10Accuracy=0.7279, NarTop10Accuracy=0.4351, over 680.00 frames. ], tot_loss[loss=3.253, ArTop10Accuracy=0.7921, NarTop10Accuracy=0.565, over 1149.62 frames. ], batch size: 1, lr: 4.78e-03\r\n", + "2024-10-18 13:06:07,372 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2210.pt\r\n", + "2024-10-18 13:06:26,047 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2220.pt\r\n", + "2024-10-18 13:06:44,136 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2230.pt\r\n", + "2024-10-18 13:07:03,493 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2240.pt\r\n", + "2024-10-18 13:07:25,430 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2250.pt\r\n", + "2024-10-18 13:07:43,620 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2260.pt\r\n", + "2024-10-18 13:08:02,337 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2270.pt\r\n", + "2024-10-18 13:08:34,387 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2280.pt\r\n", + "2024-10-18 13:08:54,311 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2290.pt\r\n", + "2024-10-18 13:09:12,573 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2300.pt\r\n", + "2024-10-18 13:09:21,918 INFO [train.py:774] Epoch 1, batch 2300, train_loss[loss=3.244, ArTop10Accuracy=0.7913, NarTop10Accuracy=0.5515, over 1131.00 frames. ], tot_loss[loss=3.256, ArTop10Accuracy=0.7914, NarTop10Accuracy=0.5632, over 1148.13 frames. ], batch size: 3, lr: 4.77e-03\r\n", + "2024-10-18 13:09:31,173 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2310.pt\r\n", + "2024-10-18 13:09:58,910 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2320.pt\r\n", + "2024-10-18 13:10:17,351 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2330.pt\r\n", + "2024-10-18 13:10:35,602 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2340.pt\r\n", + "2024-10-18 13:10:54,923 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2350.pt\r\n", + "2024-10-18 13:11:26,916 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2360.pt\r\n", + "2024-10-18 13:11:45,780 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2370.pt\r\n", + "2024-10-18 13:12:05,229 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2380.pt\r\n", + "2024-10-18 13:12:24,229 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2390.pt\r\n", + "2024-10-18 13:12:43,045 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2400.pt\r\n", + "2024-10-18 13:12:51,939 INFO [train.py:774] Epoch 1, batch 2400, train_loss[loss=3.139, ArTop10Accuracy=0.8364, NarTop10Accuracy=0.595, over 1400.00 frames. ], tot_loss[loss=3.25, ArTop10Accuracy=0.7914, NarTop10Accuracy=0.566, over 1155.33 frames. ], batch size: 2, lr: 4.75e-03\r\n", + "2024-10-18 13:13:01,267 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2410.pt\r\n", + "2024-10-18 13:13:21,168 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2420.pt\r\n", + "2024-10-18 13:13:39,201 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2430.pt\r\n", + "2024-10-18 13:13:58,183 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2440.pt\r\n", + "2024-10-18 13:14:19,262 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2450.pt\r\n", + "2024-10-18 13:14:49,246 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2460.pt\r\n", + "2024-10-18 13:15:07,775 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2470.pt\r\n", + "2024-10-18 13:15:39,219 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2480.pt\r\n", + "2024-10-18 13:15:58,285 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2490.pt\r\n", + "2024-10-18 13:16:16,148 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2500.pt\r\n", + "2024-10-18 13:16:25,760 INFO [train.py:774] Epoch 1, batch 2500, train_loss[loss=3.115, ArTop10Accuracy=0.8171, NarTop10Accuracy=0.6034, over 1110.00 frames. ], tot_loss[loss=3.238, ArTop10Accuracy=0.7923, NarTop10Accuracy=0.5691, over 1154.27 frames. ], batch size: 3, lr: 4.73e-03\r\n", + "2024-10-18 13:16:35,390 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2510.pt\r\n", + "2024-10-18 13:17:04,414 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2520.pt\r\n", + "2024-10-18 13:17:23,916 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2530.pt\r\n", + "2024-10-18 13:17:42,719 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2540.pt\r\n", + "2024-10-18 13:18:01,168 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2550.pt\r\n", + "2024-10-18 13:18:20,084 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2560.pt\r\n", + "2024-10-18 13:18:37,967 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2570.pt\r\n", + "2024-10-18 13:18:55,912 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2580.pt\r\n", + "2024-10-18 13:19:14,357 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2590.pt\r\n", + "2024-10-18 13:19:33,799 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2600.pt\r\n", + "2024-10-18 13:19:43,323 INFO [train.py:774] Epoch 1, batch 2600, train_loss[loss=3.213, ArTop10Accuracy=0.7744, NarTop10Accuracy=0.6219, over 1281.00 frames. ], tot_loss[loss=3.225, ArTop10Accuracy=0.7933, NarTop10Accuracy=0.5713, over 1157.52 frames. ], batch size: 3, lr: 4.71e-03\r\n", + "2024-10-18 13:19:52,496 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2610.pt\r\n", + "2024-10-18 13:20:11,147 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2620.pt\r\n", + "2024-10-18 13:20:29,689 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2630.pt\r\n", + "2024-10-18 13:20:48,292 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2640.pt\r\n", + "2024-10-18 13:21:11,749 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2650.pt\r\n", + "2024-10-18 13:21:31,114 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2660.pt\r\n", + "2024-10-18 13:21:49,378 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2670.pt\r\n", + "2024-10-18 13:22:08,210 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2680.pt\r\n", + "2024-10-18 13:22:27,199 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2690.pt\r\n", + "2024-10-18 13:22:54,964 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2700.pt\r\n", + "2024-10-18 13:23:04,291 INFO [train.py:774] Epoch 1, batch 2700, train_loss[loss=3.04, ArTop10Accuracy=0.8037, NarTop10Accuracy=0.6468, over 1014.00 frames. ], tot_loss[loss=3.231, ArTop10Accuracy=0.7938, NarTop10Accuracy=0.5693, over 1159.10 frames. ], batch size: 4, lr: 4.69e-03\r\n", + "2024-10-18 13:23:13,957 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2710.pt\r\n", + "2024-10-18 13:23:38,881 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2720.pt\r\n", + "2024-10-18 13:23:58,113 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2730.pt\r\n", + "2024-10-18 13:24:27,049 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2740.pt\r\n", + "2024-10-18 13:24:45,620 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2750.pt\r\n", + "2024-10-18 13:25:04,660 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2760.pt\r\n", + "2024-10-18 13:25:24,329 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2770.pt\r\n", + "2024-10-18 13:25:54,611 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2780.pt\r\n", + "2024-10-18 13:26:12,411 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2790.pt\r\n", + "2024-10-18 13:26:31,102 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2800.pt\r\n", + "2024-10-18 13:26:40,362 INFO [train.py:774] Epoch 1, batch 2800, train_loss[loss=3.268, ArTop10Accuracy=0.7668, NarTop10Accuracy=0.5751, over 1119.00 frames. ], tot_loss[loss=3.242, ArTop10Accuracy=0.792, NarTop10Accuracy=0.5676, over 1151.06 frames. ], batch size: 2, lr: 4.67e-03\r\n", + "2024-10-18 13:26:50,667 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2810.pt\r\n", + "2024-10-18 13:27:09,872 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2820.pt\r\n", + "2024-10-18 13:27:28,051 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2830.pt\r\n", + "2024-10-18 13:27:46,256 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2840.pt\r\n", + "2024-10-18 13:28:04,943 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2850.pt\r\n", + "2024-10-18 13:28:32,466 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2860.pt\r\n", + "2024-10-18 13:28:52,102 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2870.pt\r\n", + "2024-10-18 13:29:10,941 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2880.pt\r\n", + "2024-10-18 13:29:30,094 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2890.pt\r\n", + "2024-10-18 13:29:58,884 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2900.pt\r\n", + "2024-10-18 13:30:07,732 INFO [train.py:774] Epoch 1, batch 2900, train_loss[loss=3.357, ArTop10Accuracy=0.8063, NarTop10Accuracy=0.5351, over 1270.00 frames. ], tot_loss[loss=3.246, ArTop10Accuracy=0.7926, NarTop10Accuracy=0.5654, over 1154.25 frames. ], batch size: 3, lr: 4.65e-03\r\n", + "2024-10-18 13:30:17,403 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2910.pt\r\n", + "2024-10-18 13:30:36,046 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2920.pt\r\n", + "2024-10-18 13:31:07,580 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2930.pt\r\n", + "2024-10-18 13:31:25,986 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2940.pt\r\n", + "2024-10-18 13:31:45,433 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2950.pt\r\n", + "2024-10-18 13:32:04,741 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2960.pt\r\n", + "2024-10-18 13:32:23,101 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2970.pt\r\n", + "2024-10-18 13:32:42,057 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2980.pt\r\n", + "2024-10-18 13:33:00,916 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-2990.pt\r\n", + "2024-10-18 13:33:19,865 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3000.pt\r\n", + "2024-10-18 13:33:29,501 INFO [train.py:774] Epoch 1, batch 3000, train_loss[loss=3.093, ArTop10Accuracy=0.7894, NarTop10Accuracy=0.6209, over 1244.00 frames. ], tot_loss[loss=3.233, ArTop10Accuracy=0.7951, NarTop10Accuracy=0.5686, over 1159.64 frames. ], batch size: 5, lr: 4.63e-03\r\n", + "2024-10-18 13:33:30,147 INFO [utils.py:877] Clipping_scale=2.0, grad-norm quartiles 2.737e+01 4.212e+01 4.549e+01 4.879e+01 7.841e+01, threshold=9.097e+01, percent-clipped=0.0\r\n", + "2024-10-18 13:33:38,575 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3010.pt\r\n", + "2024-10-18 13:33:57,500 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3020.pt\r\n", + "2024-10-18 13:34:16,087 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3030.pt\r\n", + "2024-10-18 13:34:34,314 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3040.pt\r\n", + "2024-10-18 13:34:53,104 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3050.pt\r\n", + "2024-10-18 13:35:11,588 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3060.pt\r\n", + "2024-10-18 13:35:30,190 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3070.pt\r\n", + "2024-10-18 13:35:48,620 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3080.pt\r\n", + "2024-10-18 13:36:07,288 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3090.pt\r\n", + "2024-10-18 13:36:26,123 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3100.pt\r\n", + "2024-10-18 13:36:35,703 INFO [train.py:774] Epoch 1, batch 3100, train_loss[loss=2.971, ArTop10Accuracy=0.8153, NarTop10Accuracy=0.6594, over 1056.00 frames. ], tot_loss[loss=3.227, ArTop10Accuracy=0.7966, NarTop10Accuracy=0.5713, over 1142.86 frames. ], batch size: 2, lr: 4.61e-03\r\n", + "2024-10-18 13:36:53,250 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3110.pt\r\n", + "2024-10-18 13:37:11,548 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3120.pt\r\n", + "2024-10-18 13:37:30,658 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3130.pt\r\n", + "2024-10-18 13:37:50,010 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3140.pt\r\n", + "2024-10-18 13:38:08,117 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3150.pt\r\n", + "2024-10-18 13:38:27,021 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3160.pt\r\n", + "2024-10-18 13:38:45,153 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3170.pt\r\n", + "2024-10-18 13:39:04,755 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3180.pt\r\n", + "2024-10-18 13:39:24,057 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3190.pt\r\n", + "2024-10-18 13:39:43,492 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3200.pt\r\n", + "2024-10-18 13:39:53,261 INFO [train.py:774] Epoch 1, batch 3200, train_loss[loss=3.034, ArTop10Accuracy=0.8173, NarTop10Accuracy=0.6121, over 1182.00 frames. ], tot_loss[loss=3.238, ArTop10Accuracy=0.7952, NarTop10Accuracy=0.567, over 1155.64 frames. ], batch size: 3, lr: 4.59e-03\r\n", + "2024-10-18 13:40:03,281 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3210.pt\r\n", + "2024-10-18 13:40:21,725 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3220.pt\r\n", + "2024-10-18 13:40:48,689 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3230.pt\r\n", + "2024-10-18 13:41:07,026 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3240.pt\r\n", + "2024-10-18 13:41:24,841 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3250.pt\r\n", + "2024-10-18 13:41:44,181 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3260.pt\r\n", + "2024-10-18 13:42:03,304 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3270.pt\r\n", + "2024-10-18 13:42:21,201 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3280.pt\r\n", + "2024-10-18 13:42:41,163 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3290.pt\r\n", + "2024-10-18 13:43:00,758 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3300.pt\r\n", + "2024-10-18 13:43:10,263 INFO [train.py:774] Epoch 1, batch 3300, train_loss[loss=3.083, ArTop10Accuracy=0.8263, NarTop10Accuracy=0.5899, over 1376.00 frames. ], tot_loss[loss=3.238, ArTop10Accuracy=0.7953, NarTop10Accuracy=0.5661, over 1160.94 frames. ], batch size: 4, lr: 4.57e-03\r\n", + "2024-10-18 13:43:19,697 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3310.pt\r\n", + "2024-10-18 13:43:37,766 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3320.pt\r\n", + "2024-10-18 13:43:56,600 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3330.pt\r\n", + "2024-10-18 13:44:24,096 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3340.pt\r\n", + "2024-10-18 13:44:42,692 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3350.pt\r\n", + "2024-10-18 13:45:01,596 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3360.pt\r\n", + "2024-10-18 13:45:22,523 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3370.pt\r\n", + "2024-10-18 13:45:41,567 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3380.pt\r\n", + "2024-10-18 13:46:01,227 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3390.pt\r\n", + "2024-10-18 13:46:20,337 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3400.pt\r\n", + "2024-10-18 13:46:29,902 INFO [train.py:774] Epoch 1, batch 3400, train_loss[loss=3.077, ArTop10Accuracy=0.8108, NarTop10Accuracy=0.5995, over 1205.00 frames. ], tot_loss[loss=3.258, ArTop10Accuracy=0.7953, NarTop10Accuracy=0.5609, over 1161.76 frames. ], batch size: 9, lr: 4.55e-03\r\n", + "2024-10-18 13:46:39,570 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3410.pt\r\n", + "2024-10-18 13:46:58,262 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3420.pt\r\n", + "2024-10-18 13:47:17,155 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3430.pt\r\n", + "2024-10-18 13:47:35,020 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3440.pt\r\n", + "2024-10-18 13:47:55,306 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3450.pt\r\n", + "2024-10-18 13:48:14,574 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3460.pt\r\n", + "2024-10-18 13:48:34,352 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3470.pt\r\n", + "2024-10-18 13:48:53,096 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3480.pt\r\n", + "2024-10-18 13:49:12,124 INFO [utils.py:237] Saving checkpoint to exp/valle_dev/checkpoint-3490.pt\r\n", + "2024-10-18 13:49:27,782 INFO [train.py:658] Reaches end of dataloader.\r\n", + "Traceback (most recent call last):\r\n", + " File \"/kaggle/working/train.py\", line 1078, in \r\n", + " main()\r\n", + " File \"/kaggle/working/train.py\", line 1071, in main\r\n", + " run(rank=0, world_size=1, args=args)\r\n", + " File \"/kaggle/working/train.py\", line 1025, in run\r\n", + " save_checkpoint(\r\n", + " File \"/kaggle/working/train.py\", line 468, in save_checkpoint\r\n", + " if params.cur_epoch % params.save_every == 0:\r\n", + " File \"/kaggle/working/train_utils/icefall/utils.py\", line 433, in __getattr__\r\n", + " raise AttributeError(f\"No such attribute '{key}'\")\r\n", + "AttributeError: No such attribute 'save_every'\r\n" + ] + } + ], + "source": [ + "!python3 train.py \\\n", + " --dtype \"bfloat16\" \\\n", + " --num-epochs 100 \\\n", + " --save-every-n 10 \\\n", + " --world-size 1 \\\n", + " --keep-last-k 2 \\\n", + " --visualize True \\\n", + " --train_dir $input_train_path \\\n", + " --valid_dir $input_test_path " + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "0676b6cc", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T13:49:34.838834Z", + "iopub.status.busy": "2024-10-18T13:49:34.836865Z", + "iopub.status.idle": "2024-10-18T13:49:35.990064Z", + "shell.execute_reply": "2024-10-18T13:49:35.988873Z" + }, + "papermill": { + "duration": 1.201327, + "end_time": "2024-10-18T13:49:35.992594", + "exception": false, + "start_time": "2024-10-18T13:49:34.791267", + "status": "completed" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cp: cannot stat '/kaggle/working/exp/valle_dev/best-train-loss.pt': No such file or directory\r\n" + ] + } + ], + "source": [ + "!cp /kaggle/working/exp/valle_dev/best-train-loss.pt /checkpoints/vallex-checkpoint.pt" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "04927ed9", + "metadata": { + "execution": { + "iopub.execute_input": "2024-10-18T13:49:36.081399Z", + "iopub.status.busy": "2024-10-18T13:49:36.081003Z", + "iopub.status.idle": "2024-10-18T13:50:03.703924Z", + "shell.execute_reply": "2024-10-18T13:50:03.703094Z" + }, + "papermill": { + "duration": 27.670293, + "end_time": "2024-10-18T13:50:03.706716", + "exception": false, + "start_time": "2024-10-18T13:49:36.036423", + "status": "completed" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/kaggle/working/utils/generation.py:78: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\n", + " checkpoint = torch.load(os.path.join(checkpoints_dir, model_checkpoint_name), map_location='cpu')\n", + "/opt/conda/lib/python3.10/site-packages/torch/nn/utils/weight_norm.py:134: FutureWarning: `torch.nn.utils.weight_norm` is deprecated in favor of `torch.nn.utils.parametrizations.weight_norm`.\n", + " WeightNorm.apply(module, name, dim)\n", + "/opt/conda/lib/python3.10/site-packages/vocos/pretrained.py:70: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\n", + " state_dict = torch.load(model_path, map_location=\"cpu\")\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VALL-E EOS [0 -> 102]\n" + ] + }, + { + "data": { + "text/html": [ + "\n", + " \n", + " " + ], + "text/plain": [ + "" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from utils.generation import SAMPLE_RATE, generate_audio, preload_models\n", + "from scipy.io.wavfile import write as write_wav\n", + "from IPython.display import Audio\n", + "\n", + "# download and load all models\n", + "preload_models()\n", + "\n", + "# generate audio from text\n", + "text_prompt = \"\"\"\n", + "Xin chao, Viet Nam.\n", + "\"\"\"\n", + "audio_array = generate_audio(text_prompt)\n", + "\n", + "# save audio to disk\n", + "write_wav(\"vallex_generation.wav\", SAMPLE_RATE, audio_array)\n", + "\n", + "# play text in notebook\n", + "Audio(audio_array, rate=SAMPLE_RATE)" + ] + } + ], + "metadata": { + "kaggle": { + "accelerator": "gpu", + "dataSources": [ + { + "datasetId": 5859839, + "sourceId": 9652454, + "sourceType": "datasetVersion" + } + ], + "dockerImageVersionId": 30787, + "isGpuEnabled": true, + "isInternetEnabled": true, + "language": "python", + "sourceType": "notebook" + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.14" + }, + "papermill": { + "default_parameters": {}, + "duration": 7312.253211, + "end_time": "2024-10-18T13:50:05.580095", + "environment_variables": {}, + "exception": null, + "input_path": "__notebook__.ipynb", + "output_path": "__notebook__.ipynb", + "parameters": {}, + "start_time": "2024-10-18T11:48:13.326884", + "version": "2.6.0" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}