python_code stringlengths 0 4.04M | repo_name stringlengths 7 58 | file_path stringlengths 5 147 |
|---|---|---|
checkpoint_config = dict(interval=1)
# yapf:disable
log_config = dict(
interval=50,
hooks=[
dict(type='CustomizedTextLoggerHook'),
# dict(type='TensorboardLoggerHook')
])
# yapf:enable
custom_hooks = [dict(type='NumClassCheckHook')]
dist_params = dict(backend='nccl')
log_level = 'INFO'
load... | ConvNeXt-main | object_detection/configs/_base_/default_runtime.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# model settings
model = dict(
type='MaskRCNN',
pretrained=None,
backbone=dict(
type='ConvNeXt',
... | ConvNeXt-main | object_detection/configs/_base_/models/mask_rcnn_convnext_fpn.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# model settings
model = dict(
type='CascadeRCNN',
pretrained=None,
backbone=dict(
type='ConvNeXt',
... | ConvNeXt-main | object_detection/configs/_base_/models/cascade_mask_rcnn_convnext_fpn.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/mask_rcnn_convnext_fpn.py',
'../_base_/datasets/coco_instance.py',
'../_base_/s... | ConvNeXt-main | object_detection/configs/convnext/mask_rcnn_convnext_tiny_patch4_window7_mstrain_480-800_adamw_3x_coco_in1k.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/cascade_mask_rcnn_convnext_fpn.py',
'../_base_/datasets/coco_instance.py',
'../... | ConvNeXt-main | object_detection/configs/convnext/cascade_mask_rcnn_convnext_small_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco_in1k.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/cascade_mask_rcnn_convnext_fpn.py',
'../_base_/datasets/coco_instance.py',
'../... | ConvNeXt-main | object_detection/configs/convnext/cascade_mask_rcnn_convnext_large_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco_in22k.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/cascade_mask_rcnn_convnext_fpn.py',
'../_base_/datasets/coco_instance.py',
'../... | ConvNeXt-main | object_detection/configs/convnext/cascade_mask_rcnn_convnext_base_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco_in1k.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/cascade_mask_rcnn_convnext_fpn.py',
'../_base_/datasets/coco_instance.py',
'../... | ConvNeXt-main | object_detection/configs/convnext/cascade_mask_rcnn_convnext_xlarge_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco_in22k.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/cascade_mask_rcnn_convnext_fpn.py',
'../_base_/datasets/coco_instance.py',
'../... | ConvNeXt-main | object_detection/configs/convnext/cascade_mask_rcnn_convnext_tiny_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco_in1k.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/cascade_mask_rcnn_convnext_fpn.py',
'../_base_/datasets/coco_instance.py',
'../... | ConvNeXt-main | object_detection/configs/convnext/cascade_mask_rcnn_convnext_base_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco_in22k.py |
from .darknet import Darknet
from .detectors_resnet import DetectoRS_ResNet
from .detectors_resnext import DetectoRS_ResNeXt
from .hourglass import HourglassNet
from .hrnet import HRNet
from .regnet import RegNet
from .res2net import Res2Net
from .resnest import ResNeSt
from .resnet import ResNet, ResNetV1d
from .resne... | ConvNeXt-main | object_detection/mmdet/models/backbones/__init__.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from functools import partial
import torch
import torch.nn as nn
import torch.nn.functional as F
from timm.models.layers... | ConvNeXt-main | object_detection/mmdet/models/backbones/convnext.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import json
from mmcv.runner import OPTIMIZER_BUILDERS, DefaultOptimizerConstructor
from mmcv.runner import get_dist_inf... | ConvNeXt-main | semantic_segmentation/mmcv_custom/layer_decay_optimizer_constructor.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
# -*- coding: utf-8 -*-
from .checkpoint import load_checkpoint
from .layer_decay_optimizer_constructor import Learning... | ConvNeXt-main | semantic_segmentation/mmcv_custom/__init__.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import datetime
from collections import OrderedDict
import torch
import mmcv
from mmcv.runner import HOOKS
from mmcv.r... | ConvNeXt-main | semantic_segmentation/mmcv_custom/customized_text.py |
# Copyright (c) Open-MMLab. All rights reserved.
import os.path as osp
import time
from tempfile import TemporaryDirectory
import torch
from torch.optim import Optimizer
import mmcv
from mmcv.parallel import is_module_wrapper
from mmcv.runner.checkpoint import weights_to_cpu, get_state_dict
try:
import apex
exce... | ConvNeXt-main | semantic_segmentation/mmcv_custom/apex_runner/checkpoint.py |
# yapf:disable
log_config = dict(
interval=50,
hooks=[
dict(type='CustomizedTextLoggerHook', by_epoch=False),
# dict(type='TensorboardLoggerHook')
])
# yapf:enable
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 1)]
cudnn_benchm... | ConvNeXt-main | semantic_segmentation/configs/_base_/default_runtime.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='EncoderDecoder',
pretrained=None,
bac... | ConvNeXt-main | semantic_segmentation/configs/_base_/models/upernet_convnext.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k_640x640.py',
'../_base_/default_ru... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_large_640_160k_ade20k_ss.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k.py',
'../_base_/default_runtime.py... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_tiny_512_160k_ade20k_ss.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k.py',
'../_base_/default_runtime.py... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_small_512_160k_ade20k_ms.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k.py',
'../_base_/default_runtime.py... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_base_512_160k_ade20k_ms.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k_640x640.py',
'../_base_/default_ru... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_xlarge_640_160k_ade20k_ss.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k_640x640.py',
'../_base_/default_ru... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_base_640_160k_ade20k_ms.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k.py',
'../_base_/default_runtime.py... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_tiny_512_160k_ade20k_ms.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k.py',
'../_base_/default_runtime.py... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_small_512_160k_ade20k_ss.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k.py',
'../_base_/default_runtime.py... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_base_512_160k_ade20k_ss.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k_640x640.py',
'../_base_/default_ru... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_xlarge_640_160k_ade20k_ms.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k_640x640.py',
'../_base_/default_ru... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_base_640_160k_ade20k_ss.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
_base_ = [
'../_base_/models/upernet_convnext.py', '../_base_/datasets/ade20k_640x640.py',
'../_base_/default_ru... | ConvNeXt-main | semantic_segmentation/configs/convnext/upernet_convnext_large_640_160k_ade20k_ms.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from functools import partial
import torch
import torch.nn as nn
import torch.nn.functional as F
from timm.models.layer... | ConvNeXt-main | semantic_segmentation/backbone/convnext.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import torch
from util import str2bool
parser = argparse.ArgumentParser(description='RL')
# PPO & o... | dcd-main | arguments.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import sys
import os
import time
import timeit
import logging
from arguments import parser
import torch
import gym
impor... | dcd-main | train.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import sys
import os
import csv
import json
import argparse
import fnmatch
import re
from collections import defaultdict
... | dcd-main | eval.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from algos import PPO, RolloutStorage, ACAgent
from models import \
MultigridNetwork, MultigridGlobalCriticNetwork, \... | dcd-main | util/make_agent.py |
# Copyright (c) 2015 Peter Onrejka
#
# Licensed under the GNU General Public License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/gpl-license
#
# This file is a modified version of
# https://github.com/sical/polygo... | dcd-main | util/geo_complexity.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import glob
import os
import shutil
import collections
import timeit
import random
import numpy as np
import torch
from ... | dcd-main | util/__init__.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# 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 o... | dcd-main | util/filewriter.py |
# Copyright (c) 2017 Debajyoti Nandi
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is taken from
# https://github.com/deehzee/unionfind/blob/master/unionfind.py
"... | dcd-main | util/unionfind.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from .level_sampler import LevelSampler
from .level_store import LevelStore | dcd-main | level_replay/__init__.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from collections import namedtuple, defaultdict, deque
import numpy as np
import torch
INT32_MAX = 2147483647
class ... | dcd-main | level_replay/level_store.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from collections import namedtuple, defaultdict, deque
import queue
import numpy as np
import torch
INT32_MAX = 214748... | dcd-main | level_replay/level_sampler.py |
# Copyright (c) 2020 Tianshou contributors
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is a modified version of
# https://github.com/marlbenchmark/on-policy/blob... | dcd-main | models/popart.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from .distributions import Categor... | dcd-main | models/multigrid_models.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from .multigrid_models import MultigridNetwork
from .multigrid_global_critic_models import MultigridGlobalCriticNetwork
f... | dcd-main | models/__init__.py |
# Copyright (c) 2017 Roberta Raileanu
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is a modified version of:
# https://github.com/rraileanu/auto-drac/blob/master... | dcd-main | models/distributions.py |
# Copyright (c) 2017 Ilya Kostrikov
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is a modified version of
# https://github.com/ikostrikov/pytorch-a2c-ppo-acktr-g... | dcd-main | models/common.py |
# Copyright (c) 2017 Ilya Kostrikov
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is a modified version code found in
# https://github.com/ikostrikov/pytorch-a2c-... | dcd-main | models/walker_models.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Bet... | dcd-main | models/car_racing_models.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from .distributions import Categor... | dcd-main | models/multigrid_global_critic_models.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from .ppo import PPO
from .storage import RolloutStorage
from .agent import ACAgent | dcd-main | algos/__init__.py |
# Copyright (c) 2017 Ilya Kostrikov
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is a heavily modified version of:
# https://github.com/ikostrikov/pytorch-a2c-pp... | dcd-main | algos/storage.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
class ACAgent(object):
def __init__(self, algo, storage):
self.algo = algo
self.storage = storage
def ... | dcd-main | algos/agent.py |
# Copyright (c) 2017 Ilya Kostrikov
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is a modified version of:
# https://github.com/ikostrikov/pytorch-a2c-ppo-acktr-... | dcd-main | algos/ppo.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
import csv
import argparse
from collections import defaultdict
import pandas as pd
import numpy as np
import ma... | dcd-main | results/plot_eval_bars.py |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
import csv
import argparse
from collections import defaultdict
import numpy as np
from scipy import stats
impo... | dcd-main | results/plot_f1.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import json
import os
def generate_train_cmds(
params, num_trials=1, start_index=0, newlines=False,... | dcd-main | train_scripts/make_cmd.py |
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | dcd-main | envs/registration.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from .multigrid.adversarial import * | dcd-main | envs/__init__.py |
# Copyright (c) 2019 Antonin Raffin
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is an extended version of
# https://github.com/DLR-RM/stable-baselines3/blob/mast... | dcd-main | envs/wrappers/vec_frame_stack.py |
# Copyright (c) OpenAI
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is an extended version of
# https://github.com/openai/baselines/blob/master/baselines/common/... | dcd-main | envs/wrappers/vec_env.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import torch
import gym
from .vec_env import VecEnvWrapper
class AdversarialObservationWrapper(gym.... | dcd-main | envs/wrappers/obs_wrappers.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import gym
from gym import spaces
from gym_minigrid.minigrid import OBJECT_TO_IDX, COLOR_TO_IDX, STATE... | dcd-main | envs/wrappers/multigrid_wrappers.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from .obs_wrappers import VecPreprocessImageWrapper, AdversarialObservationWrapper
from .parallel_wrappers import Paralle... | dcd-main | envs/wrappers/__init__.py |
# Copyright (c) OpenAI
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is an extended version of
# https://github.com/openai/gym/blob/master/gym/wrappers/time_limit... | dcd-main | envs/wrappers/time_limit.py |
# Copyright (c) 2019 Antonin Raffin
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is an extended version of
# https://github.com/DLR-RM/stable-baselines3/blob/mast... | dcd-main | envs/wrappers/vec_monitor.py |
# Copyright (c) 2019 Antonin Raffin
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is an extended version of
# https://github.com/DLR-RM/stable-baselines3/blob/mast... | dcd-main | envs/wrappers/vec_normalize.py |
# Copyright (c) 2019 Antonin Raffin
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is a heavily modified version of
# https://github.com/DLR-RM/stable-baselines3/bl... | dcd-main | envs/wrappers/parallel_wrappers.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from collections import deque
import numpy as np
import torch
import gym
from .vec_env import VecEnvWrapper
class Car... | dcd-main | envs/wrappers/car_racing_wrappers.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import gym
from envs.registration import register as gym_register
env_list = []
def register(env_id, entry_point, rewa... | dcd-main | envs/bipedalwalker/register.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
import gym
import time
import numpy as np
import torch
from gym.envs.box2d import BipedalWalker, BipedalWalke... | dcd-main | envs/bipedalwalker/adversarial.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from .adversarial import BipedalWalkerAdversarialEnv
from .walker_test_envs import BipedalWalkerDefault
import pandas as ... | dcd-main | envs/bipedalwalker/__init__.py |
# Copyright (c) OpenAI
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is an extended version of
# https://github.com/openai/gym/blob/master/gym/envs/box2d/bipedal_... | dcd-main | envs/bipedalwalker/walker_env.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import gym
import time
import numpy as np
import torch
from .walker_env import EnvConfig, BipedalWalkerCustom
from envs.... | dcd-main | envs/bipedalwalker/walker_test_envs.py |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | dcd-main | envs/multigrid/cluttered.py |
# Copyright (c) 2019 Maxime Chevalier-Boisvert.
#
# 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
import sys
import numpy as np
# Only ask u... | dcd-main | envs/multigrid/window.py |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | dcd-main | envs/multigrid/register.py |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | dcd-main | envs/multigrid/adversarial.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from .adversarial import * | dcd-main | envs/multigrid/__init__.py |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | dcd-main | envs/multigrid/maze.py |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | dcd-main | envs/multigrid/multigrid.py |
# Copyright (c) 2019 Maxime Chevalier-Boisvert.
#
# 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
from gym_minigrid.minigrid import *
from e... | dcd-main | envs/multigrid/fourrooms.py |
# Copyright (c) 2019 Maxime Chevalier-Boisvert.
#
# 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
#!/usr/bin/env python3
import time
import ... | dcd-main | envs/multigrid/manual_control.py |
# coding=utf-8
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import networkx
import gym_minigrid.minigrid as minigrid
from . import multigrid
from ... | dcd-main | envs/multigrid/mst_maze.py |
# Copyright (c) 2019 Maxime Chevalier-Boisvert.
#
# 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
from gym_minigrid.minigrid import *
import... | dcd-main | envs/multigrid/crossing.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree. | dcd-main | envs/runners/__init__.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
from collections import deque, defaultdict
import numpy as np
import torch
from baselines.common.running_mean_... | dcd-main | envs/runners/adversarial_runner.py |
# Copyright (c) OpenAI
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
"""
2D rendering framework
"""
import os
import sys
import pyvirtualdisplay
if "Apple" in sys.version:
... | dcd-main | envs/box2d/rendering.py |
# Copyright (c) Stack Exchange, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the CC BY-SA 3.0 license.
import numpy as np
from scipy.special import binom
import matplotlib.pyplot as plt
bernstein = lambda n, k, t: binom(n,k)* t**k * (1.-t)**(n-k)
def bezier(points, num=200)... | dcd-main | envs/box2d/bezier.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from envs.registration import register as gym_register
from .racetracks import RaceTrack
from .racetracks import formula... | dcd-main | envs/box2d/car_racing_f1.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from .car_racing import CarRacing
from .car_racing_bezier import CarRacingBezier
from .car_racing_adversarial import CarR... | dcd-main | envs/box2d/__init__.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import sys
import math
import random
import numpy as np
import gym
from gym.envs.box2d.car_dynamics import Car
from envs... | dcd-main | envs/box2d/car_racing_adversarial.py |
# Copyright (c) OpenAI
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is an extended version of
# https://github.com/openai/gym/blob/master/gym/envs/box2d/car_raci... | dcd-main | envs/box2d/car_racing.py |
# Copyright (c) OpenAI
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# This file is an extended version of
# https://github.com/openai/gym/blob/master/gym/envs/box2d/car_raci... | dcd-main | envs/box2d/car_racing_bezier.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from .formula1 import *
def get_track(name):
if isinstance(name, str):
return getattr(sys.modules[__name__], name, No... | dcd-main | envs/box2d/racetracks/__init__.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import sys
import pickle
import os
from .racetrack import RaceTrack
# ====== Racetracks ======
Belgium = RaceTrack(
n... | dcd-main | envs/box2d/racetracks/formula1.py |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
class RaceTrack(object):
def __init__(self,
name,
xy,
bounds,
full_zoom=0.12,
max_episode_s... | dcd-main | envs/box2d/racetracks/racetrack.py |
dcd-main | teachDeepRL/__init__.py | |
# Copyright (c) 2020 Flowers Team
#
# Licensed under the MIT License;
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/MIT
import numpy as np
import pickle
import copy
from teachDeepRL.teachers.algos.riac import RIAC
f... | dcd-main | teachDeepRL/teachers/teacher_controller.py |
dcd-main | teachDeepRL/teachers/__init__.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.