Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/agrimgupta92/sgan
/ functions
Functions
57 in github.com/agrimgupta92/sgan
⨍
Functions
57
◇
Types & classes
7
↓ 7 callers
Method
repeat
Inputs: -tensor: 2D tensor of any shape -num_reps: Number of times to repeat each row Outpus: -repeat_tensor:
sgan/models.py:188
↓ 5 callers
Method
__init__
( self, embedding_dim=64, h_dim=64, mlp_dim=1024, num_layers=1, dropout=0.0 )
sgan/models.py:31
↓ 5 callers
Function
make_mlp
(dim_list, activation='relu', batch_norm=True, dropout=0)
sgan/models.py:5
↓ 4 callers
Function
displacement_error
Input: - pred_traj: Tensor of shape (seq_len, batch, 2). Predicted trajectory. - pred_traj_gt: Tensor of shape (seq_len, batch, 2). Groun
sgan/losses.py:74
↓ 4 callers
Function
final_displacement_error
Input: - pred_pos: Tensor of shape (batch, 2). Predicted last pos. - pred_pos_gt: Tensor of shape (seq_len, batch, 2). Groud truth la
sgan/losses.py:98
↓ 4 callers
Function
relative_to_abs
Inputs: - rel_traj: pytorch tensor of shape (seq_len, batch, 2) - start_pos: pytorch tensor of shape (batch, 2) Outputs: - abs_tr
sgan/utils.py:82
↓ 3 callers
Function
bce_loss
Numerically stable version of the binary cross-entropy loss function. As per https://github.com/pytorch/pytorch/issues/751 See the Tensor
sgan/losses.py:5
↓ 3 callers
Function
data_loader
(args, path)
sgan/data/loader.py:6
↓ 3 callers
Function
get_dset_path
(dset_name, dset_type)
sgan/utils.py:75
↓ 3 callers
Function
l2_loss
Input: - pred_traj: Tensor of shape (seq_len, batch, 2). Predicted trajectory. - pred_traj_gt: Tensor of shape (seq_len, batch, 2). Groud
sgan/losses.py:52
↓ 3 callers
Method
repeat
Inputs: -tensor: 2D tensor of any shape -num_reps: Number of times to repeat each row Outpus: -repeat_tensor:
sgan/models.py:275
↓ 2 callers
Function
check_accuracy
( args, loader, generator, discriminator, d_loss_fn, limit=False )
scripts/train.py:458
↓ 2 callers
Function
evaluate_helper
(error, seq_start_end)
scripts/evaluate_model.py:44
↓ 2 callers
Function
get_total_norm
(parameters, norm_type=2)
sgan/utils.py:33
↓ 2 callers
Method
mlp_decoder_needed
(self)
sgan/models.py:486
↓ 1 callers
Method
add_noise
Inputs: - _input: Tensor of shape (_, decoder_h_dim - noise_first_dim) - seq_start_end: A list of tuples which delimit sequen
sgan/models.py:448
↓ 1 callers
Function
cal_ade
(pred_traj_gt, pred_traj_fake, linear_ped, non_linear_ped)
scripts/train.py:558
↓ 1 callers
Function
cal_fde
( pred_traj_gt, pred_traj_fake, linear_ped, non_linear_ped )
scripts/train.py:565
↓ 1 callers
Function
cal_l2_losses
( pred_traj_gt, pred_traj_gt_rel, pred_traj_fake, pred_traj_fake_rel, loss_mask )
scripts/train.py:545
↓ 1 callers
Function
discriminator_step
( args, batch, generator, discriminator, d_loss_fn, optimizer_d )
scripts/train.py:362
↓ 1 callers
Function
evaluate
(args, loader, generator, num_samples)
scripts/evaluate_model.py:58
↓ 1 callers
Function
generator_step
( args, batch, generator, discriminator, g_loss_fn, optimizer_g )
scripts/train.py:400
↓ 1 callers
Method
get_bounds
(self, ped_pos)
sgan/models.py:256
↓ 1 callers
Function
get_dtypes
(args)
scripts/train.py:102
↓ 1 callers
Function
get_generator
(checkpoint)
scripts/evaluate_model.py:18
↓ 1 callers
Method
get_grid_locations
(self, top_left, other_pos)
sgan/models.py:265
↓ 1 callers
Function
get_noise
(shape, noise_type)
sgan/models.py:20
↓ 1 callers
Method
init_hidden
(self, batch)
sgan/models.py:48
↓ 1 callers
Function
main
(args)
scripts/train.py:111
↓ 1 callers
Function
main
(args)
scripts/print_args.py:12
↓ 1 callers
Function
main
(args)
scripts/evaluate_model.py:94
↓ 1 callers
Function
poly_fit
Input: - traj: Numpy array of shape (2, traj_len) - traj_len: Len of trajectory - threshold: Minimum error to be considered for non l
sgan/data/trajectories.py:53
↓ 1 callers
Function
read_file
(_path, delim='\t')
sgan/data/trajectories.py:39
Method
__getitem__
(self, index)
sgan/data/trajectories.py:181
Method
__init__
( self, seq_len, embedding_dim=64, h_dim=128, mlp_dim=1024, num_layers=1, pool_every_timestep=
sgan/models.py:75
Method
__init__
( self, embedding_dim=64, h_dim=64, mlp_dim=1024, bottleneck_dim=1024, activation='relu', batc
sgan/models.py:167
Method
__init__
( self, h_dim=64, activation='relu', batch_norm=True, dropout=0.0, neighborhood_size=2.0, grid
sgan/models.py:236
Method
__init__
( self, obs_len, pred_len, embedding_dim=64, encoder_h_dim=64, decoder_h_dim=128, mlp_dim=1024
sgan/models.py:355
Method
__init__
( self, obs_len, pred_len, embedding_dim=64, h_dim=64, mlp_dim=1024, num_layers=1, activation=
sgan/models.py:550
Method
__init__
Args: - data_dir: Directory containing dataset files in the format <frame_id> <ped_id> <x> <y> - obs_len: Number of t
sgan/data/trajectories.py:73
Method
__len__
(self)
sgan/data/trajectories.py:178
Function
bool_flag
(s)
sgan/utils.py:20
Function
find_nan
(variable, var_name)
sgan/utils.py:14
Method
forward
Inputs: - obs_traj: Tensor of shape (obs_len, batch, 2) Output: - final_h: Tensor of shape (self.num_layers, batch, s
sgan/models.py:54
Method
forward
Inputs: - last_pos: Tensor of shape (batch, 2) - last_pos_rel: Tensor of shape (batch, 2) - state_tuple: (hh, ch) eac
sgan/models.py:125
Method
forward
Inputs: - h_states: Tensor of shape (num_layers, batch, h_dim) - seq_start_end: A list of tuples which delimit sequences with
sgan/models.py:201
Method
forward
Inputs: - h_states: Tesnsor of shape (num_layers, batch, h_dim) - seq_start_end: A list of tuples which delimit sequences wit
sgan/models.py:288
Method
forward
Inputs: - obs_traj: Tensor of shape (obs_len, batch, 2) - obs_traj_rel: Tensor of shape (obs_len, batch, 2) - seq_sta
sgan/models.py:495
Method
forward
Inputs: - traj: Tensor of shape (obs_len + pred_len, batch, 2) - traj_rel: Tensor of shape (obs_len + pred_len, batch, 2)
sgan/models.py:590
Function
gan_d_loss
Input: - scores_real: Tensor of shape (N,) giving scores for real samples - scores_fake: Tensor of shape (N,) giving scores for fake samp
sgan/losses.py:36
Function
gan_g_loss
Input: - scores_fake: Tensor of shape (N,) containing scores for fake samples Output: - loss: Tensor of shape (,) giving GAN generat
sgan/losses.py:24
Function
get_gpu_memory
()
sgan/utils.py:61
Function
init_weights
(m)
scripts/train.py:96
Function
int_tuple
(s)
sgan/utils.py:10
Function
lineno
()
sgan/utils.py:29
Function
seq_collate
(data)
sgan/data/trajectories.py:13
Function
timeit
(msg, should_time=True)
sgan/utils.py:49