MCPcopy Create free account

hub / github.com/NVlabs/CTG / functions

Functions1,831 in github.com/NVlabs/CTG

Functionget_shape
Get all shapes of arrays and tensors in nested dictionary or list or tuple. Args: x (dict or list or tuple): a possibly nested dicti
tbsim/utils/tensor_utils.py:966
Functionget_spatial_goal_supervision
Get supervision for training the spatial goal network.
tbsim/algos/algo_utils.py:87
Functionget_spatial_trajectory_supervision
Get supervision for training the learned occupancy metric.
tbsim/algos/algo_utils.py:137
Methodget_stats
(self)
tbsim/utils/rollout_logger.py:242
Functionget_torch_device
Return torch device. If using cuda (GPU), will also set cudnn.benchmark to True to optimize CNNs. Args: try_to_use_cuda (bool):
tbsim/utils/torch_utils.py:37
Functionhard_update
Hard update @target parameters to match @source. Args: source (torch.nn.Module): source network to provide parameters target
tbsim/utils/torch_utils.py:25
Methodhas_agents
(self)
tbsim/policies/common.py:127
Methodhas_ego
(self)
tbsim/policies/common.py:123
Functionheuristic_agent_collision
Applies collision loss to all agents.
tbsim/utils/scene_edit_utils.py:395
Functionheuristic_global_stop_sign
Sets a global stop sign using GT. scale: stlcg loss smoothing coefficient horizon_length: prediction horizon (in time steps)
tbsim/utils/scene_edit_utils.py:426
Functionheuristic_global_target_pos
Sets a global target pos using GT.
tbsim/utils/scene_edit_utils.py:335
Functionheuristic_gptcollision
Increase collision loss for a pair of agents.
tbsim/utils/scene_edit_utils.py:584
Functionheuristic_gptkeepdistance
Applies keepdistance loss to a pair of agents.
tbsim/utils/scene_edit_utils.py:682
Functionheuristic_map_collision
Applies collision loss to all agents.
tbsim/utils/scene_edit_utils.py:411
Functionheuristic_social_group
(sim_scene, dt, group_dist_thresh, social_dist, cohesion, **kwargs)
tbsim/utils/scene_edit_utils.py:230
Functionheuristic_speed_limit
Sets a global stop sign using GT.
tbsim/utils/scene_edit_utils.py:518
Functionheuristic_stop_sign
Sets a local stop sign using GT.
tbsim/utils/scene_edit_utils.py:473
Functionheuristic_target_pos
Sets a target pos using GT.
tbsim/utils/scene_edit_utils.py:386
Functionheuristic_target_speed
Sets a target speed using GT. -target_speed_multiplier: multiplier for the speed of the agent
tbsim/utils/scene_edit_utils.py:553
Methodhorizon
(self)
tbsim/envs/env_trajdata.py:131
Methodhorizon
(self)
tbsim/envs/env_avdata.py:116
Methodhorizon
(self)
tbsim/envs/env_l5kit.py:378
Functionindex_at_time
Indexes all torch tensors and numpy arrays in dimension 1 with index @ind in nested dictionary or list or tuple and returns a new nested stru
tbsim/utils/tensor_utils.py:208
Functioninfinite_iter
Get an infinite generator Args: data_loader (DataLoader): data loader to iterate through
tbsim/utils/train_utils.py:11
Methodinit_for_batch
Caches disks and masking ahead of time.
tbsim/utils/guidance_loss.py:466
Methodinit_for_batch
Initializes this loss to be used repeatedly only for the given scenes/agents in the example_batch. e.g. this function could use the e
tbsim/utils/guidance_loss.py:2128
Functioninit_weights
(m: nn.Module)
tbsim/models/scenetemporal.py:791
Methodis_skimp
(self)
tbsim/l5kit/l5_ego_dataset.py:50
Methodis_skimp
(self)
tbsim/l5kit/l5_agent_dataset.py:276
Methodkl_loss
Compute kl loss between the prior and the posterior distributions. Args: posterior_params (dict): a batch of distributio
tbsim/models/vaes.py:164
Methodkl_loss
Computes KL divergence loss between the Categorical distribution given by the unnormalized logits @logits and the prior distribution.
tbsim/models/vaes.py:242
Methodkl_loss
Compute kl loss between the prior and the posterior distributions. Args: posterior_params (dict): a batch of distributio
tbsim/models/vaes.py:287
Functionlane_regularization_loss
penalizing the vehicle for exiting drivable area Args: lane_flags (torch.Tensor): 1 for in the lane, 0 for out of the lane, [B, (M), (A),
tbsim/utils/loss_utils.py:443
Functionlane_regulation_loss
(lane_flag,agent_mask)
tbsim/utils/loss_utils.py:359
Methodlatent_dim
Shape of the latent code Returns: latent_dim (int)
tbsim/models/vaes.py:106
Functionlaunch_experiments_local
(script_path, cfgs, cfg_paths, extra_args=[])
tbsim/utils/experiment_utils.py:425
Functionlaunch_experiments_ngc
Launch one or more experiments on NGC Args: script_command (list): the complete python command to run with arguments (exc
tbsim/utils/experiment_utils.py:218
Functionlaunch_scene_edit_ngc
Launch one or more experiments on NGC Args: script_command (list): the complete python command to run with arguments (exc
tbsim/utils/experiment_utils.py:310
Functionleft_right_average
Add 1 entry to the seq by averaging the left appended seq and right appended seq Args: seq (np.ndarray or torch.Tensor):
tbsim/utils/tensor_utils.py:928
Functionlikelihood_loss
(likelihood)
tbsim/utils/loss_utils.py:440
Functionlist_of_flat_dict_to_dict_of_list
Helper function to go from a list of flat dictionaries to a dictionary of lists. By "flat" we mean that none of the values are dictionaries,
tbsim/utils/tensor_utils.py:987
Functionlog_normal_mixture
Log probability of tensor x under a uniform mixture of Gaussians. Adapted from CS 236 at Stanford. Args: x (torch.Tensor): tensor
tbsim/utils/loss_utils.py:100
Functionlr_scheduler_from_optim_params
Helper function to return a LRScheduler from the optim_params section of the config for a particular network. Returns None if a scheduler
tbsim/utils/torch_utils.py:112
Functionmain
()
tbsim/models/vaes.py:1022
Methodmap_act_idx
(x)
tbsim/algos/algos.py:2775
Functionmap_tensor_ndarray
Apply function @tensor_func to torch.Tensor objects and @ndarray_func to np.ndarray objects in a nested dictionary or list or tuple. Arg
tbsim/utils/tensor_utils.py:102
Functionmasked_average_per_episode
Compute average metrics across timesteps given an availability mask Args: met (np.ndarray): measurements, [num_scene, num_steps]
tbsim/envs/env_metrics.py:105
Functionmasked_max_per_episode
Args: met (np.ndarray): measurements, [num_scene, num_steps] met_mask (np.ndarray): measurement masks [num_scene, num_steps]
tbsim/envs/env_metrics.py:133
Functionmasked_sum_per_episode
Compute sum metrics across timesteps given an availability mask Args: met (np.ndarray): measurements, [num_scene, num_steps]
tbsim/envs/env_metrics.py:119
Functionmaybe_no_grad
Args: no_grad (bool): if True, the returned context will be torch.no_grad(), otherwise it will be a dummy context
tbsim/utils/torch_utils.py:195
Methodmodality_shapes
(self)
tbsim/datasets/l5kit_datamodules.py:77
Methodmodality_shapes
(self)
tbsim/datasets/trajdata_datamodules.py:22
Methodmodality_shapes
Returns the expected shape of combined rasterized layers (semantic + traj history + current)
tbsim/datasets/trajdata_datamodules.py:119
Methodmulti_episode_reset
(self)
tbsim/envs/env_metrics.py:1108
Methodmulti_episode_reset
(self)
tbsim/envs/env_metrics.py:1165
Functionmulti_simulation_out_to_visualizer_scene
Convert a simulation output into a scene we can visualize. The scene will include replayed and simulated trajectories for ego and agents when thes
tbsim/l5kit/visualizer.py:251
Methodname
(self)
tbsim/dynamics/bicycle.py:150
Methodname
(self)
tbsim/dynamics/base.py:36
Methodname
(self)
tbsim/dynamics/double_integrator.py:47
Methodname
(self)
tbsim/dynamics/unicycle.py:83
Methodname
(self)
tbsim/dynamics/single_integrator.py:32
Functionnamed_reduce
Reduces all tensors in nested dictionary or list or tuple at a dimension using a named reduction function. Args: x (dict or list
tbsim/utils/tensor_utils.py:709
Methodnum_channels
(self)
tbsim/l5kit/vis_rasterizer.py:181
Methodnum_instances
(self)
tbsim/envs/env_trajdata.py:116
Methodnum_instances
(self)
tbsim/envs/base.py:62
Methodnum_instances
(self)
tbsim/envs/env_avdata.py:101
Methodnum_instances
(self)
tbsim/envs/env_l5kit.py:175
Functionobtain_goal_state
(tgt_pos_yaw,tgt_mask)
tbsim/utils/l5_utils.py:386
Functionobtain_ref
obtain desired trajectory for the MPC controller Args: line (np.ndarray): centerline of the lane [n, 3] x (np.ndarray): position
tbsim/utils/planning_utils.py:389
Methodon_epoch_end
(self, trainer, pl_module)
tbsim/utils/torch_utils.py:247
Methodon_fit_end
(self, trainer, pl_module)
tbsim/utils/torch_utils.py:243
Methodon_fit_start
(self, trainer, pl_module)
tbsim/utils/torch_utils.py:230
Methodon_load_checkpoint
( self, trainer: "pl.Trainer", pl_module: "pl.LightningModule", callback_state: Dict[str, Any] )
tbsim/utils/ema.py:93
Methodon_save_checkpoint
( self, trainer: "pl.Trainer", pl_module: "pl.LightningModule", checkpoint: Dict[str, Any] )
tbsim/utils/ema.py:88
Methodon_train_batch_end
(self, trainer: pl.Trainer, pl_module: pl.LightningModule, outputs, batch, batch_idx, unused=0)
tbsim/utils/env_utils.py:462
Methodon_train_batch_end
(self, trainer: "pl.Trainer", pl_module: pl.LightningModule, *args, **kwargs)
tbsim/utils/ema.py:64
Methodon_train_start
(self, trainer: "pl.Trainer", pl_module: pl.LightningModule)
tbsim/utils/ema.py:51
Methodon_validation_end
(self, trainer: "pl.Trainer", pl_module: "pl.LightningModule")
tbsim/utils/ema.py:81
Methodon_validation_start
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
tbsim/utils/ema.py:73
Functionoptimizer_from_optim_params
Helper function to return a torch Optimizer from the optim_params section of the config for a particular network. Args: optim_pa
tbsim/utils/torch_utils.py:90
Methodoutput_shape
(self, input_shape=None)
tbsim/models/base_models.py:163
Methodoutput_shape
Function to compute output shape from inputs to this module. Args: input_shape (iterable of int): shape of input. Does no
tbsim/models/base_models.py:487
Methodoutput_shape
(self, input_shape=None)
tbsim/models/base_models.py:850
Methodparse_batch
(data_batch)
tbsim/utils/batch_utils.py:111
Methodparse_batch
(data_batch)
tbsim/utils/batch_utils.py:154
Methodperturb
Given the observation object, add Gaussian noise to positions and yaws Args: obs(Dict[torch.tensor]): observation dict R
tbsim/utils/metrics.py:646
Methodperturb_actions_dict
Given the observation object, add Gaussian noise to positions and yaws Args: data_batch(Dict[torch.tensor]): observation dict
tbsim/utils/guidance_loss.py:2202
Methodpositions
(self)
tbsim/policies/common.py:27
Methodposterior_param_shapes
Shape of the posterior parameters Returns: shapes (dict): a dictionary of parameter shapes
tbsim/models/vaes.py:96
Methodposterior_param_shapes
(self)
tbsim/models/vaes.py:184
Methodpredict
(self, batch_inputs: dict)
tbsim/models/rasterized_models.py:674
Methodpredict
(self, batch_inputs: dict)
tbsim/models/rasterized_models.py:1207
Methodpredict
(self, batch_inputs: dict)
tbsim/models/rasterized_models.py:1633
Methodpredict
Generate a prediction based on latent prior (instead of sample) and condition inputs Args: condition_inputs (dict, torch
tbsim/models/vaes.py:536
Methodpredict
Generate a prediction based on latent prior (instead of sample) and condition inputs Args: condition_inputs (dict, torch
tbsim/models/vaes.py:679
Methodpredict
Generate a prediction based on latent prior (instead of sample) and condition inputs Args: condition_inputs (dict, torch
tbsim/models/vaes.py:866
Methodpredict
(self, batch_inputs: dict)
tbsim/models/strive.py:222
Methodpredict_dataloader
(self)
tbsim/datasets/l5kit_datamodules.py:124
Methodpredict_dataloader
(self)
tbsim/datasets/trajdata_datamodules.py:101
Methodpredict_dataloader
(self)
tbsim/datasets/trajdata_datamodules.py:219
← previousnext →1,501–1,600 of 1,831, ranked by callers