TAPEX: Table Pre-training via Learning a Neural SQL Executor

Overview

TAPEX: Table Pre-training via Learning a Neural SQL Executor

The official repository which contains the code and pre-trained models for our paper TAPEX: Table Pre-training via Learning a Neural SQL Executor.

🔥 Updates

  • 2021-08-28: We released the fine-tuned model weights on SQA and WikiTableQuestions!
  • 2021-08-27: We released the code, the pre-training corpus, and the pre-trained TAPEX model weights. Thanks for your patience!
  • 2021-07-16: We released our paper and home page. Check it out!

🏴 󠁶󠁵󠁭󠁡󠁰󠁿 Overview

Paper

In the paper, we present TAPEX (for Table Pre-training via Execution), a conceptually simple and empirically powerful pre-training approach to empower existing generative pre-trained models (e.g., BART in our paper) with table reasoning skills. TAPEX realizes table pre-training by learning a neural SQL executor over a synthetic corpus, which is obtained by automatically synthesizing executable SQL queries.

Fig 1. The schematic illustration of TAPEX. Tables not shown for brevity.

The central point of TAPEX is to train a model to mimic the SQL query execution process over a table. We believe that if a model can be trained to faithfully execute SQL queries, then it must have a deep understanding of table structures and possess an inductive bias towards table structures.

Meanwhile, since the diversity of SQL queries can be guaranteed systemically, and thus a diverse and high-quality pre-training corpus can be automatically synthesized for TAPEX.

Project

This project contains two parts, tapex library and examples to employ it on different table-related applications (e.g., Table Question Answering).

  • For tapex, there is an overview:
|-- common
    |-- dbengine.py # the database engine to return answer for a SQL query
    |-- download.py # download helper for automatic resource
|-- data_utils
    |-- wikisql
        |-- executor.py # the re-implementation of WikiSQL style SQL execution to obtain ground-truth answers in the dataset
    |-- format_converter.py # convert dataset formats into HuggingFace style
    |-- preprocess_binary.py # wrapper for the fairseq preprocess script
    |-- preprocess_bpe.py # wrapper for the BPE preprocess
|-- processor
    |-- table_linearize.py # the class to flatten a table into a linearized form, which should keep consistent during pre-training, fine-tuning and evaluating
    |-- table_truncate.py # the class to truncate a long table into a shorter version to satisfy model's input length limit (e.g., BART can accept at most 1024 tokens)
    |-- table_processor.py # the wrapper for the above two table utility function classes
|-- model_eval.py # evaluate the denotation accuracy of model
|-- model_interface.py # wrap a model interface for interaction based on HubInterface
  • For examples, please refer to here for more details.

⚡️ Quickstart

Prepare Environment

First, you should set up a python environment. This code base has been tested under python 3.x, and we officially support python 3.8.

After installing python 3.8, we strongly recommend you to use virtualenv (a tool to create isolated Python environments) to manage the python environment. You could use following commands to create an environment venv and activate it.

$ python3.8 -m venv venv
$ source venv/bin/activate

Install TAPEX

The main requirements of our code base is fairseq, which may be difficult for beginners to get started in an hour.

However, do not worry, we already wrap all necessary commands for developers. In other words, you do not need to study fairseq to start your journey about TAPEX! You can simply run the following command (in the virtual environment) to use TAPEX:

$ pip install --editable ./

The argument --editable is important for your potential follow-up modification on the tapex library. The command will not only install dependencies, but also install tapex as a library, which can be imported easily.

Use TAPEX

Once tapex is successfully installed, you could go into examples to enjoy fine-tuning TAPEX models and using them on different applications!

🏰 Resource

Pre-training Corpus

Our synthetic pre-training corpus which includes nearly 5,000,000 tuples of (SQL queries, flattened tables, SQL execution results) can be downloaded from here. You can use it for research purpose, but you should be careful about the data license.

Below is an example from the pre-training corpus:

  • The SQL plus flattened Table as INPUT:
