mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-07-23 13:10:06 +08:00
added MAF option to model
This commit is contained in:
@@ -5,7 +5,7 @@ import torch.nn as nn
|
||||
|
||||
import numpy as np
|
||||
|
||||
from pts.modules import RealNVP, FlowOutput, MeanScaler, NOPScaler
|
||||
from pts.modules import RealNVP, MAF, FlowOutput, MeanScaler, NOPScaler
|
||||
from pts.model import weighted_average
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class TempFlowTrainingNetwork(nn.Module):
|
||||
batch_first=True,
|
||||
)
|
||||
|
||||
flow_cls = {"RealNVP": RealNVP}[flow_type]
|
||||
flow_cls = {"RealNVP": RealNVP, "MAF": MAF,}[flow_type]
|
||||
self.flow = flow_cls(
|
||||
input_size=target_dim,
|
||||
n_blocks=n_blocks,
|
||||
|
||||
Reference in New Issue
Block a user