State_dict truncates some tensors

Hello,

I built a DQN in PyTorch for Kaggle’s ConnectX competition. Due to the format of the competition, I need to save the entire network as a string. However, state_dict() seems to be cutting the string output of some of the tensors arbitrarily.

Here’s an example:

conv3.weight 	 tensor([[[[-0.3832]],

         [[-0.4524]],

         [[-0.0259]],

         ...,

         [[ 0.0565]],

         [[ 0.2471]],

         [[-0.4269]]],

As you can see, some of the tensor has been removed and replaced by the ellipsis (…).
Is there any way to circumvent this issue?

Hello,

I found a solution to the problem. This isn’t related to state_dict at all, but is rather just the string returned by a torch.Tensor being capped.

Use torch.set_printoptions(profile=“full”) to increase the limit.