Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions torch_cfc.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ def forward(self, input, hx, ts):
return new_hidden



class Cfc(nn.Module):
def __init__(
self,
Expand Down Expand Up @@ -189,6 +188,8 @@ def forward(self, x, timespans=None, mask=None):
time_since_update = torch.zeros(
(batch_size, true_in_features), device=device
)
if timespans is None:
timespans = torch.ones(x.size(0), x.size(1), device=x.device)
for t in range(seq_len):
inputs = x[:, t]
ts = timespans[:, t].squeeze()
Expand Down Expand Up @@ -351,7 +352,6 @@ def _allocate_parameters(self):
init_value=torch.zeros((self.sensory_size,)),
)


def _sigmoid(self, v_pre, mu, sigma):
v_pre = torch.unsqueeze(v_pre, -1) # For broadcasting
mues = v_pre - mu
Expand Down