Skip to content

Commit

Permalink
methods/utils/st/nnst: update utils for nnst method
Browse files Browse the repository at this point in the history
  • Loading branch information
Vuong Nguyen committed Jan 31, 2024
1 parent 9438844 commit 0bd791b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion augmentare/methods/utils/style_transfer/utils_nnst.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ def replace_features(src, ref):
"""
# Move style features to gpu (necessary to mostly store on cpu for gpus w/
# < 12GB of memory)
ref_flat = to_device(flatten_grid(ref))
device = "cuda" if torch.cuda.is_available() else "cpu"
ref_flat = flatten_grid(ref).to(device)
rplc = []
for j in range(src.size(0)):
# How many rows of the distance matrix to compute at once, can be
Expand Down

0 comments on commit 0bd791b

Please sign in to comment.