mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-09-12 12:50:36 +08:00
renamed flag to dequantize
This commit is contained in:
@@ -27,7 +27,7 @@ class TempFlowTrainingNetwork(nn.Module):
|
||||
n_blocks: int,
|
||||
hidden_size: int,
|
||||
n_hidden: int,
|
||||
quantize: bool,
|
||||
dequantize: bool,
|
||||
cardinality: List[int] = [1],
|
||||
embedding_dimension: int = 1,
|
||||
scaling: bool = True,
|
||||
@@ -62,7 +62,7 @@ class TempFlowTrainingNetwork(nn.Module):
|
||||
hidden_size=hidden_size,
|
||||
cond_label_size=conditioning_length,
|
||||
)
|
||||
self.quantize = quantize
|
||||
self.dequantize = dequantize
|
||||
|
||||
self.distr_output = FlowOutput(
|
||||
self.flow, input_size=input_size, cond_size=conditioning_length
|
||||
@@ -384,7 +384,7 @@ class TempFlowTrainingNetwork(nn.Module):
|
||||
|
||||
# we sum the last axis to have the same shape for all likelihoods
|
||||
# (batch_size, subseq_length, 1)
|
||||
if self.quantize:
|
||||
if self.dequantize:
|
||||
target += torch.rand_like(target)
|
||||
likelihoods = -self.flow.log_prob(target, distr_args).unsqueeze(-1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user