Problem: GPU out of memory. GPU capacity is decreasing during each epoch.
Solution: torch.cuda.empty_cache()
show elements of dictionary
1 |
def (dic): |
put model into gpu
1 |
model = model.cuda() |
convert dtype of tensor to float
1 |
X = X.float() |
tensor numpy transform
1 |
|
save/load the model
1 |
# load |
近期评论