repo
stringlengths
1
99
file
stringlengths
13
215
code
stringlengths
12
59.2M
file_length
int64
12
59.2M
avg_line_length
float64
3.82
1.48M
max_line_length
int64
12
2.51M
extension_type
stringclasses
1 value
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/module_base.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
3,428
32.950495
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/hyperparams_test.py
""" Unit tests of :class:`HParams`. """ import copy import pickle import tempfile import unittest from texar.torch.hyperparams import HParams class HParamsTest(unittest.TestCase): r"""Tests hyperparameter related operations. """ def test_hparams(self): r"""Tests the HParams class. """ ...
5,005
28.797619
78
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
1,015
31.774194
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/hyperparams.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
15,309
39.935829
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
1,000
37.5
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/networks/network_base.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
5,781
32.229885
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/networks/networks.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
3,483
31.259259
77
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/networks/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
799
37.095238
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/networks/conv_networks.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
28,241
41.920973
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/networks/conv_networks_test.py
# """ Unit tests for conv networks. """ import unittest import torch from torch import nn from texar.torch.core.layers import MergeLayer from texar.torch.modules.networks.conv_networks import Conv1DNetwork class Conv1DNetworkTest(unittest.TestCase): """Tests :class:`~texar.torch.modules.Conv1DNetwork` class. ...
8,853
36.516949
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/networks/networks_test.py
""" Unit tests for feed forward neural networks. """ import unittest import torch from texar.torch.modules.networks.networks import FeedForwardNetwork class FeedForwardNetworkTest(unittest.TestCase): """Tests the class :class:`~texar.torch.modules.networks.networks.FeedForwardNetwork`. """ def tes...
1,276
24.54
71
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/decoder_helpers.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
29,357
40.06014
100
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/xlnet_decoder.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
13,945
37.846797
101
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/xlnet_decoder_test.py
""" Unit tests for XLNet decoder. """ import unittest import torch from texar.torch.modules.decoders.xlnet_decoder import * from texar.torch.utils.test import pretrained_test class XLNetDecoderTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.XLNetDecoder` """ def setUp(self) -> None: ...
3,796
31.452991
73
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/rnn_decoders_test.py
""" Unit tests for RNN decoders. """ import unittest import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from texar.torch.hyperparams import HParams from texar.torch.modules.decoders.decoder_helpers import get_helper from texar.torch.modules.decoders.rnn_decoders import ( Attent...
12,414
38.164038
86
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/gpt2_decoder.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
11,808
37.340909
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/gpt2_decoder_test.py
""" Unit tests for GPT2 decoder. """ import unittest import torch from texar.torch.modules.decoders import decoder_helpers from texar.torch.modules.decoders.gpt2_decoder import GPT2Decoder from texar.torch.modules.decoders.transformer_decoders import \ TransformerDecoderOutput from texar.torch.utils.test import p...
7,226
30.697368
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/decoder_helpers_test.py
""" Unit tests for Transformer decoder. """ import unittest import torch from texar.torch.modules.decoders.decoder_helpers import ( GreedyEmbeddingHelper, TopKSampleEmbeddingHelper, TopPSampleEmbeddingHelper) class SamplerTest(unittest.TestCase): r"""Tests decoder helper utilities. """ def setUp(se...
1,651
34.148936
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/rnn_decoders.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
37,264
43.951749
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/transformer_decoders.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
34,438
43.494832
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
1,066
41.68
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/rnn_decoder_base.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
9,905
39.765432
89
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/decoder_base.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
25,207
42.090598
88
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/decoders/transformer_decoders_test.py
""" Unit tests for Transformer decoder. """ import unittest import torch import torch.nn.functional as F from texar.torch.core.layers import identity from texar.torch.modules.decoders import decoder_helpers from texar.torch.modules.decoders.transformer_decoders import ( TransformerDecoder, TransformerDecoderOutpu...
7,739
35.857143
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/bert.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
15,815
42.450549
101
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/roberta.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
8,666
38.940092
78
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/bert_test.py
""" Unit tests for BERT utils. """ import os import unittest from texar.torch.modules.pretrained.bert import * from texar.torch.utils.test import pretrained_test class BERTUtilsTest(unittest.TestCase): r"""Tests BERT utils. """ @pretrained_test def test_load_pretrained_bert_AND_transform_bert_to_te...
2,903
29.893617
75
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/pretrained_base.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
9,407
36.185771
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/xlnet_test.py
""" Unit tests for XLNet utils. """ import os import unittest from texar.torch.modules.pretrained.xlnet import * from texar.torch.utils.test import pretrained_test class XLNetUtilsTest(unittest.TestCase): r"""Tests XLNet utils. """ @pretrained_test def test_load_pretrained_xlnet_AND_transform_xlnet...
1,424
28.6875
77
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/xlnet.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
9,367
40.268722
83
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/gpt2.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
12,914
39.741325
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/gpt2_test.py
""" Unit tests for GPT2 utils. """ import os import unittest from texar.torch.modules.pretrained.gpt2 import * from texar.torch.utils.test import pretrained_test class GPT2UtilsTest(unittest.TestCase): r"""Tests GPT2 utils. """ @pretrained_test def test_load_pretrained_gpt2_AND_transform_gpt2_to_te...
2,982
29.131313
75
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
916
38.869565
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/roberta_test.py
""" Unit tests for RoBERTa utils. """ import os import unittest from texar.torch.modules.pretrained.roberta import * from texar.torch.utils.test import pretrained_test class RoBERTaUtilsTest(unittest.TestCase): r"""Tests RoBERTa utils. """ @pretrained_test def test_load_pretrained_roberta_AND_trans...
2,669
29
75
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/xlnet_utils_test.py
""" Unit tests for XLNet model utils. """ import unittest import torch from texar.torch.modules.pretrained.xlnet_utils import * class XLNetModelUtilsTest(unittest.TestCase): r"""Tests XLNet model utils. """ def test_PositionWiseFF(self): # Case 1 model = PositionWiseFF() input...
2,526
27.715909
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/pretrained/xlnet_utils.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
14,306
35.968992
77
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/multihead_attention.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
9,067
33.743295
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/gpt2_encoder_test.py
""" Unit tests for GPT2 encoder. """ import unittest import torch from texar.torch.modules.encoders.gpt2_encoder import GPT2Encoder from texar.torch.utils.test import pretrained_test class GPT2EncoderTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.GPT2Encoder` class. """ def setUp(self) ...
5,895
30.195767
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/transformer_encoder_test.py
""" Unit tests for Transformer encoder. """ import unittest import torch from texar.torch.modules.encoders import TransformerEncoder class TransformerEncoderTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.TransformerEncoder` """ def setUp(self): self._batch_size = 2 self...
2,699
33.177215
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/roberta_encoder.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
9,687
36.550388
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/xlnet_encoder_test.py
""" Unit tests for XLNet encoder. """ import unittest import torch from texar.torch.modules.encoders.xlnet_encoder import XLNetEncoder from texar.torch.utils.test import pretrained_test class XLNetEncoderTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.XLNetEncoder` class. """ def setUp(...
4,901
30.423077
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/conv_encoders.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
1,974
35.574074
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/gpt2_encoder.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
11,304
35.824104
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/transformer_encoder.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
14,083
35.205656
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/bert_encoder_test.py
""" Unit tests for BERT encoders. """ import unittest import torch from texar.torch.modules.encoders.bert_encoder import BERTEncoder from texar.torch.utils.test import pretrained_test class BERTEncoderTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.BERTEncoder` class. """ def setUp(sel...
6,221
30.744898
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/encoder_base.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
1,073
27.263158
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/conv_encoders_test.py
""" Unit tests for conv encoders. """ import unittest import torch from torch import nn from texar.torch.core.layers import MergeLayer from texar.torch.modules.encoders.conv_encoders import Conv1DEncoder class Conv1DEncoderTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.Conv1DEncoder` class. ...
2,466
33.746479
76
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
1,171
42.407407
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/rnn_encoders_test.py
# -*- coding: utf-8 -*- # """ Unit tests for RNN encoders. """ import unittest import torch from texar.torch.modules.encoders.rnn_encoders import ( UnidirectionalRNNEncoder, BidirectionalRNNEncoder) class UnidirectionalRNNEncoderTest(unittest.TestCase): r"""Tests unidirectional rnn encoder. """ de...
8,699
36.662338
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/roberta_encoder_test.py
""" Unit tests for RoBERTa encoders. """ import unittest import torch from texar.torch.modules.encoders.roberta_encoder import RoBERTaEncoder from texar.torch.utils.test import pretrained_test class RoBERTaEncoderTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.RoBERTaEncoder` class. """ ...
6,199
30.958763
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/bert_encoder.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
13,415
36.791549
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/xlnet_encoder.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
22,167
40.051852
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/encoders/rnn_encoders.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
32,661
38.542373
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/regressors/xlnet_regressor_test.py
""" Unit tests for XLNet regressor. """ import unittest import torch from texar.torch.modules.regressors.xlnet_regressor import * from texar.torch.utils.test import pretrained_test class XLNetRegressorTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.XLNetRegressor` class. """ def setUp(...
3,626
28.487805
77
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/regressors/xlnet_regressor.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
11,292
38.348432
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/regressors/regressor_base.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
1,083
27.526316
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/regressors/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
771
37.6
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/classifier_base.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
1,088
27.657895
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/bert_classifier_test.py
""" Unit tests for BERT classifiers. """ import unittest import torch from texar.torch.modules.classifiers.bert_classifier import * from texar.torch.utils.test import pretrained_test class BERTClassifierTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.BERTClassifier` class. """ def setU...
5,947
30.978495
76
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/conv_classifiers.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
11,073
37.186207
114
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/xlnet_classifier.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
13,732
39.154971
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/roberta_classifier.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
7,175
38.646409
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/roberta_classifier_test.py
""" Unit tests for RoBERTa classifiers. """ import unittest import torch from texar.torch.modules.classifiers.roberta_classifier import * from texar.torch.utils.test import pretrained_test class RoBERTaClassifierTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.RoBERTaClassifier` class. """ ...
5,987
31.02139
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/conv_classifiers_test.py
# """ Unit tests for conv encoders. """ import unittest import torch from torch import nn from texar.torch.modules.classifiers.conv_classifiers import Conv1DClassifier class Conv1DClassifierTest(unittest.TestCase): """Tests :class:`~texar.torch.modules.Conv1DClassifier` class. """ def test_classifier(s...
2,079
32.015873
77
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/gpt2_classifier.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
11,764
38.746622
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
1,028
41.875
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/gpt2_classifier_test.py
""" Unit tests for GPT2 classifier. """ import unittest import torch from texar.torch.modules.classifiers.gpt2_classifier import * from texar.torch.utils.test import pretrained_test class GPT2ClassifierTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.GPT2Classifier` class. """ def setUp...
5,933
31.075676
76
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/xlnet_classifier_test.py
""" Unit tests for XLNet classifiers. """ import unittest import torch from texar.torch.modules.classifiers.xlnet_classifier import * from texar.torch.utils.test import pretrained_test class XLNetClassifierTest(unittest.TestCase): r"""Tests :class:`~texar.torch.modules.XLNetClassifier` class. """ def ...
6,271
31
77
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/classifiers/bert_classifier.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
12,131
39.039604
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/embedders/embedder_utils_test.py
# """ Unit tests for embedder utils. """ import unittest from texar.torch.modules.embedders import embedder_utils class GetEmbeddingTest(unittest.TestCase): """Tests embedding creator. """ def test_get_embedding(self): """Tests :func:`~texar.torch.modules.embedder.embedder_utils.get_embedding`....
1,071
26.487179
84
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/embedders/embedder_utils.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
7,212
36.764398
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/embedders/embedders_test.py
# """ Unit tests for embedders. """ import unittest import numpy as np import torch from texar.torch.modules.embedders.embedders import WordEmbedder from texar.torch.modules.embedders.position_embedders import ( PositionEmbedder, SinusoidsPositionEmbedder) class EmbedderTest(unittest.TestCase): """Tests pa...
5,806
34.625767
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/embedders/position_embedders.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
14,616
37.164491
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/embedders/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
824
38.285714
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/embedders/embedders.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
9,955
35.738007
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/embedders/embedder_base.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
5,189
34.306122
78
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/connectors/connector_base.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
2,434
35.343284
77
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/connectors/connectors.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
32,208
37.162322
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/connectors/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
766
37.35
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/modules/connectors/connectors_test.py
""" Unit tests for connectors. """ from __future__ import unicode_literals from collections import namedtuple import unittest import torch import torch.distributions as tds from texar.torch.core import layers from texar.torch.modules.connectors.connectors import ConstantConnector from texar.torch.modules.connectors....
7,566
36.460396
75
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/optimization.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
17,509
37.065217
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/attention_mechanism.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
41,696
43.170551
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/attention_mechanism_test.py
""" Unit tests for attention mechanism. """ import unittest import numpy as np import torch from texar.torch.core.attention_mechanism import * class AttentionMechanismTest(unittest.TestCase): r"""Tests attention mechanism. """ def setUp(self): self._batch_size = 8 self._max_time = 16 ...
9,627
38.297959
76
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/cell_wrappers.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
30,028
39.800272
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/cell_wrappers_test.py
""" Unit tests of :mod:`texar.torch.core.cell_wrappers` and :func:`~texar.torch.core.layers.get_rnn_cell`. """ import unittest import torch from torch import nn from texar.torch.core import cell_wrappers as wrappers from texar.torch.core.layers import default_rnn_cell_hparams, get_rnn_cell from texar.torch.hyperpara...
3,336
35.271739
78
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/layers.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
25,561
35.053597
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/optimization_test.py
""" Unit tests for various optimization related utilities. """ import unittest import torch from texar.torch.core.optimization import * class OptimizationTest(unittest.TestCase): r"""Test optimization. """ def setUp(self): N, D_in, H, D_out = 64, 100, 10, 1 self.x = torch.randn(N, D_i...
7,754
27.722222
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/regularizers_test.py
""" Unit tests for regularizers. """ import unittest import torch from texar.torch.core.regularizers import * class RegularizerTest(unittest.TestCase): r"""Test regularizers. """ def setUp(self): self.x = torch.tensor([-1, 2, -3, 4, -5]) self.l1 = 0.1 self.l2 = 0.2 def tes...
1,727
27.327869
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/layers_test.py
""" Unit tests for various layers. """ import unittest import torch import torch.nn.functional as F from torch import nn from texar.torch.core import layers class GetActivationFnTest(unittest.TestCase): r"""Tests :func:`texar.torch.core.layers.get_activation_fn`. """ def test_get_activation_fn(self): ...
5,731
32.520468
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/regularizers.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
2,958
24.290598
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/__init__.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
915
37.166667
74
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/attention_mechanism_utils.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
7,406
33.291667
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/core/attention_mechanism_utils_test.py
""" Unit tests for attention mechanism utils. """ import unittest import torch from texar.torch.core.attention_mechanism import ( maybe_mask_score, prepare_memory, safe_cumprod) from texar.torch.core.attention_mechanism_utils import hardmax, sparsemax class AttentionMechanismUtilsTest(unittest.TestCase): r...
3,209
34.666667
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/evals/bleu_moses.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
6,241
35.717647
79
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/evals/bleu_transformer.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
8,639
34.265306
100
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/evals/bleu_test.py
""" Unit tests for bleu. """ import unittest import numpy as np from texar.torch.evals.bleu import sentence_bleu, corpus_bleu class BLEUTest(unittest.TestCase): r"""Tests bleu. """ def _test_sentence_bleu(self, references, hypothesis, lowercase, true_bleu): bleu = s...
3,578
37.074468
77
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/evals/metrics_test.py
""" Unit tests for metrics. """ import unittest import torch from texar.torch.evals import metrics class MetricsTest(unittest.TestCase): r"""Tests metrics. """ def test_accuracy(self): r"""Tests :meth:`~texar.torch.evals.accuracy`. """ labels = torch.tensor([1, 2, 3, 4, 5, 6, 7...
1,175
25.133333
69
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/evals/bleu.py
# Copyright 2017 Google Inc. All Rights Reserved. # # 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 a...
8,258
36.202703
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/evals/metrics.py
# Copyright 2019 The Texar Authors. All Rights Reserved. # # 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 ...
2,438
31.959459
80
py
Diagnose_VLN
Diagnose_VLN-master/touchdown/model/VLN-Transformer/texar/torch/evals/bleu_moses_test.py
# -*- coding: utf-8 -*- # """ Unit tests for bleu_moses. """ import unittest import numpy as np from texar.torch.evals.bleu_moses import sentence_bleu_moses, corpus_bleu_moses class BLEUMosesTest(unittest.TestCase): r"""Tests bleu moses. """ def _test_sentence_bleu(self, references, hypothesis, lowerc...
3,658
36.721649
79
py