MCPcopy Create free account

hub / github.com/2019ChenGong/Offline_RL_Poisoner / functions

Functions1,427 in github.com/2019ChenGong/Offline_RL_Poisoner

↓ 69 callersMethodfit
Trains with the given dataset. .. code-block:: python algo.fit(episodes, n_steps=1000000) Args: dataset: li
d3rlpy/base.py:349
↓ 66 callersMethodappend
(self, item: T)
d3rlpy/containers.py:38
↓ 55 callersMethodappend
Append observation, action, reward and terminal flag to buffer. If the terminal flag is True, Monte-Carlo returns will be computed with
d3rlpy/online/buffers.py:183
↓ 45 callersMethodfrom_json
Returns algorithm configured with json file. The Json file should be the one saved during fitting. .. code-block:: python
d3rlpy/base.py:188
↓ 41 callersFunctionevaluate_on_environment
Returns scorer function of evaluation on environment. This function returns scorer function, which is suitable to the standard scikit-learn s
d3rlpy/metrics/scorer.py:405
↓ 38 callersFunctioncheck_encoder
Checks value and returns EncoderFactory object. Returns: d3rlpy.encoders.EncoderFactory: encoder factory object.
d3rlpy/argument_utility.py:20
↓ 38 callersMethodupdate
(self, batch: TorchMiniBatch)
d3rlpy/algos/torch/dqn_impl.py:99
↓ 34 callersMethodcreate
Returns PyTorch's state enocder module. Args: observation_shape: observation shape. Returns: an enocder obje
d3rlpy/models/encoders.py:32
↓ 30 callersMethodget_feature_size
(self)
d3rlpy/models/torch/encoders.py:18
↓ 30 callersMethodload_model
(self, fname: str)
d3rlpy/base.py:64
↓ 30 callersMethodstep
( self, action: Union[np.ndarray, int] )
d3rlpy/envs/wrappers.py:319
↓ 26 callersMethodeval
Returns stacked observation. Returns: numpy.ndarray: stacked observation.
d3rlpy/preprocessing/stack.py:52
↓ 26 callersMethodpredict
(self, x: Union[np.ndarray, List[Any]])
d3rlpy/metrics/scorer.py:15
↓ 25 callersFunctioncheck_parameter_updates
(model, inputs=None, output=None)
tests/models/torch/model_test.py:8
↓ 23 callersFunctionalgo_update_tester
( algo, observation_shape, action_size, discrete=False, test_q_function_optim_copy=False,
tests/algos/algo_test.py:186
↓ 23 callersMethodpredict
(self, x)
tests/metrics/test_scorer.py:35
↓ 22 callersMethodbuild
(self)
d3rlpy/algos/torch/bcq_impl.py:101
↓ 22 callersFunctioncreate_q_func_factory
Returns registered Q function factory object. Args: name: registered Q function factory type name. kwargs: Q function arguments.
d3rlpy/models/q_functions.py:339
↓ 21 callersFunctionalgo_tester
( algo, observation_shape, imitator=False, action_size=2, state_value=False, test_poli
tests/algos/algo_test.py:112
↓ 20 callersFunctioncheck_use_gpu
Checks value and returns Device object. Returns: d3rlpy.gpu.Device: device object.
d3rlpy/argument_utility.py:96
↓ 20 callersFunctiontorch_impl_tester
( impl, discrete, deterministic_best_action=True, imitator=False, test_with_std=True, )
tests/algos/algo_test.py:336
↓ 19 callersMethodcreate_impl
Instantiate implementation objects with the dataset shapes. This method will be used internally when `fit` method is called. Args:
d3rlpy/base.py:680
↓ 18 callersMethodcompute_error
( self, x: torch.Tensor, action: torch.Tensor )
d3rlpy/models/torch/imitators.py:130
↓ 17 callersFunctioncheck_q_func
Checks value and returns QFunctionFactory object. Returns: d3rlpy.q_functions.QFunctionFactory: Q function factory object.
d3rlpy/argument_utility.py:34
↓ 17 callersMethodextend
(self, items: Sequence[T])
d3rlpy/containers.py:52
↓ 17 callersMethodfit_online
Start training loop of online deep reinforcement learning. Args: env: gym-like environment. buffer : replay buffer.
d3rlpy/algos/base.py:187
↓ 17 callersMethodsample
Returns sampled mini-batch of transitions. If observation is image, you can stack arbitrary frames via ``n_frames``. .. code
d3rlpy/online/buffers.py:68
↓ 16 callersMethodget_type
(self)
tests/algos/algo_test.py:65
↓ 15 callersMethodappend
Stack new image. Args: image (numpy.ndarray): image observation.
d3rlpy/preprocessing/stack.py:40
↓ 14 callersFunctionalgo_pendulum_tester
(algo, n_evaluations=100, n_episodes=500, n_trials=3)
tests/algos/algo_test.py:253
↓ 14 callersMethodupdate_actor
( self, batch: TorchMiniBatch )
d3rlpy/algos/torch/awac_impl.py:80
↓ 14 callersMethodupdate_critic
(self, batch: TorchMiniBatch)
d3rlpy/algos/torch/ddpg_impl.py:140
↓ 13 callersFunction_make_batches
( episode: Episode, window_size: int, n_frames: int )
d3rlpy/metrics/scorer.py:59
↓ 13 callersMethoddecode
(self, x: torch.Tensor, latent: torch.Tensor)
d3rlpy/models/torch/imitators.py:70
↓ 13 callersMethodget_id
Returns GPU id. Returns: GPU id.
d3rlpy/gpu.py:45
↓ 13 callersMethodreset
(self, **kwargs: Any)
d3rlpy/envs/wrappers.py:336
↓ 13 callersMethodupdate_critic_target
(self)
d3rlpy/algos/torch/ddpg_impl.py:200
↓ 12 callersMethodupdate_actor_target
(self)
d3rlpy/algos/torch/ddpg_impl.py:205
↓ 11 callersMethodget_params
(self)
tests/algos/algo_test.py:68
↓ 10 callersFunctionpoison_walker2d
()
mujoco/mujoco_poisoned_dataset.py:84
↓ 10 callersFunctionscorer
(algo: AlgoProtocol, episodes: List[Episode])
d3rlpy/metrics/scorer.py:326
↓ 9 callersFunction_get_attributes
(obj: Any)
d3rlpy/torch_utility.py:23
↓ 9 callersFunctionhard_sync
(targ_model: nn.Module, model: nn.Module)
d3rlpy/torch_utility.py:36
↓ 9 callersMethodpredict
(self, x: Union[np.ndarray, List[Any]])
d3rlpy/ope/fqe.py:87
↓ 9 callersMethodsize
Returns the number of appended elements in buffer. Returns: the number of elements in buffer.
d3rlpy/online/buffers.py:104
↓ 8 callersFunction_make_taus
(h: torch.Tensor, n_quantiles: int)
d3rlpy/models/torch/q_functions/qr_q_function.py:15
↓ 8 callersMethodclear
Clear stacked observation by filling 0.
d3rlpy/preprocessing/stack.py:61
↓ 8 callersFunctioncompute_reduce
(value: torch.Tensor, reduction_type: str)
d3rlpy/models/torch/q_functions/utility.py:64
↓ 8 callersFunctionget_parallel_flag
()
d3rlpy/context.py:7
↓ 8 callersMethodmeasure_time
(self, name: str)
d3rlpy/logger.py:159
↓ 8 callersFunctionpick_quantile_value_by_action
( values: torch.Tensor, action: torch.Tensor, keepdim: bool = False )
d3rlpy/models/torch/q_functions/utility.py:17
↓ 8 callersMethodpredict_value
( self, x: Union[np.ndarray, List[Any]], action: Union[np.ndarray, List[Any]],
d3rlpy/metrics/scorer.py:18
↓ 8 callersMethodpredict_value
(self, x, action, with_std)
tests/algos/algo_test.py:37
↓ 8 callersMethodsample
(self, x: torch.Tensor)
d3rlpy/models/torch/policies.py:23
↓ 8 callersMethodtransform
Returns processed observations. Args: x: observation. Returns: processed observation.
d3rlpy/preprocessing/scalers.py:34
↓ 7 callersMethoddist
(self, x: torch.Tensor)
d3rlpy/models/torch/policies.py:255
↓ 7 callersFunctionpoison_half
()
mujoco/mujoco_poisoned_dataset.py:56
↓ 6 callersFunction_convert_to_torch
(array: np.ndarray, device: str)
d3rlpy/torch_utility.py:146
↓ 6 callersFunction_make_taus
( h: torch.Tensor, proposal: nn.Linear, )
d3rlpy/models/torch/q_functions/fqf_q_function.py:16
↓ 6 callersMethodadd_metric
(self, name: str, value: float)
d3rlpy/logger.py:110
↓ 6 callersFunctionalgo_cartpole_tester
(algo, n_evaluations=100, n_episodes=100, n_trials=3)
tests/algos/algo_test.py:211
↓ 6 callersFunctioncompute_quantile_loss
( quantiles: torch.Tensor, rewards: torch.Tensor, target: torch.Tensor, terminals: torch.Tenso
d3rlpy/models/torch/q_functions/utility.py:46
↓ 6 callersFunctioncreate_squashed_normal_policy
( observation_shape: Sequence[int], action_size: int, encoder_factory: EncoderFactory, min_log
d3rlpy/models/builders.py:91
↓ 6 callersMethodcreate_with_action
Returns PyTorch's state-action enocder module. Args: observation_shape: observation shape. action_size: action size.
d3rlpy/models/encoders.py:44
↓ 6 callersMethodget_type
Returns a scaler type. Returns: scaler type.
d3rlpy/preprocessing/scalers.py:58
↓ 6 callersFunctionpoison_hopper
()
mujoco/mujoco_poisoned_dataset.py:8
↓ 6 callersMethodstep
(self, action)
tests/metrics/test_scorer.py:420
↓ 6 callersMethodupdate_temp
( self, batch: TorchMiniBatch )
d3rlpy/algos/torch/sac_impl.py:125
↓ 5 callersMethod_compute_quantiles
( self, h: torch.Tensor, taus: torch.Tensor )
d3rlpy/models/torch/q_functions/fqf_q_function.py:65
↓ 5 callersMethod_compute_quantiles
( self, h: torch.Tensor, taus: torch.Tensor )
d3rlpy/models/torch/q_functions/fqf_q_function.py:193
↓ 5 callersFunction_reduce_ensemble
( y: torch.Tensor, reduction: str = "min", dim: int = 0, lam: float = 0.75 )
d3rlpy/models/torch/q_functions/ensemble_q_function.py:9
↓ 5 callersFunctioncreate_parameter
(shape: Sequence[int], initial_value: float)
d3rlpy/models/builders.py:200
↓ 5 callersFunctionget_atari
Returns atari dataset and envrironment. The dataset is provided through d4rl-atari. See more details including available dataset from its Git
d3rlpy/datasets.py:102
↓ 5 callersFunctionget_cartpole
Returns cartpole dataset and environment. The dataset is automatically downloaded to ``d3rlpy_data/cartpole.h5`` if it does not exist. A
d3rlpy/datasets.py:23
↓ 5 callersFunctionlast_flag
(iterator: Iterator[T])
d3rlpy/itertools.py:6
↓ 5 callersFunctionregister_reward_scaler
Registers reward scaler class. Args: cls: scaler class inheriting ``RewardScaler``.
d3rlpy/preprocessing/reward_scalers.py:493
↓ 5 callersMethodreset
(self)
tests/metrics/test_scorer.py:427
↓ 5 callersMethodreverse_transform
Returns reversely transformed observations. Args: x: observation. Returns: reversely transformed observation
d3rlpy/preprocessing/scalers.py:46
↓ 5 callersFunctionsoft_opc_scorer
r"""Returns Soft Off-Policy Classification metrics. This function returns scorer function, which is suitable to the standard scikit-learn sco
d3rlpy/metrics/scorer.py:278
↓ 5 callersFunctionsquash_action
( dist: torch.distributions.Distribution, raw_action: torch.Tensor )
d3rlpy/models/torch/policies.py:13
↓ 5 callersMethodto_cpu
(self)
d3rlpy/algos/torch/base.py:134
↓ 5 callersMethodto_gpu
(self, device: Device = Device())
d3rlpy/algos/torch/base.py:130
↓ 4 callersMethod__init__
(self, share_encoder: bool)
d3rlpy/models/q_functions.py:26
↓ 4 callersMethod_compute_policy_is_values
( self, policy_obs: torch.Tensor, value_obs: torch.Tensor )
d3rlpy/algos/torch/cql_impl.py:143
↓ 4 callersMethod_compute_quantiles
( self, h: torch.Tensor, taus: torch.Tensor )
d3rlpy/models/torch/q_functions/qr_q_function.py:37
↓ 4 callersMethod_compute_quantiles
( self, h: torch.Tensor, taus: torch.Tensor )
d3rlpy/models/torch/q_functions/qr_q_function.py:110
↓ 4 callersMethod_conv_encode
(self, x: torch.Tensor)
d3rlpy/models/torch/encoders.py:139
↓ 4 callersFunction_create_activation
(activation_type: str)
d3rlpy/models/encoders.py:18
↓ 4 callersFunction_create_encoder
(observation_shape, action_size)
tests/models/test_q_functions.py:23
↓ 4 callersFunction_gather_quantiles_by_indices
( y: torch.Tensor, indices: torch.Tensor )
d3rlpy/models/torch/q_functions/ensemble_q_function.py:27
↓ 4 callersMethodappend
( self, observation: np.ndarray, action: np.ndarray, reward: float, te
d3rlpy/online/buffers.py:254
↓ 4 callersMethodcompute_epsilon
Returns decayed :math:`\\epsilon`. Returns: :math:`\\epsilon`.
d3rlpy/online/explorers.py:99
↓ 4 callersFunctioncompute_iqn_feature
( h: torch.Tensor, taus: torch.Tensor, embed: nn.Linear, embed_size: int, )
d3rlpy/models/torch/q_functions/iqn_q_function.py:33
↓ 4 callersMethodcreate
(self, observation_shape: Sequence[int])
d3rlpy/models/encoders.py:209
↓ 4 callersFunctioncreate_conditional_vae
( observation_shape: Sequence[int], action_size: int, latent_size: int, beta: float, encod
d3rlpy/models/builders.py:118
↓ 4 callersFunctioncreate_continuous_q_function
( observation_shape: Sequence[int], action_size: int, encoder_factory: EncoderFactory, q_func_
d3rlpy/models/builders.py:47
↓ 4 callersFunctioncreate_deterministic_policy
( observation_shape: Sequence[int], action_size: int, encoder_factory: EncoderFactory, )
d3rlpy/models/builders.py:72
↓ 4 callersFunctioncreate_discrete_q_function
( observation_shape: Sequence[int], action_size: int, encoder_factory: EncoderFactory, q_func_
d3rlpy/models/builders.py:26
↓ 4 callersMethodcreate_with_action
( self, observation_shape: Sequence[int], action_size: int, discrete_action: b
d3rlpy/models/encoders.py:220
↓ 4 callersMethoddist
(self, x: torch.Tensor)
d3rlpy/models/torch/policies.py:165
next →1–100 of 1,427, ranked by callers