select ( select number where number = 4 ) - ( select number where number = 3 ) col : number | date | name | age (at execution) | age (at offense) | race | state | method row 1 : 1 | november 2, 1984 | velma margie barfield | 52 | 45 | white | north carolina | lethal injection row 2 : 2 | february 3, 1998 | karla faye tucker | 38 | 23 | white | texas | lethal injection row 3 : 3 | march 30, 1998 | judias v. buenoano | 54 | 28 | white | florida | electrocution row 4 : 4 | february 24, 2000 | betty lou beets | 62 | 46 | white | texas | lethal injection row 5 : 5 | may 2, 2000 | christina marie riggs | 28 | 26 | white | arkansas | lethal injection row 6 : 6 | january 11, 2001 | wanda jean allen | 41 | 29 | black | oklahoma | lethal injection row 7 : 7 | may 1, 2001 | marilyn kay plantz | 40 | 27 | white | oklahoma | lethal injection row 8 : 8 | december 4, 2001 | lois nadean smith | 61 | 41 | white | oklahoma | lethal injection row 9 : 9 | may 10, 2002 | lynda lyon block | 54 | 45 | white | alabama | electrocution row 10 : 10 | october 9, 2002 | aileen carol wuornos | 46 | 33 | white | florida | lethal injection row 11 : 11 | september 14, 2005 | frances elaine newton | 40 | 21 | black | texas | lethal injection row 12 : 12 | september 23, 2010 | teresa wilson bean lewis | 41 | 33 | white | virginia | lethal injection row 13 : 13 | june 26, 2013 | kimberly lagayle mccarthy | 52 | 36 | black | texas | lethal injection row 14 : 14 | february 5, 2014 | suzanne margaret basso | 59 | 44 | white | texas | lethal injection
  • The SQL Execution Result as OUTPUT:
1.0

Here we want to acknowledge the huge effort of paper On the Potential of Lexico-logical Alignments for Semantic Parsing to SQL Queries, which provides the rich resources of SQL templates for us to synthesize the pre-training corpus. If you are interested, please give a STAR to their repo.

Pre-trained models

The pre-trained models trained on the above pre-training corpus.

Model Description # Params Download
tapex.base 6 encoder and decoder layers 140M tapex.base.tar.gz
tapex.large 12 encoder and decoder layers 400M tapex.large.tar.gz

Fine-tuned Models

We provide fine-tuned model weights and their performance on different datasets below. The following Accuracy (Acc) refers to denotation accuracy computed by our script model_eval.py. Meanwhile, it is worth noting that we need truncating long tables during preprocessing with some randomness. Therefore, we also provide preprocessed datasets for reproducing our experimental results.

Model Dev Acc Test Acc Dataset Download Data Download Model
tapex.large.wtq 58.0 57.2 WikiTableQuestions wtq.preprocessed.zip tapex.large.wtq.tar.gz
tapex.large.sqa 70.7 74.0 SQA sqa.preprocessed.zip tapex.large.sqa.tar.gz
tapex.large.wikisql 89.3 89.2 WikiSQL wikisql.preprocessed.zip tapex.large.wikisql.tar.gz

Given these fine-tuned model weights, you can play with them using the predict mode in examples/tableqa/run_model.py.

For example, you can use the following command and see its log:

$ python examples/tableqa/run_model.py predict --resource-dir ./tapex.large.wtq --checkpoint-name model.pt
2021-08-29 17:39:47 | INFO | __main__ | Receive question as : Greece held its last Summer Olympics in which year?
2021-08-29 17:39:47 | INFO | __main__ | The answer should be : 2004

💬 Citation

If our work is useful for you, please consider citing our paper:

