报错信息:
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
解决方案:将x.view()改为x.reshape()即可,轻松一步搞定
报错信息:
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
解决方案:将x.view()改为x.reshape()即可,轻松一步搞定