使用tensorboad时遇到问题:
RuntimeError: Output 0 of UnbindBackward is a view and is being modified inplace. This view is the output of a function that returns multiple views. Such functions do not allow the output views to be modified inplace. You should replace the inplace operation by an out-of-place one.
解决办法:
根据终端提示的位置信息,修改 util.py 文件:
Traceback (most recent call last):
File “board_visual.py”, line 70, in img_grid = vutils.make_grid(x1,normalize=True,scale_each=True, nrow=16) #
File “/home/.local/lib/python3.6/site-packages/torchvision/utils.py”, line 74, in make_grid
for i, t in tensor: # loop over mini-batch dimension
ValueError: too many values to unpack (expected 2)
修改之后的 util.py 文件的74和75行:
for i, t in enumerate(tensor): # loop over mini-batch dimension
norm_range(tensor[i], range)