29 lines
539 B
Python
29 lines
539 B
Python
import show
|
|
import torch
|
|
import mem_tracker
|
|
|
|
|
|
# radata = torch.randn(8192, 128)
|
|
# show.DumpTensorToImage(radata, "test.png", autoPad=True,scale=0.2)
|
|
|
|
|
|
radata = torch.randn(127)
|
|
show.DumpTensorToImage(radata, "test.png")
|
|
|
|
|
|
radata = torch.randn(3, 127, 127)
|
|
show.DumpTensorToImage(radata, "test.png")
|
|
|
|
|
|
radata = torch.randn(127, 127)
|
|
show.DumpTensorToLog(radata, "test.log")
|
|
|
|
|
|
radata = torch.randn(127, 127) - 0.5
|
|
show.ProbGE0(radata)
|
|
show.DumpProb()
|
|
|
|
radata = torch.randn(127, 127).cuda()
|
|
tracker = mem_tracker.MemTracker()
|
|
tracker.track()
|