repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/models/__init__.py
bert/fairseq/models/__init__.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import importlib i...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/models/fairseq_model.py
bert/fairseq/models/fairseq_model.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn as nn...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/models/composite_encoder.py
bert/fairseq/models/composite_encoder.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqEncoder cla...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/models/transformer.py
bert/fairseq/models/transformer.py
# Modified by Zhuohan Li in May 2019 for macaron-net # # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
true
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/models/fairseq_decoder.py
bert/fairseq/models/fairseq_decoder.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn as nn import torch...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/fairseq_optimizer.py
bert/fairseq/optim/fairseq_optimizer.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch class ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/adam.py
bert/fairseq/optim/adam.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch import to...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/nag.py
bert/fairseq/optim/nag.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from torch.optim.optimizer import ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/adagrad.py
bert/fairseq/optim/adagrad.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.optim from . import ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/fp16_optimizer.py
bert/fairseq/optim/fp16_optimizer.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch from fairseq import ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/__init__.py
bert/fairseq/optim/__init__.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import importlib import os from ....
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/sgd.py
bert/fairseq/optim/sgd.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.optim from . import ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/lr_scheduler/linear_lr_schedule.py
bert/fairseq/optim/lr_scheduler/linear_lr_schedule.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqLRScheduler, ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/lr_scheduler/fixed_schedule.py
bert/fairseq/optim/lr_scheduler/fixed_schedule.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqLRScheduler, ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/lr_scheduler/cosine_lr_scheduler.py
bert/fairseq/optim/lr_scheduler/cosine_lr_scheduler.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math from . import Fairseq...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/lr_scheduler/exp_lr_scheduler.py
bert/fairseq/optim/lr_scheduler/exp_lr_scheduler.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqLRScheduler, ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/lr_scheduler/inverse_square_root_schedule.py
bert/fairseq/optim/lr_scheduler/inverse_square_root_schedule.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqLRScheduler, ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/lr_scheduler/triangular_lr_scheduler.py
bert/fairseq/optim/lr_scheduler/triangular_lr_scheduler.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math from . import Fairseq...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/lr_scheduler/fairseq_lr_scheduler.py
bert/fairseq/optim/lr_scheduler/fairseq_lr_scheduler.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from .. import FairseqOptimizer ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/lr_scheduler/__init__.py
bert/fairseq/optim/lr_scheduler/__init__.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import importlib import os from ....
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/optim/lr_scheduler/reduce_lr_on_plateau.py
bert/fairseq/optim/lr_scheduler/reduce_lr_on_plateau.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.optim.lr_scheduler f...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/criterions/label_smoothed_cross_entropy.py
bert/fairseq/criterions/label_smoothed_cross_entropy.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math from fairseq import u...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/criterions/cross_entropy_bert.py
bert/fairseq/criterions/cross_entropy_bert.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch.nn.functi...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/criterions/cross_entropy_classify_binary.py
bert/fairseq/criterions/cross_entropy_classify_binary.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn.functional as F f...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/criterions/cross_entropy_classify.py
bert/fairseq/criterions/cross_entropy_classify.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn.functional as F f...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/criterions/cross_entropy.py
bert/fairseq/criterions/cross_entropy.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch.nn.functi...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/criterions/fairseq_criterion.py
bert/fairseq/criterions/fairseq_criterion.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from torch.nn.modules.loss import ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/criterions/__init__.py
bert/fairseq/criterions/__init__.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import importlib import os from ....
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/criterions/mean_squared_error.py
bert/fairseq/criterions/mean_squared_error.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn.functional as F im...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/criterions/adaptive_loss.py
bert/fairseq/criterions/adaptive_loss.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch.nn.funct...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/linearized_convolution.py
bert/fairseq/modules/linearized_convolution.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn.funct...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/beamable_mm.py
bert/fairseq/modules/beamable_mm.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn as nn...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/grad_multiply.py
bert/fairseq/modules/grad_multiply.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch class GradMultiply(...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/conv_tbc.py
bert/fairseq/modules/conv_tbc.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch from torch.nn.modules...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/highway.py
bert/fairseq/modules/highway.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn.funct...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/downsampled_multihead_attention.py
bert/fairseq/modules/downsampled_multihead_attention.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. # import math import torch import...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/multihead_attention.py
bert/fairseq/modules/multihead_attention.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch from torch import nn ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/scalar_bias.py
bert/fairseq/modules/scalar_bias.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. # import torch class ScalarBias(...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/__init__.py
bert/fairseq/modules/__init__.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from .adaptive_softmax import Adap...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/adaptive_softmax.py
bert/fairseq/modules/adaptive_softmax.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn.func...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/sinusoidal_positional_embedding.py
bert/fairseq/modules/sinusoidal_positional_embedding.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch import t...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/character_token_embedder.py
bert/fairseq/modules/character_token_embedder.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import numpy as np import torch im...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/modules/learned_positional_embedding.py
bert/fairseq/modules/learned_positional_embedding.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn as nn from fairse...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/data_utils.py
bert/fairseq/data/data_utils.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import contextlib import os impor...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/glue_dataset.py
bert/fairseq/data/glue_dataset.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import numpy as np import torch f...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/bert_dataset.py
bert/fairseq/data/bert_dataset.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import numpy as np import torch f...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/monolingual_dataset.py
bert/fairseq/data/monolingual_dataset.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import numpy as np import torch f...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/iterators.py
bert/fairseq/data/iterators.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import itertools import math impo...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/token_block_dataset.py
bert/fairseq/data/token_block_dataset.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import numpy as np im...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/fairseq_dataset.py
bert/fairseq/data/fairseq_dataset.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.utils.data from fair...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/backtranslation_dataset.py
bert/fairseq/data/backtranslation_dataset.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from fairseq import sequence_gene...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/language_pair_dataset.py
bert/fairseq/data/language_pair_dataset.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import numpy as np import torch f...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/dictionary.py
bert/fairseq/data/dictionary.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from collections import Counter im...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/__init__.py
bert/fairseq/data/__init__.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from .dictionary import Dictionary...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/bert/fairseq/data/indexed_dataset.py
bert/fairseq/data/indexed_dataset.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import os import struct import nu...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/train.py
translation/train.py
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Train...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/setup.py
translation/setup.py
#!/usr/bin/env python3 # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from setupt...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/generate.py
translation/generate.py
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Trans...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/interactive.py
translation/interactive.py
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Trans...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/score.py
translation/score.py
#!/usr/bin/env python3 # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ BLEU sco...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/multiprocessing_train.py
translation/multiprocessing_train.py
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import o...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/eval_lm.py
translation/eval_lm.py
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Evalu...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/distributed_train.py
translation/distributed_train.py
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import o...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/preprocess.py
translation/preprocess.py
#!/usr/bin/env python3 # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Data pre...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/scripts/build_sym_alignment.py
translation/scripts/build_sym_alignment.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. # """ Use this script in order to ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/scripts/__init__.py
translation/scripts/__init__.py
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/scripts/average_checkpoints.py
translation/scripts/average_checkpoints.py
#!/usr/bin/env python3 import argparse import collections import torch import os import re def average_checkpoints(inputs): """Loads checkpoints from inputs and returns a model with averaged weights. Args: inputs: An iterable of string paths of checkpoints to load from. Returns: A dict of s...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/scripts/read_binarized.py
translation/scripts/read_binarized.py
#!/usr/bin/env python3 # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. # import ar...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_sequence_scorer.py
translation/tests/test_sequence_scorer.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import unittest i...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_convtbc.py
translation/tests/test_convtbc.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import unittest from ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_utils.py
translation/tests/test_utils.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import unittest import torch fro...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_reproducibility.py
translation/tests/test_reproducibility.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import contextlib from io import S...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_sequence_generator.py
translation/tests/test_sequence_generator.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import unittest i...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/utils.py
translation/tests/utils.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import torch from...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_dictionary.py
translation/tests/test_dictionary.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import tempfile import unittest i...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_label_smoothing.py
translation/tests/test_label_smoothing.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import copy import...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/__init__.py
translation/tests/__init__.py
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_binaries.py
translation/tests/test_binaries.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import contextlib from io import S...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_backtranslation_dataset.py
translation/tests/test_backtranslation_dataset.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import unittest i...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_character_token_embedder.py
translation/tests/test_character_token_embedder.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import unittest from...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_average_checkpoints.py
translation/tests/test_average_checkpoints.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import collections import os impor...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_iterators.py
translation/tests/test_iterators.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import unittest from fairseq.data...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/tests/test_train.py
translation/tests/test_train.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import contextlib from io import S...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/search.py
translation/fairseq/search.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch class Search(object...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/distributed_utils.py
translation/fairseq/distributed_utils.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from collections import namedtuple...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/utils.py
translation/fairseq/utils.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from collections import defaultdic...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/multiprocessing_pdb.py
translation/fairseq/multiprocessing_pdb.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import multiprocessing import os i...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/trainer.py
translation/fairseq/trainer.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Train a network across multipl...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/__init__.py
translation/fairseq/__init__.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from .multiprocessing_pdb import p...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/tokenizer.py
translation/fairseq/tokenizer.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from collections import Counter im...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/sequence_generator.py
translation/fairseq/sequence_generator.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch from fa...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/meters.py
translation/fairseq/meters.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import time class AverageMeter(o...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/progress_bar.py
translation/fairseq/progress_bar.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Wrapper around various loggers...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/bleu.py
translation/fairseq/bleu.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import ctypes import math import t...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/sequence_scorer.py
translation/fairseq/sequence_scorer.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch from fairseq import ...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/options.py
translation/fairseq/options.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import torch fro...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/tasks/fairseq_task.py
translation/fairseq/tasks/fairseq_task.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from fairseq.data import data_util...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/tasks/translation.py
translation/fairseq/tasks/translation.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import itertools import numpy as n...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/tasks/__init__.py
translation/fairseq/tasks/__init__.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import importlib i...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false
zhuohan123/macaron-net
https://github.com/zhuohan123/macaron-net/blob/3a84e7a3323bd1a3a9a303194ba336d670a1fb2c/translation/fairseq/tasks/language_modeling.py
translation/fairseq/tasks/language_modeling.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import itertools import numpy as n...
python
BSD-3-Clause
3a84e7a3323bd1a3a9a303194ba336d670a1fb2c
2026-01-05T07:14:10.995304Z
false