@misc{liu2021tapex,
    title={TAPEX: Table Pre-training via Learning a Neural SQL Executor}, 
    author={Qian Liu and Bei Chen and Jiaqi Guo and Zeqi Lin and Jian-guang Lou},
    year={2021},
    eprint={2107.07653},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

👍 Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

📝 License

Please note that there are TWO LICENSES for code and pre-training corpus. The code and pre-trained models are open-sourced under MIT License, while the pre-training corpus is released under CC BY-SA 4.0.

™️ Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Comments
  • Error preprocessing data for TabFact

    Error preprocessing data for TabFact

    Hi, thank you for sharing your code! I am trying to run your trained model tapex.large on TabFact's test set, and I am pre-processing the file test.jsonl for that. When I run the file python process_tabfact_data.py to do this pre-processing, I get the following error:

    FileNotFoundError: [Errno 2] No such file or directory: 'tapex.large/dict.src.txt'

    I downloaded your preprocessed data from this link (https://github.com/microsoft/Table-Pretraining/releases/download/preprocessed-data/tabfact.preprocessed.zip) but I did not find this file tapex.large/dict.src.txt anywhere.

    Could you please help me solve this? Thank you very much!

    opened by vnik18 15
  • load pretrained model errors

    load pretrained model errors

    Dear authors, Thanks for contributing to the development of table pretraining and release the code.

    When I try to reimplement the code of github,I get a problem of "AttributeError: 'NoneType' object has no attribute 'bpe'". It seems the load_checkpoint_to_cpu return a NoneType when loading the pretrained model.pt. Because state = load_checkpoint_to_cpu(filename, arg_overrides) missing the key "args".

    Could you give any advice?

    opened by airsYuan 15
  • Adding TAPEX to HuggingFace Transformers

    Adding TAPEX to HuggingFace Transformers

    Hi!

    First of all, congratulations on the great paper and results! If you need any help regarding converting the models to the HuggingFace API, let me know. My very first contribution to HuggingFace Transformers was actually TAPAS, the table question answering model from Google. We also create a subsequent table-question answering task on the hub, as well as an inference widget which let's users directly try out TAPAS in the browser.

    We could do the same for TAPEX! TAPEX also looks way simpler as it's a generative model. The only thing required would be to write a conversion script (which I can help you with).

    Also, are you interested in joining the Microsoft organization on the hub?

    Btw, the README is also very comprehensive and well written. Wish more authors did that ;)

    Kind regards,

    Niels ML Engineer @ HuggingFace

    opened by NielsRogge 13
  • GPU memory usage about this model

    GPU memory usage about this model

    Hi, I used 3090 to infer this model(hugging face version) on tabFact now(using test_examples.json file), and I found that my CUDA was out of memory(24G) for both batch inference and single inference. Could you please tell me how much memory I need to fine-tune this model so that I can apply for more instances? Thank you in advance!

    opened by skywalkerzhang 9
  • tapex.base model performance poorly with

    tapex.base model performance poorly with "run_model.py predict"

    Hello,

    I follow the instruction and trained a tapex.base model on wikisql dataset. The "run_model.py eval" reports Denotation Accuracy : 0.879. However when I use ''run_model.py predict" command to perform online prediction, the result is very poor. Is there any thing I can try to sovle this problem?

    Thanks

    Nian

    opened by xienian87 9
  • pretrain dataset error

    pretrain dataset error

    Hi,

    I meet a problem when I want to pretrain a model via your introduction. Error stacks are as follows.

    File "/home/user/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/tasks/translation.py", line 156, in load_langpair_dataset return LanguagePairDataset( File "/home/user/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/data/language_pair_dataset.py", line 232, in __init__ assert len(src) == len( AssertionError: Source and target must contain the same number of examples

    I check the preprocess log, and preprocess log is as follows.

    Namespace(align_suffix=None, alignfile=None, all_gather_list_size=16384, amp=False, amp_batch_retries=2, amp_init_scale=128, amp_scale_window=None, azureml_logging=False, bf16=False, bpe=None, cpu=False, criterion='cross_entropy', dataset_impl='mmap', destdir='dataset/pretrain/bart.base/bin', dict_only=False, empty_cache_freq=0, fp16=False, fp16_init_scale=128, fp16_no_flatten_grads=False, fp16_scale_tolerance=0.0, fp16_scale_window=None, joined_dictionary=False, log_file=None, log_format=None, log_interval=100, lr_scheduler='fixed', memory_efficient_bf16=False, memory_efficient_fp16=False, min_loss_scale=0.0001, model_parallel_size=1, no_progress_bar=False, nwordssrc=-1, nwordstgt=-1, on_cpu_convert_precision=False, only_source=False, optimizer=None, padding_factor=8, plasma_path='/tmp/plasma', profile=False, quantization_config_path=None, reset_logging=False, scoring='bleu', seed=1, source_lang='src', srcdict='bart.base/dict.src.txt', suppress_crashes=False, target_lang='tgt', task='translation', tensorboard_logdir=None, testpref=None, tgtdict='bart.base/dict.tgt.txt', threshold_loss_scale=None, thresholdsrc=0, thresholdtgt=0, tokenizer=None, tpu=False, trainpref='dataset/pretrain/train.bpe', use_plasma_view=False, user_dir=None, validpref='dataset/pretrain/valid.bpe', wandb_project=None, workers=1) [src] Dictionary: 51200 types [src] dataset/pretrain/train.bpe.src: 4949629 sents, 2195465273 tokens, 0.0% replaced by <unk> [src] Dictionary: 51200 types [src] dataset/pretrain/valid.bpe.src: 20000 sents, 8907694 tokens, 0.0% replaced by <unk> [tgt] Dictionary: 51200 types [tgt] dataset/pretrain/train.bpe.tgt: 4946227 sents, 31818856 tokens, 0.0% replaced by <unk> [tgt] Dictionary: 51200 types [tgt] dataset/pretrain/valid.bpe.tgt: 19987 sents, 127668 tokens, 0.0% replaced by <unk> Wrote preprocessed data to dataset/pretrain/bart.base/bin

    The difference between train and valid bpe dataset is due to [num_filtered_EMPTY] filtered when preprocessing dataset. So I am not sure if it is right. I successfully finish process_pretrain_data step, and some problems occur when I run the script run_model.py in tapex/examples/pretrain/ folder.

    Could your please tell me which step is wrong?

    opened by q5s2c1 7
  • Tapex performance on large tables

    Tapex performance on large tables

    Hello team, I've csv files with more than 30K rows and 10 columns. I am in need of your help to understand what is the best way to approach this problem since the table is too large. Is Tapex able to handle large tables or there are work around that I can adapt?

    The first thought that comes into my mind is splitting the huge table into multiple sub-tables(meaning column names will remain the same) and then perform inference on it. The predictions further can be aggregated for final results. Could you please share your expertise on this problem. In general, how are the large tableQA performed, please suggest.

    Additionally, can we list/view the corresponding SQL queries of predicted answers?

    opened by srewai 5
  • fairseq version does not exist

    fairseq version does not exist

    opened by Harry-hash 3
  • Label Encoding for fact verifacation over TabFact

    Label Encoding for fact verifacation over TabFact

    The Trained Tapex large model (especially availaible at Huggingface) has 0 label corresponding to Entailed class or 0 label corresponding to Refute class? As by default, the TabFact when loaded through huggingface dataset has 0 corresponding to Refute class. Please tell us this.

    opened by vikxoxo 3
  • I get a bug when I use the fine-tuned model to predict.

    I get a bug when I use the fine-tuned model to predict.

    I download the fine-tuned model and dataset, such as tapex.large.wtq and wtq.preprocess. And I run python examples/tableqa/run_model.py predict --resource-dir ./tapex.large.wtq --checkpoint-name model.pt. Then I get the following bug:

    Traceback (most recent call last):
      File "/data2/huchaowen/Table-Pretraining/examples/tableqa/run_model.py", line 181, in <module>
        predict_demo(args)
      File "/data2/huchaowen/Table-Pretraining/examples/tableqa/run_model.py", line 161, in predict_demo
        answer = demo_interface.predict(question=question,
      File "/data2/huchaowen/Table-Pretraining/tapex/model_interface.py", line 34, in predict
        model_output = self.model.translate(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/hub_utils.py", line 124, in translate
        return self.sample(sentences, beam, verbose, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/hub_utils.py", line 132, in sample
        batched_hypos = self.generate(tokenized_sentences, beam, verbose, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/models/bart/hub_interface.py", line 107, in generate
        results = super().generate(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/hub_utils.py", line 189, in generate
        translations = self.task.inference_step(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/tasks/fairseq_task.py", line 540, in inference_step
        return generator.generate(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
        return func(*args, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/sequence_generator.py", line 204, in generate
        return self._generate(sample, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/sequence_generator.py", line 274, in _generate
        encoder_outs = self.model.forward_encoder(net_input)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/sequence_generator.py", line 801, in forward_encoder
        return [model.encoder.forward_torchscript(net_input) for model in self.models]
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/sequence_generator.py", line 801, in <listcomp>
        return [model.encoder.forward_torchscript(net_input) for model in self.models]
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/models/fairseq_encoder.py", line 55, in forward_torchscript
        return self.forward_non_torchscript(net_input)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/models/fairseq_encoder.py", line 62, in forward_non_torchscript
        return self.forward(**encoder_input)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/models/transformer/transformer_encoder.py", line 165, in forward
        return self.forward_scriptable(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/models/transformer/transformer_encoder.py", line 294, in forward_scriptable
        lr = layer(x, encoder_padding_mask=encoder_padding_mask_out)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
        return forward_call(*input, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/modules/transformer_layer.py", line 351, in forward
        x, _ = self.self_attn(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
        return forward_call(*input, **kwargs)
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/fairseq/modules/multihead_attention.py", line 538, in forward
        return F.multi_head_attention_forward(
      File "/data2/huchaowen/anaconda3/envs/tapex/lib/python3.8/site-packages/torch/nn/functional.py", line 5160, in multi_head_attention_forward
        attn_output_weights = torch.bmm(q_scaled, k.transpose(-2, -1))
    RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling `cublasSgemmStridedBatched( handle, opa, opb, m, n, k, &alpha, a, lda, stridea, b, ldb, strideb, &beta, c, ldc, stridec, num_batches)`
    

    fairseq==0.12.2, transformers==4.24.0

    opened by jhrsya 2
  • What‘s the training corpus of single GETAR?

    What‘s the training corpus of single GETAR?

    Hi, thanks for your sharing~ Your pretext task designing is very ingenious! But I'm confused about the training corpus' difference between GETAR and GETAR+TAPEX. In this paper, the accuracy of the single GETAR on TabFact is 80.8%. Is it obtained by directly fine-tuning BART on TabFact? If so, why could BART achieve such competitive performance with TAPAS(81%, pre-train on 3.7M tables), since BART isn't typical for table understanding?

    opened by wutianjie 2
Owner
Microsoft
Open source projects and samples from Microsoft
Microsoft
A platform to display the carbon neutralization information for researchers, decision-makers, and other participants in the community.

Welcome to Carbon Insight Carbon Insight is a platform aiming to display the carbon neutralization roadmap for researchers, decision-makers, and other

Microsoft 14 Oct 24, 2022
A collection of models for image<->text generation in ACM MM 2021.

Bi-directional Image and Text Generation UMT-BITG (image & text generator) Unifying Multimodal Transformer for Bi-directional Image and Text Generatio

Multimedia Research 63 Oct 30, 2022
Official implementation of the NRNS paper: No RL, No Simulation: Learning to Navigate without Navigating

No RL No Simulation (NRNS) Official implementation of the NRNS paper: No RL, No Simulation: Learning to Navigate without Navigating NRNS is a heriarch

Meera Hahn 20 Nov 29, 2022
Explainable Medical ImageSegmentation via GenerativeAdversarial Networks andLayer-wise Relevance Propagation

MedAI: Transparency in Medical Image Segmentation What is this repo This repo contains the code and experiments that are implemented to contribute in

Awadelrahman M. A. Ahmed 1 Nov 22, 2021
On Evaluation Metrics for Graph Generative Models

On Evaluation Metrics for Graph Generative Models Authors: Rylee Thompson, Boris Knyazev, Elahe Ghalebi, Jungtaek Kim, Graham Taylor This is the offic

13 Jan 07, 2023
Gray Zone Assessment

Gray Zone Assessment Get started Clone github repository git clone https://github.com/andreanne-lemay/gray_zone_assessment.git Build docker image dock

1 Jan 08, 2022
Official code for Score-Based Generative Modeling through Stochastic Differential Equations

Score-Based Generative Modeling through Stochastic Differential Equations This repo contains the official implementation for the paper Score-Based Gen

Yang Song 818 Jan 06, 2023
Libraries, tools and tasks created and used at DeepMind Robotics.

Libraries, tools and tasks created and used at DeepMind Robotics.

DeepMind 270 Nov 30, 2022
A PyTorch implementation for V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentation

A PyTorch implementation of V-Net Vnet is a PyTorch implementation of the paper V-Net: Fully Convolutional Neural Networks for Volumetric Medical Imag

Matthew Macy 606 Dec 21, 2022
Segment axon and myelin from microscopy data using deep learning

Segment axon and myelin from microscopy data using deep learning. Written in Python. Using the TensorFlow framework. Based on a convolutional neural network architecture. Pixels are classified as eit

NeuroPoly 103 Nov 29, 2022
Open standard for machine learning interoperability

Open Neural Network Exchange (ONNX) is an open ecosystem that empowers AI developers to choose the right tools as their project evolves. ONNX provides

Open Neural Network Exchange 13.9k Dec 30, 2022
Curriculum Domain Adaptation for Semantic Segmentation of Urban Scenes, ICCV 2017

AdaptationSeg This is the Python reference implementation of AdaptionSeg proposed in "Curriculum Domain Adaptation for Semantic Segmentation of Urban

Yang Zhang 128 Oct 19, 2022
Toward Spatially Unbiased Generative Models (ICCV 2021)

Toward Spatially Unbiased Generative Models Implementation of Toward Spatially Unbiased Generative Models (ICCV 2021) Overview Recent image generation

Jooyoung Choi 88 Dec 01, 2022
PyTorch evaluation code for Delving Deep into the Generalization of Vision Transformers under Distribution Shifts.

Out-of-distribution Generalization Investigation on Vision Transformers This repository contains PyTorch evaluation code for Delving Deep into the Gen

Chongzhi Zhang 72 Dec 13, 2022
Official code for MPG2: Multi-attribute Pizza Generator: Cross-domain Attribute Control with Conditional StyleGAN

This is the official code for Multi-attribute Pizza Generator (MPG2): Cross-domain Attribute Control with Conditional StyleGAN. Paper Demo Setup Envir

Fangda Han 5 Sep 01, 2022
This is the formal code implementation of the CVPR 2022 paper 'Federated Class Incremental Learning'.

Official Pytorch Implementation for GLFC [CVPR-2022] Federated Class-Incremental Learning This is the official implementation code of our paper "Feder

Race Wang 57 Dec 27, 2022
MATLAB codes of the book "Digital Image Processing Fourth Edition" converted to Python

Digital Image Processing Python MATLAB codes of the book "Digital Image Processing Fourth Edition" converted to Python TO-DO: Refactor scripts, curren

Merve Noyan 24 Oct 16, 2022
Multi-Agent Reinforcement Learning for Active Voltage Control on Power Distribution Networks (MAPDN)

Multi-Agent Reinforcement Learning for Active Voltage Control on Power Distribution Networks (MAPDN) This is the implementation of the paper Multi-Age

Future Power Networks 83 Jan 06, 2023
official implemntation for "Contrastive Learning with Stronger Augmentations"

CLSA CLSA is a self-supervised learning methods which focused on the pattern learning from strong augmentations. Copyright (C) 2020 Xiao Wang, Guo-Jun

Lab for MAchine Perception and LEarning (MAPLE) 47 Nov 29, 2022