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
P2IL
P2IL-main/offline_PPIL/agent/sac.py
import os import numpy as np import torch import torch.nn.functional as F from torch.optim import Adam import hydra from utils import soft_update class SAC(object): def __init__(self, obs_dim, action_dim, action_range, batch_size, args): self.gamma = args.gamma self.batch_size = batch_size ...
9,900
38.604
98
py
P2IL
P2IL-main/offline_PPIL/agent/softq_models.py
import numpy as np import torch import torch.nn as nn from torch.distributions import Categorical import torch.nn.functional as F from torch.autograd import Variable, grad class SoftQNetwork(nn.Module): def __init__(self, obs_dim, action_dim, args, device='cpu'): super(SoftQNetwork, self).__init__() ...
6,195
33.422222
85
py
P2IL
P2IL-main/offline_PPIL/agent/sac_models.py
import torch import math import torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal from torch import distributions as pyd from torch.autograd import Variable, grad import utils LOG_SIG_MAX = 2 LOG_SIG_MIN = -20 epsilon = 1e-6 # Initialize Policy weights def weights_init_(m): i...
10,694
31.806748
137
py
P2IL
P2IL-main/offline_PPIL/agent/softq.py
import os import numpy as np import torch import torch.nn.functional as F from torch.optim import Adam, SGD from torch.distributions import Categorical import hydra from wrappers.atari_wrapper import LazyFrames """ class SoftQ(object): def __init__(self, num_inputs, action_dim, batch_size, args): self.gam...
10,280
34.329897
133
py
P2IL
P2IL-main/deep_PPIL/iq.py
""" Copyright 2022 Div Garg. All rights reserved. Standalone IQ-Learn algorithm. See LICENSE for licensing terms. """ import torch import numpy as np import torch.nn.functional as F from utils.utils import eval_mode, average_dicts, get_concat_samples, evaluate, soft_update, hard_update # Full IQ-Learn objective with...
15,788
42.616022
183
py
P2IL
P2IL-main/deep_PPIL/train.py
""" Copyright 2022 Div Garg. All rights reserved. Example training code for IQ-Learn which minimially modifies `train_rl.py`. """ import datetime import os import random import time from collections import deque from itertools import count import types import hydra import pickle import numpy as np import torch impor...
14,124
37.279133
134
py
P2IL
P2IL-main/deep_PPIL/dataset/memory.py
from collections import deque import numpy as np import random import torch from wrappers.atari_wrapper import LazyFrames from dataset.expert_dataset import ExpertDataset class Memory(object): def __init__(self, memory_size: int, seed: int = 0) -> None: random.seed(seed) self.memory_size = memory...
2,839
37.378378
99
py
P2IL
P2IL-main/deep_PPIL/dataset/expert_dataset.py
from typing import Any, Dict, IO, List, Tuple import numpy as np import pickle import torch from torch.utils.data import Dataset import os class ExpertDataset(Dataset): """Dataset for expert trajectories. Assumes expert dataset is a dict with keys {states, actions, rewards, lengths} with values containing a...
5,574
35.201299
115
py
P2IL
P2IL-main/deep_PPIL/scripts/run_bc.py
""" Copyright 2022 Div Garg. All rights reserved. Example training code for IQ-Learn which minimially modifies `train_rl.py`. """ import datetime import os import random import time from collections import deque from itertools import count import types import hydra import pickle import numpy as np import torch impor...
3,814
31.606838
106
py
P2IL
P2IL-main/deep_PPIL/scripts/run_bc_discrete.py
""" Copyright 2022 Div Garg. All rights reserved. Example training code for IQ-Learn which minimially modifies `train_rl.py`. """ import datetime import os import random import time from collections import deque from itertools import count import types import hydra import pickle import numpy as np import torch impor...
6,062
35.089286
157
py
P2IL
P2IL-main/deep_PPIL/wrappers/atari_wrapper.py
import gym import numpy as np import torch from collections import deque from gym import spaces class FrameStack(gym.Wrapper): def __init__(self, env, k): """Stack k last frames. Returns lazy array, which is much more memory efficient. Expects inputs to be of shape num_channels x height x ...
2,968
30.252632
96
py
P2IL
P2IL-main/deep_PPIL/utils/utils.py
import numpy as np import torch from torch import nn import torch.nn.functional as F from torch.autograd import Variable from torchvision.utils import make_grid, save_image class eval_mode(object): def __init__(self, *models): self.models = models def __enter__(self): self.prev_states = [] ...
4,903
33.055556
123
py
P2IL
P2IL-main/deep_PPIL/utils/logger.py
from collections import defaultdict import json import os import csv import shutil import torch import torchvision import numpy as np from torch.utils.tensorboard import SummaryWriter from termcolor import colored COMMON_TRAIN_FORMAT = [ ('episode', 'E', 'int'), ('step', 'S', 'int'), ('episode_reward', 'R'...
8,175
33.352941
81
py
P2IL
P2IL-main/deep_PPIL/agent/sac.py
import os import numpy as np import torch import torch.nn.functional as F from torch.optim import Adam import hydra from utils.utils import soft_update class SAC(object): def __init__(self, obs_dim, action_dim, action_range, batch_size, args): self.gamma = args.gamma self.batch_size = batch_size ...
9,790
38.164
94
py
P2IL
P2IL-main/deep_PPIL/agent/softq_models.py
import numpy as np import torch import torch.nn as nn from torch.distributions import Categorical import torch.nn.functional as F from torch.autograd import Variable, grad class SoftQNetwork(nn.Module): def __init__(self, obs_dim, action_dim, args, device='cpu'): super(SoftQNetwork, self).__init__() ...
5,765
33.526946
85
py
P2IL
P2IL-main/deep_PPIL/agent/sac_models.py
import torch import math import torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal from torch import distributions as pyd from torch.autograd import Variable, grad import utils.utils as utils LOG_SIG_MAX = 2 LOG_SIG_MIN = -20 epsilon = 1e-6 # Initialize Policy weights def weights_...
11,672
31.606145
137
py
P2IL
P2IL-main/deep_PPIL/agent/softq.py
import os import numpy as np import torch import torch.nn.functional as F from torch.optim import Adam, SGD, Adagrad from torch.distributions import Categorical import hydra from wrappers.atari_wrapper import LazyFrames class SoftQ(object): def __init__(self, num_inputs, action_dim, batch_size, args): se...
5,633
34.2125
106
py
FILD
FILD-master/FILD++/research/object_detection/model_lib_v2.py
# Copyright 2019 The TensorFlow 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 applica...
33,277
40.390547
94
py
FILD
FILD-master/FILD++/research/object_detection/model_lib_v2_test.py
# Copyright 2017 The TensorFlow 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 applica...
3,383
31.228571
80
py
FILD
FILD-master/FILD++/research/object_detection/model_lib.py
# Copyright 2017 The TensorFlow 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 applica...
37,321
41.507973
104
py
FILD
FILD-master/FILD++/research/object_detection/core/freezable_batch_norm_test.py
# Copyright 2018 The TensorFlow 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 applica...
7,723
39.652632
80
py
FILD
FILD-master/FILD++/research/object_detection/core/freezable_batch_norm.py
# Copyright 2018 The TensorFlow 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 applica...
2,982
42.231884
80
py
FILD
FILD-master/FILD++/research/object_detection/core/model.py
# Copyright 2017 The TensorFlow 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 applica...
16,018
41.603723
80
py
FILD
FILD-master/FILD++/research/object_detection/core/box_predictor.py
# Copyright 2017 The TensorFlow 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 applica...
10,176
43.635965
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_resnet_v1_fpn_feature_extractor_testbase.py
# Copyright 2017 The TensorFlow 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 applica...
7,405
39.032432
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_v3_feature_extractor_testbase.py
# Copyright 2019 The TensorFlow 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 applica...
4,607
38.384615
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_v1_fpn_keras_feature_extractor.py
# Copyright 2018 The TensorFlow 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 applica...
10,648
43.370833
80
py
FILD
FILD-master/FILD++/research/object_detection/models/feature_map_generators.py
# Copyright 2017 The TensorFlow 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 applica...
35,369
42.134146
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_v2_fpn_keras_feature_extractor.py
# Copyright 2018 The TensorFlow 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 applica...
10,578
43.44958
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_v1_feature_extractor_test.py
# Copyright 2017 The TensorFlow 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 applica...
10,665
34.912458
80
py
FILD
FILD-master/FILD++/research/object_detection/models/feature_map_generators_test.py
# Copyright 2017 The TensorFlow 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 applica...
37,035
40.427293
80
py
FILD
FILD-master/FILD++/research/object_detection/models/faster_rcnn_inception_resnet_v2_keras_feature_extractor.py
# Copyright 2019 The TensorFlow 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 applica...
152,133
139.864815
186
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_v2_keras_feature_extractor.py
# Copyright 2018 The TensorFlow 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 applica...
6,932
40.267857
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_edgetpu_feature_extractor_testbase.py
# Copyright 2019 The TensorFlow 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 applica...
4,575
38.448276
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_edgetpu_feature_extractor_test.py
# Copyright 2019 The TensorFlow 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 applica...
2,500
36.328358
84
py
FILD
FILD-master/FILD++/research/object_detection/models/faster_rcnn_inception_resnet_v2_keras_feature_extractor_test.py
# Copyright 2017 The TensorFlow 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 applica...
4,629
41.090909
108
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_v1_keras_feature_extractor.py
# Copyright 2017 The TensorFlow 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 applica...
6,870
39.89881
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_v3_feature_extractor_test.py
# Copyright 2019 The TensorFlow 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 applica...
3,852
35.009346
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_resnet_v1_fpn_feature_extractor_test.py
# Copyright 2017 The TensorFlow 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 applica...
5,139
39.472441
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_feature_extractor_test.py
# Copyright 2017 The TensorFlow 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 applica...
8,544
36.643172
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_v2_feature_extractor_test.py
# Copyright 2018 The TensorFlow 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 applica...
9,504
40.688596
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_resnet_v1_fpn_keras_feature_extractor.py
# Copyright 2019 The TensorFlow 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 applica...
20,521
44.604444
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_v2_fpn_feature_extractor_test.py
# Copyright 2018 The TensorFlow 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 applica...
16,811
37.559633
80
py
FILD
FILD-master/FILD++/research/object_detection/models/ssd_mobilenet_v1_fpn_feature_extractor_test.py
# Copyright 2018 The TensorFlow 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 applica...
9,782
41.534783
80
py
FILD
FILD-master/FILD++/research/object_detection/models/keras_models/inception_resnet_v2_test.py
# Copyright 2019 The TensorFlow 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 applica...
8,272
35.933036
80
py
FILD
FILD-master/FILD++/research/object_detection/models/keras_models/mobilenet_v2.py
# Copyright 2018 The TensorFlow 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 applica...
13,451
39.155224
80
py
FILD
FILD-master/FILD++/research/object_detection/models/keras_models/resnet_v1_test.py
# Copyright 2019 The TensorFlow 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 applica...
6,890
36.451087
80
py
FILD
FILD-master/FILD++/research/object_detection/models/keras_models/resnet_v1.py
# Copyright 2019 The TensorFlow 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 applica...
16,456
40.349246
80
py
FILD
FILD-master/FILD++/research/object_detection/models/keras_models/model_utils.py
# Copyright 2019 The TensorFlow 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 applica...
1,903
34.259259
80
py
FILD
FILD-master/FILD++/research/object_detection/models/keras_models/mobilenet_v2_test.py
# Copyright 2018 The TensorFlow 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 applica...
9,411
36.951613
80
py
FILD
FILD-master/FILD++/research/object_detection/models/keras_models/inception_resnet_v2.py
# Copyright 2019 The TensorFlow 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 applica...
10,299
41.040816
80
py
FILD
FILD-master/FILD++/research/object_detection/models/keras_models/mobilenet_v1_test.py
# Copyright 2018 The TensorFlow 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 applica...
9,340
35.065637
80
py
FILD
FILD-master/FILD++/research/object_detection/models/keras_models/mobilenet_v1.py
# Copyright 2018 The TensorFlow 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 applica...
14,408
40.405172
80
py
FILD
FILD-master/FILD++/research/object_detection/models/keras_models/base_models/original_mobilenet_v2.py
# Copyright 2019 The TensorFlow 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 applic...
18,832
38.235417
92
py
FILD
FILD-master/FILD++/research/object_detection/predictors/convolutional_keras_box_predictor_test.py
# Copyright 2017 The TensorFlow 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 applica...
41,554
44.715072
90
py
FILD
FILD-master/FILD++/research/object_detection/predictors/rfcn_keras_box_predictor.py
# Copyright 2017 The TensorFlow 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 applica...
8,439
40.170732
80
py
FILD
FILD-master/FILD++/research/object_detection/predictors/rfcn_keras_box_predictor_test.py
# Copyright 2017 The TensorFlow 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 applica...
2,858
35.653846
81
py
FILD
FILD-master/FILD++/research/object_detection/predictors/convolutional_keras_box_predictor.py
# Copyright 2017 The TensorFlow 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 applica...
20,996
43.018868
80
py
FILD
FILD-master/FILD++/research/object_detection/predictors/mask_rcnn_keras_box_predictor_test.py
# Copyright 2017 The TensorFlow 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 applica...
5,668
39.205674
86
py
FILD
FILD-master/FILD++/research/object_detection/predictors/heads/keras_mask_head.py
# Copyright 2017 The TensorFlow 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 applica...
18,472
40.794118
80
py
FILD
FILD-master/FILD++/research/object_detection/predictors/heads/keras_class_head_test.py
# Copyright 2018 The TensorFlow 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 applica...
7,177
36.385417
80
py
FILD
FILD-master/FILD++/research/object_detection/predictors/heads/keras_box_head_test.py
# Copyright 2017 The TensorFlow 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 applica...
6,858
36.075676
80
py
FILD
FILD-master/FILD++/research/object_detection/predictors/heads/keras_mask_head_test.py
# Copyright 2018 The TensorFlow 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 applica...
8,470
35.830435
80
py
FILD
FILD-master/FILD++/research/object_detection/predictors/heads/head.py
# Copyright 2017 The TensorFlow 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 applica...
2,628
31.060976
80
py
FILD
FILD-master/FILD++/research/object_detection/predictors/heads/keras_box_head.py
# Copyright 2018 The TensorFlow 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 applica...
13,670
39.931138
80
py
FILD
FILD-master/FILD++/research/object_detection/predictors/heads/keras_class_head.py
# Copyright 2018 The TensorFlow 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 applica...
14,761
40.9375
80
py
FILD
FILD-master/FILD++/research/object_detection/meta_architectures/rfcn_meta_arch.py
# Copyright 2017 The TensorFlow 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 applica...
19,099
48.739583
80
py
FILD
FILD-master/FILD++/research/object_detection/meta_architectures/ssd_meta_arch_test_lib.py
# Copyright 2018 The TensorFlow 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 applica...
9,215
34.859922
104
py
FILD
FILD-master/FILD++/research/object_detection/meta_architectures/ssd_meta_arch.py
# Copyright 2017 The TensorFlow 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 applica...
61,387
43.874269
80
py
FILD
FILD-master/FILD++/research/object_detection/meta_architectures/ssd_meta_arch_test.py
# Copyright 2017 The TensorFlow 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 applica...
38,157
47.857875
104
py
FILD
FILD-master/FILD++/research/object_detection/meta_architectures/faster_rcnn_meta_arch_test_lib.py
# Copyright 2017 The TensorFlow 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 applica...
87,667
41.744027
104
py
FILD
FILD-master/FILD++/research/object_detection/meta_architectures/faster_rcnn_meta_arch.py
# Copyright 2017 The TensorFlow 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 applica...
138,151
47.593739
80
py
FILD
FILD-master/FILD++/research/object_detection/meta_architectures/faster_rcnn_meta_arch_test.py
# Copyright 2017 The TensorFlow 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 applica...
26,815
44.996569
80
py
FILD
FILD-master/FILD++/research/object_detection/utils/model_util_test.py
# Copyright 2019 The TensorFlow 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 applica...
2,048
33.728814
80
py
FILD
FILD-master/FILD++/research/object_detection/utils/model_util.py
# Copyright 2019 The TensorFlow 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 applica...
3,536
37.032258
80
py
FILD
FILD-master/FILD++/research/object_detection/builders/model_builder.py
# Copyright 2017 The TensorFlow 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 applica...
29,126
44.725275
119
py
FILD
FILD-master/FILD++/research/object_detection/builders/box_predictor_builder.py
# Copyright 2017 The TensorFlow 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 applica...
46,974
47.130123
80
py
FILD
FILD-master/FILD++/research/object_detection/builders/optimizer_builder.py
# Copyright 2017 The TensorFlow 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 applica...
7,312
35.20297
80
py
FILD
FILD-master/FILD++/research/object_detection/builders/hyperparams_builder_test.py
# Copyright 2017 The TensorFlow 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 applica...
29,635
33.221709
80
py
FILD
FILD-master/FILD++/research/object_detection/builders/hyperparams_builder.py
# Copyright 2017 The TensorFlow 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 applica...
16,260
37.809069
80
py
FILD
FILD-master/FILD++/research/slim/nets/resnet_utils.py
# Copyright 2016 The TensorFlow 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,950
42.144404
80
py
FILD
FILD-master/FILD++/research/slim/datasets/build_imagenet_data.py
# Copyright 2016 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...
26,219
36.13881
87
py
GLAT
GLAT-main/setup.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import subprocess import sys from setuptools import setup, find_packages, Extension from setuptools import E...
7,575
28.02682
92
py
GLAT
GLAT-main/hubconf.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """isort:skip_file""" import functools import importlib dependencies = [ "dataclasses", "hydra", "numpy", "omegaconf", "...
2,099
27.378378
82
py
GLAT
GLAT-main/glat_plugins/criterions/ctc_loss.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math from math import log import torch import torch.nn.functional as F from fairseq import metrics, utils from fairseq.criterions impo...
9,040
35.309237
106
py
GLAT
GLAT-main/glat_plugins/criterions/glat_loss.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math from math import log import torch import torch.nn.functional as F from fairseq import metrics, utils from fairseq.criterions impo...
7,175
34.349754
104
py
GLAT
GLAT-main/glat_plugins/models/glat_ctc.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch from fairseq import utils from fairseq.iterative_refinement_generator import DecoderOut from fairseq.models import register_model...
13,483
39.130952
118
py
GLAT
GLAT-main/glat_plugins/models/glat.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch from fairseq import utils from fairseq.iterative_refinement_generator import DecoderOut from fairseq.models import register_model...
9,268
39.832599
128
py
GLAT
GLAT-main/glat_plugins/tasks/translation_lev_modified.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from dataclasses import dataclass, field from math import log import torch from fairseq import utils from fairseq.data import LanguagePairData...
10,504
39.403846
103
py
GLAT
GLAT-main/scripts/average_checkpoints.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import collections import os import re import torch from fairseq.file_io import PathManager def aver...
6,021
36.874214
175
py
GLAT
GLAT-main/fairseq/checkpoint_utils.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import ast import collections import contextlib import logging import os import re import traceback from collections import OrderedDict from t...
26,211
36.127479
115
py
GLAT
GLAT-main/fairseq/utils.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import contextlib import copy import importlib import logging import os import sys import tempfile import warnings from iterto...
23,616
30.871795
111
py
GLAT
GLAT-main/fairseq/hub_utils.py
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import copy import logging import os from typing import Any, Dict, Iterator, List import torch from...
10,859
35.32107
88
py
GLAT
GLAT-main/fairseq/sequence_scorer.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import sys import torch from fairseq import utils class SequenceScorer(object): """Scores the target for a given source sentence.""" ...
5,450
34.396104
101
py
GLAT
GLAT-main/fairseq/binarizer.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os from collections import Counter import torch from fairseq.file_io import PathManager from fairseq.tokenizer import tokenize_line fr...
3,875
32.704348
84
py
GLAT
GLAT-main/fairseq/sequence_generator.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math from typing import Dict, List, Optional import torch import torch.nn as nn from fairseq import search, utils from fairseq.data im...
38,422
38.652219
110
py
GLAT
GLAT-main/fairseq/ngram_repeat_block.py
# Originally from Microsoft Corporation. # Licensed under the MIT License. """ Wrapper for ngram_repeat_block cuda extension """ import torch from torch import nn import math from typing import Dict, List, Optional import warnings try: from fairseq import ngram_repeat_block_cuda EXTENSION_BUILT = True excep...
5,276
33.94702
102
py
GLAT
GLAT-main/fairseq/options.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse from typing import Callable, List, Optional import torch from fairseq import utils from fairseq.data.indexed_dataset import g...
13,837
37.016484
88
py
GLAT
GLAT-main/fairseq/token_generation_constraints.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Implements tracking of constraints for a beam item. A list of constraints is given as a list of one or more token sequences, each of lengt...
16,555
31.654832
96
py
GLAT
GLAT-main/fairseq/file_utils.py
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Utilities for working with the local dataset cache. This file is adapted from `AllenNLP <https://github.com/allenai/allennlp>`_. and `hugg...
11,233
30.734463
92
py