Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Chufan Gao committed Dec 28, 2020
1 parent 569e79b commit 9ea6c2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dsm/dsm_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,9 @@ def __init__(self, inputdim, k, typ='ConvNet',
nn.Linear(hidden, k, bias=True)
) for r in range(self.risks)})

self.embedding = create_conv_representation(inputdim=inputdim, hidden=hidden, typ='ConvNet')
self.embedding = create_conv_representation(inputdim=inputdim,
hidden=hidden,
typ='ConvNet')

def forward(self, x, risk='1'):
"""The forward function that is called when data is passed through DSM.
Expand Down
2 changes: 1 addition & 1 deletion dsm/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def train_dsm(model,
_reshape_tensor_with_nans(eb),
elbo=elbo,
risk=str(r+1))
print ("Train Loss:", float(loss), "batch num:", j, "/", nbatches, "n_iter:", i, "/", n_iter)
#print ("Train Loss:", float(loss))
loss.backward()
optimizer.step()
valid_loss = 0
Expand Down

0 comments on commit 9ea6c2c

Please sign in to comment.