Pytorch setting print options ( Keeps printing vertically or columnwise)

Hi ,
whatever I try to print out or display

tensor([[-0.1028,
         -0.0493,
          0.0453,
         -0.0668,
          0.0362,
          0.1089,
          0.1205,
          0.0165,
          0.0700,
          0.0195],
        [-0.1050,
         -0.0383,
          0.0408,
         -0.0668,
          0.0474,
          0.1017,
          0.1247,
          0.0230,
          0.0677,
          0.0173],
        [-0.1120,
         -0.0409,
          0.0404,
         -0.0655,
          0.0430,
          0.1146,
          0.1072,
          0.0251,
          0.0721,
          0.0097],
        [-0.1108,
         -0.0349,
          0.0427,
         -0.0672,
          0.0415,
          0.1105,
          0.1137,
          0.0263,
          0.0722,
          0.0080],
        [-0.1079,
         -0.0386,
          0.0433,
         -0.0669,
          0.0410,
          0.0997,
          0.1243,
          0.0225,
          0.0688,
          0.0150],
        [-0.1027,
         -0.0366,
          0.0396,
         -0.0657,
          0.0498,
          0.0994,
          0.1280,
          0.0250,
          0.0614,
          0.0173],
        [-0.1010,
         -0.0523,
          0.0359,
         -0.0604,
          0.0518,
          0.1135,
          0.1135,
          0.0147,
          0.0695,
          0.0272],
        [-0.1037,
         -0.0294,
          0.0436,
         -0.0685,
          0.0513,
          0.0948,
          0.1266,
          0.0252,
          0.0685,
          0.0149],
        [-0.1153,
         -0.0436,
          0.0431,
         -0.0653,
          0.0348,
          0.1209,
          0.1094,
          0.0213,
          0.0722,
          0.0163],
        [-0.1083,
         -0.0480,
          0.0478,
         -0.0658,
          0.0249,
          0.1162,
          0.1144,
          0.0213,
          0.0609,
          0.0184],
        [-0.1084,
         -0.0359,
          0.0433,
         -0.0680,
          0.0409,
          0.1060,
          0.1188,
          0.0262,
          0.0701,
          0.0089],
        [-0.0987,
         -0.0484,
          0.0428,
         -0.0655,
          0.0394,
          0.1047,
          0.1214,
          0.0185,
          0.0653,
          0.0140],
        [-0.1025,
         -0.0513,
          0.0381,
         -0.0612,
          0.0470,
          0.1147,
          0.1100,
          0.0259,
          0.0671,
          0.0171],
        [-0.1082,
         -0.0480,
          0.0365,
         -0.0627,
          0.0437,
          0.1172,
          0.1066,
          0.0226,
          0.0716,
          0.0153],
        [-0.1082,
         -0.0464,
          0.0388,
         -0.0650,
          0.0489,
          0.1161,
          0.1071,
          0.0191,
          0.0721,
          0.0195],
        [-0.1019,
         -0.0496,
          0.0445,
         -0.0667,
          0.0400,
          0.1091,
          0.1148,
          0.0195,
          0.0695,
          0.0178],
        [-0.1088,
         -0.0414,
          0.0421,
         -0.0664,
          0.0424,
          0.1073,
          0.1150,
          0.0269,
          0.0692,
          0.0118],
        [-0.1067,
         -0.0345,
          0.0428,
         -0.0675,
          0.0445,
          0.1016,
          0.1223,
          0.0244,
          0.0699,
          0.0118],
        [-0.1058,
         -0.0359,
          0.0441,
         -0.0674,
          0.0421,
          0.1060,
          0.1206,
          0.0255,
          0.0691,
          0.0115],
        [-0.1113,
         -0.0403,
          0.0407,
         -0.0665,
          0.0457,
          0.1159,
          0.1062,
          0.0246,
          0.0722,
          0.0097],
        [-0.1064,
         -0.0396,
          0.0411,
         -0.0651,
          0.0423,
          0.1031,
          0.1222,
          0.0246,
          0.0686,
          0.0141],
        [-0.1092,
         -0.0365,
          0.0413,
         -0.0650,
          0.0417,
          0.1048,
          0.1197,
          0.0247,
          0.0681,
          0.0135],
        [-0.1147,
         -0.0384,
          0.0418,
         -0.0669,
          0.0358,
          0.1065,
          0.1175,
          0.0168,
          0.0761,
          0.0164],
        [-0.1039,
         -0.0368,
          0.0429,
         -0.0676,
          0.0462,
          0.1050,
          0.1202,
          0.0252,
          0.0693,
          0.0133],
        [-0.1034,
         -0.0350,
          0.0433,
         -0.0655,
          0.0460,
          0.1024,
          0.1228,
          0.0257,
          0.0664,
          0.0124],
        [-0.1051,
         -0.0400,
          0.0396,
         -0.0636,
          0.0443,
          0.1005,
          0.1210,
          0.0184,
          0.0668,
          0.0179],
        [-0.1036,
         -0.0400,
          0.0394,
         -0.0645,
          0.0402,
          0.1036,
          0.1227,
          0.0230,
          0.0643,
          0.0115],
        [-0.1014,
         -0.0334,
          0.0422,
         -0.0677,
          0.0490,
          0.0950,
          0.1271,
          0.0240,
          0.0664,
          0.0143],
        [-0.1079,
         -0.0363,
          0.0444,
         -0.0671,
          0.0425,
          0.1092,
          0.1164,
          0.0288,
          0.0694,
          0.0090],
        [-0.1032,
         -0.0371,
          0.0442,
         -0.0686,
          0.0449,
          0.1025,
          0.1230,
          0.0247,
          0.0677,
          0.0124],
        [-0.1108,
         -0.0407,
          0.0385,
         -0.0650,
          0.0503,
          0.1176,
          0.1083,
          0.0219,
          0.0719,
          0.0149],
        [-0.1132,
         -0.0410,
          0.0421,
         -0.0684,
          0.0394,
          0.1110,
          0.1109,
          0.0237,
          0.0738,
          0.0126],
        [-0.1036,
         -0.0392,
          0.0424,
         -0.0669,
          0.0442,
          0.1047,
          0.1212,
          0.0240,
          0.0675,
          0.0128],
        [-0.1126,
         -0.0420,
          0.0379,
         -0.0631,
          0.0440,
          0.1204,
          0.1029,
          0.0237,
          0.0716,
          0.0090],
        [-0.1116,
         -0.0412,
          0.0392,
         -0.0643,
          0.0445,
          0.1168,
          0.1047,
          0.0244,
          0.0714,
          0.0089],
        [-0.1180,
         -0.0393,
          0.0419,
         -0.0692,
          0.0380,
          0.1120,
          0.1103,
          0.0236,
          0.0738,
          0.0143],
        [-0.1140,
         -0.0425,
          0.0456,
         -0.0671,
          0.0327,
          0.1171,
          0.1154,
          0.0172,
          0.0771,
          0.0165],
        [-0.1108,
         -0.0378,
          0.0423,
         -0.0664,
          0.0417,
          0.1128,
          0.1114,
          0.0275,
          0.0720,
          0.0085],
        [-0.1044,
         -0.0435,
          0.0366,
         -0.0611,
          0.0441,
          0.1071,
          0.1181,
          0.0225,
          0.0660,
          0.0159],
        [-0.1039,
         -0.0339,
          0.0436,
         -0.0673,
          0.0458,
          0.0962,
          0.1253,
          0.0244,
          0.0651,
          0.0139],
        [-0.1061,
         -0.0340,
          0.0430,
         -0.0669,
          0.0455,
          0.1029,
          0.1208,
          0.0252,
          0.0693,
          0.0121],
        [-0.1004,
         -0.0514,
          0.0370,
         -0.0620,
          0.0508,
          0.1089,
          0.1076,
          0.0176,
          0.0695,
          0.0211],
        [-0.1013,
         -0.0491,
          0.0416,
         -0.0625,
          0.0432,
          0.1073,
          0.1120,
          0.0206,
          0.0696,
          0.0181],
        [-0.1108,
         -0.0486,
          0.0378,
         -0.0658,
          0.0431,
          0.1168,
          0.1050,
          0.0203,
          0.0748,
          0.0173],
        [-0.1022,
         -0.0440,
          0.0446,
         -0.0664,
          0.0399,
          0.1039,
          0.1247,
          0.0240,
          0.0612,
          0.0182],
        [-0.1058,
         -0.0373,
          0.0438,
         -0.0678,
          0.0424,
          0.1073,
          0.1170,
          0.0262,
          0.0692,
          0.0094],
        [-0.1061,
         -0.0474,
          0.0405,
         -0.0645,
          0.0473,
          0.1145,
          0.1136,
          0.0188,
          0.0707,
          0.0236],
        [-0.1065,
         -0.0368,
          0.0418,
         -0.0668,
          0.0445,
          0.0970,
          0.1204,
          0.0232,
          0.0680,
          0.0129],
        [-0.1039,
         -0.0401,
          0.0400,
         -0.0647,
          0.0436,
          0.1053,
          0.1188,
          0.0239,
          0.0670,
          0.0121],
        [-0.1056,
         -0.0397,
          0.0419,
         -0.0662,
          0.0426,
          0.0978,
          0.1244,
          0.0232,
          0.0663,
          0.0164],
        [-0.1079,
         -0.0427,
          0.0402,
         -0.0656,
          0.0391,
          0.1038,
          0.1195,
          0.0250,
          0.0662,
          0.0142],
        [-0.1095,
         -0.0394,
          0.0400,
         -0.0644,
          0.0397,
          0.1059,
          0.1185,
          0.0235,
          0.0694,
          0.0153],
        [-0.1074,
         -0.0473,
          0.0389,
         -0.0634,
          0.0455,
          0.1132,
          0.1142,
          0.0191,
          0.0702,
          0.0241],
        [-0.1021,
         -0.0325,
          0.0442,
         -0.0690,
          0.0479,
          0.0939,
          0.1296,
          0.0236,
          0.0666,
          0.0138],
        [-0.1101,
         -0.0403,
          0.0441,
         -0.0681,
          0.0438,
          0.1139,
          0.1093,
          0.0263,
          0.0724,
          0.0096],
        [-0.1063,
         -0.0369,
          0.0441,
         -0.0685,
          0.0432,
          0.1032,
          0.1217,
          0.0251,
          0.0713,
          0.0120],
        [-0.1023,
         -0.0336,
          0.0400,
         -0.0630,
          0.0478,
          0.1027,
          0.1185,
          0.0229,
          0.0664,
          0.0135],
        [-0.1101,
         -0.0439,
          0.0412,
         -0.0663,
          0.0437,
          0.1065,
          0.1163,
          0.0185,
          0.0725,
          0.0215],
        [-0.1073,
         -0.0426,
          0.0392,
         -0.0647,
          0.0404,
          0.1030,
          0.1213,
          0.0211,
          0.0691,
          0.0177],
        [-0.1071,
         -0.0460,
          0.0390,
         -0.0645,
          0.0407,
          0.1083,
          0.1132,
          0.0211,
          0.0683,
          0.0166],
        [-0.1104,
         -0.0431,
          0.0492,
         -0.0678,
          0.0270,
          0.1177,
          0.1204,
          0.0198,
          0.0693,
          0.0215],
        [-0.1031,
         -0.0404,
          0.0420,
         -0.0649,
          0.0444,
          0.1089,
          0.1189,
          0.0248,
          0.0682,
          0.0131],
        [-0.1113,
         -0.0480,
          0.0384,
         -0.0642,
          0.0479,
          0.1178,
          0.1044,
          0.0224,
          0.0715,
          0.0169],
        [-0.1076,
         -0.0447,
          0.0345,
         -0.0614,
          0.0500,
          0.1198,
          0.1066,
          0.0215,
          0.0697,
          0.0154],
        [-0.1071,
         -0.0396,
          0.0424,
         -0.0667,
          0.0402,
          0.1025,
          0.1235,
          0.0219,
          0.0670,
          0.0128],
        [-0.1040,
         -0.0352,
          0.0433,
         -0.0667,
          0.0449,
          0.1043,
          0.1209,
          0.0273,
          0.0678,
          0.0101],
        [-0.1062,
         -0.0328,
          0.0433,
         -0.0678,
          0.0453,
          0.1002,
          0.1236,
          0.0254,
          0.0680,
          0.0105],
        [-0.1095,
         -0.0405,
          0.0400,
         -0.0664,
          0.0403,
          0.1047,
          0.1213,
          0.0182,
          0.0713,
          0.0173],
        [-0.1095,
         -0.0374,
          0.0452,
         -0.0692,
          0.0403,
          0.1066,
          0.1159,
          0.0261,
          0.0713,
          0.0110],
        [-0.1090,
         -0.0424,
          0.0396,
         -0.0653,
          0.0416,
          0.1116,
          0.1126,
          0.0240,
          0.0698,
          0.0132],
        [-0.1091,
         -0.0318,
          0.0462,
         -0.0676,
          0.0391,
          0.1000,
          0.1287,
          0.0263,
          0.0642,
          0.0136],
        [-0.1090,
         -0.0441,
          0.0400,
         -0.0661,
          0.0407,
          0.1080,
          0.1151,
          0.0241,
          0.0692,
          0.0138],
        [-0.1086,
         -0.0376,
          0.0427,
         -0.0671,
          0.0436,
          0.1084,
          0.1121,
          0.0267,
          0.0705,
          0.0101],
        [-0.1061,
         -0.0417,
          0.0427,
         -0.0656,
          0.0393,
          0.1015,
          0.1238,
          0.0222,
          0.0682,
          0.0163],
        [-0.1072,
         -0.0439,
          0.0395,
         -0.0653,
          0.0429,
          0.1083,
          0.1161,
          0.0240,
          0.0687,
          0.0158],
        [-0.1074,
         -0.0330,
          0.0449,
         -0.0680,
          0.0462,
          0.0982,
          0.1243,
          0.0242,
          0.0682,
          0.0144],
        [-0.1059,
         -0.0349,
          0.0402,
         -0.0634,
          0.0483,
          0.1014,
          0.1205,
          0.0238,
          0.0682,
          0.0155],
        [-0.1036,
         -0.0353,
          0.0431,
         -0.0659,
          0.0450,
          0.1050,
          0.1210,
          0.0281,
          0.0675,
          0.0099],
        [-0.1074,
         -0.0424,
          0.0389,
         -0.0634,
          0.0440,
          0.1114,
          0.1114,
          0.0255,
          0.0692,
          0.0117],
        [-0.1010,
         -0.0470,
          0.0428,
         -0.0661,
          0.0388,
          0.1069,
          0.1197,
          0.0206,
          0.0630,
          0.0153],
        [-0.1061,
         -0.0386,
          0.0391,
         -0.0649,
          0.0450,
          0.1041,
          0.1193,
          0.0242,
          0.0648,
          0.0129],
        [-0.1123,
         -0.0402,
          0.0419,
         -0.0672,
          0.0421,
          0.1132,
          0.1089,
          0.0252,
          0.0721,
          0.0103],
        [-0.1097,
         -0.0474,
          0.0430,
         -0.0677,
          0.0400,
          0.1154,
          0.1088,
          0.0214,
          0.0699,
          0.0146],
        [-0.1046,
         -0.0501,
          0.0356,
         -0.0612,
          0.0472,
          0.1145,
          0.1135,
          0.0191,
          0.0683,
          0.0249],
        [-0.1047,
         -0.0474,
          0.0427,
         -0.0660,
          0.0345,
          0.1096,
          0.1211,
          0.0137,
          0.0699,
          0.0154],
        [-0.1080,
         -0.0488,
          0.0383,
         -0.0645,
          0.0438,
          0.1134,
          0.1057,
          0.0168,
          0.0754,
          0.0180],
        [-0.1069,
         -0.0419,
          0.0408,
         -0.0658,
          0.0407,
          0.1090,
          0.1191,
          0.0254,
          0.0672,
          0.0121],
        [-0.1067,
         -0.0463,
          0.0392,
         -0.0631,
          0.0518,
          0.1150,
          0.1092,
          0.0158,
          0.0734,
          0.0236],
        [-0.1042,
         -0.0477,
          0.0397,
         -0.0648,
          0.0404,
          0.1057,
          0.1175,
          0.0167,
          0.0708,
          0.0149],
        [-0.1041,
         -0.0482,
          0.0432,
         -0.0656,
          0.0442,
          0.1126,
          0.1099,
          0.0214,
          0.0718,
          0.0187],
        [-0.1084,
         -0.0505,
          0.0430,
         -0.0679,
          0.0411,
          0.1120,
          0.1029,
          0.0202,
          0.0753,
          0.0140],
        [-0.1096,
         -0.0434,
          0.0401,
         -0.0647,
          0.0382,
          0.1087,
          0.1127,
          0.0190,
          0.0727,
          0.0163],
        [-0.1106,
         -0.0387,
          0.0416,
         -0.0657,
          0.0462,
          0.1099,
          0.1100,
          0.0236,
          0.0702,
          0.0128],
        [-0.1011,
         -0.0489,
          0.0412,
         -0.0641,
          0.0460,
          0.1073,
          0.1121,
          0.0206,
          0.0699,
          0.0200],
        [-0.1091,
         -0.0408,
          0.0383,
         -0.0648,
          0.0430,
          0.1050,
          0.1152,
          0.0193,
          0.0706,
          0.0151],
        [-0.1092,
         -0.0381,
          0.0450,
         -0.0686,
          0.0440,
          0.1097,
          0.1128,
          0.0272,
          0.0716,
          0.0105],
        [-0.1118,
         -0.0399,
          0.0406,
         -0.0654,
          0.0446,
          0.1169,
          0.1066,
          0.0261,
          0.0716,
          0.0099],
        [-0.1064,
         -0.0449,
          0.0367,
         -0.0617,
          0.0417,
          0.1090,
          0.1150,
          0.0223,
          0.0675,
          0.0140],
        [-0.1087,
         -0.0379,
          0.0407,
         -0.0644,
          0.0427,
          0.1077,
          0.1166,
          0.0247,
          0.0703,
          0.0127],
        [-0.1079,
         -0.0435,
          0.0422,
         -0.0692,
          0.0438,
          0.1096,
          0.1183,
          0.0208,
          0.0712,
          0.0214]],
       grad_fn=<AddmmBackward>)

It displays vertically or columnwise only , How can I display it like a normal matrix?
Thanks !!

What do you mean by “normal matrix”. This looks quite reasonable as a way to print a matrix of size 10 x 1.
If you have a vector (of size 10) or a row matrix (of size 1 x 10) it will print on the same line.

tensor([[-0.1028,
         -0.0493,
          0.0453,
         -0.0668,
          0.0362,
          0.1089,
          0.1205,
          0.0165,
          0.0700,
          0.0195],
        [-0.1050,
         -0.0383,
          0.0408,
         -0.0668,
          0.0474,
          0.1017,
          0.1247,
          0.0230,
          0.0677,
          0.0173],
        [-0.1120,
         -0.0409,
          0.0404,
         -0.0655,
          0.0430,
          0.1146,
          0.1072,
          0.0251,
          0.0721,
          0.0097],
        [-0.1108,
         -0.0349,
          0.0427,
         -0.0672,
          0.0415,
          0.1105,
          0.1137,
          0.0263,
          0.0722,
          0.0080],
        [-0.1079,
         -0.0386,
          0.0433,
         -0.0669,
          0.0410,
          0.0997,
          0.1243,
          0.0225,
          0.0688,
          0.0150],
        [-0.1027,
         -0.0366,
          0.0396,
         -0.0657,
          0.0498,
          0.0994,
          0.1280,
          0.0250,
          0.0614,
          0.0173],
        [-0.1010,
         -0.0523,
          0.0359,
         -0.0604,
          0.0518,
          0.1135,
          0.1135,
          0.0147,
          0.0695,
          0.0272],
        [-0.1037,
         -0.0294,
          0.0436,
         -0.0685,
          0.0513,
          0.0948,
          0.1266,
          0.0252,
          0.0685,
          0.0149],
        [-0.1153,
         -0.0436,
          0.0431,
         -0.0653,
          0.0348,
          0.1209,
          0.1094,
          0.0213,
          0.0722,
          0.0163],
        [-0.1083,
         -0.0480,
          0.0478,
         -0.0658,
          0.0249,
          0.1162,
          0.1144,
          0.0213,
          0.0609,
          0.0184],
        [-0.1084,
         -0.0359,
          0.0433,
         -0.0680,
          0.0409,
          0.1060,
          0.1188,
          0.0262,
          0.0701,
          0.0089],
        [-0.0987,
         -0.0484,
          0.0428,
         -0.0655,
          0.0394,
          0.1047,
          0.1214,
          0.0185,
          0.0653,
          0.0140],
        [-0.1025,
         -0.0513,
          0.0381,
         -0.0612,
          0.0470,
          0.1147,
          0.1100,
          0.0259,
          0.0671,
          0.0171],
        [-0.1082,
         -0.0480,
          0.0365,
         -0.0627,
          0.0437,
          0.1172,
          0.1066,
          0.0226,
          0.0716,
          0.0153],
        [-0.1082,
         -0.0464,
          0.0388,
         -0.0650,
          0.0489,
          0.1161,
          0.1071,
          0.0191,
          0.0721,
          0.0195],
        [-0.1019,
         -0.0496,
          0.0445,
         -0.0667,
          0.0400,
          0.1091,
          0.1148,
          0.0195,
          0.0695,
          0.0178],
        [-0.1088,
         -0.0414,
          0.0421,
         -0.0664,
          0.0424,
          0.1073,
          0.1150,
          0.0269,
          0.0692,
          0.0118],
        [-0.1067,
         -0.0345,
          0.0428,
         -0.0675,
          0.0445,
          0.1016,
          0.1223,
          0.0244,
          0.0699,
          0.0118],
        [-0.1058,
         -0.0359,
          0.0441,
         -0.0674,
          0.0421,
          0.1060,
          0.1206,
          0.0255,
          0.0691,
          0.0115],
        [-0.1113,
         -0.0403,
          0.0407,
         -0.0665,
          0.0457,
          0.1159,
          0.1062,
          0.0246,
          0.0722,
          0.0097],
        [-0.1064,
         -0.0396,
          0.0411,
         -0.0651,
          0.0423,
          0.1031,
          0.1222,
          0.0246,
          0.0686,
          0.0141],
        [-0.1092,
         -0.0365,
          0.0413,
         -0.0650,
          0.0417,
          0.1048,
          0.1197,
          0.0247,
          0.0681,
          0.0135],
        [-0.1147,
         -0.0384,
          0.0418,
         -0.0669,
          0.0358,
          0.1065,
          0.1175,
          0.0168,
          0.0761,
          0.0164],
        [-0.1039,
         -0.0368,
          0.0429,
         -0.0676,
          0.0462,
          0.1050,
          0.1202,
          0.0252,
          0.0693,
          0.0133],
        [-0.1034,
         -0.0350,
          0.0433,
         -0.0655,
          0.0460,
          0.1024,
          0.1228,
          0.0257,
          0.0664,
          0.0124],
        [-0.1051,
         -0.0400,
          0.0396,
         -0.0636,
          0.0443,
          0.1005,
          0.1210,
          0.0184,
          0.0668,
          0.0179],
        [-0.1036,
         -0.0400,
          0.0394,
         -0.0645,
          0.0402,
          0.1036,
          0.1227,
          0.0230,
          0.0643,
          0.0115],
        [-0.1014,
         -0.0334,
          0.0422,
         -0.0677,
          0.0490,
          0.0950,
          0.1271,
          0.0240,
          0.0664,
          0.0143],
        [-0.1079,
         -0.0363,
          0.0444,
         -0.0671,
          0.0425,
          0.1092,
          0.1164,
          0.0288,
          0.0694,
          0.0090],
        [-0.1032,
         -0.0371,
          0.0442,
         -0.0686,
          0.0449,
          0.1025,
          0.1230,
          0.0247,
          0.0677,
          0.0124],
        [-0.1108,
         -0.0407,
          0.0385,
         -0.0650,
          0.0503,
          0.1176,
          0.1083,
          0.0219,
          0.0719,
          0.0149],
        [-0.1132,
         -0.0410,
          0.0421,
         -0.0684,
          0.0394,
          0.1110,
          0.1109,
          0.0237,
          0.0738,
          0.0126],
        [-0.1036,
         -0.0392,
          0.0424,
         -0.0669,
          0.0442,
          0.1047,
          0.1212,
          0.0240,
          0.0675,
          0.0128],
        [-0.1126,
         -0.0420,
          0.0379,
         -0.0631,
          0.0440,
          0.1204,
          0.1029,
          0.0237,
          0.0716,
          0.0090],
        [-0.1116,
         -0.0412,
          0.0392,
         -0.0643,
          0.0445,
          0.1168,
          0.1047,
          0.0244,
          0.0714,
          0.0089],
        [-0.1180,
         -0.0393,
          0.0419,
         -0.0692,
          0.0380,
          0.1120,
          0.1103,
          0.0236,
          0.0738,
          0.0143],
        [-0.1140,
         -0.0425,
          0.0456,
         -0.0671,
          0.0327,
          0.1171,
          0.1154,
          0.0172,
          0.0771,
          0.0165],
        [-0.1108,
         -0.0378,
          0.0423,
         -0.0664,
          0.0417,
          0.1128,
          0.1114,
          0.0275,
          0.0720,
          0.0085],
        [-0.1044,
         -0.0435,
          0.0366,
         -0.0611,
          0.0441,
          0.1071,
          0.1181,
          0.0225,
          0.0660,
          0.0159],
        [-0.1039,
         -0.0339,
          0.0436,
         -0.0673,
          0.0458,
          0.0962,
          0.1253,
          0.0244,
          0.0651,
          0.0139],
        [-0.1061,
         -0.0340,
          0.0430,
         -0.0669,
          0.0455,
          0.1029,
          0.1208,
          0.0252,
          0.0693,
          0.0121],
        [-0.1004,
         -0.0514,
          0.0370,
         -0.0620,
          0.0508,
          0.1089,
          0.1076,
          0.0176,
          0.0695,
          0.0211],
        [-0.1013,
         -0.0491,
          0.0416,
         -0.0625,
          0.0432,
          0.1073,
          0.1120,
          0.0206,
          0.0696,
          0.0181],
        [-0.1108,
         -0.0486,
          0.0378,
         -0.0658,
          0.0431,
          0.1168,
          0.1050,
          0.0203,
          0.0748,
          0.0173],
        [-0.1022,
         -0.0440,
          0.0446,
         -0.0664,
          0.0399,
          0.1039,
          0.1247,
          0.0240,
          0.0612,
          0.0182],
        [-0.1058,
         -0.0373,
          0.0438,
         -0.0678,
          0.0424,
          0.1073,
          0.1170,
          0.0262,
          0.0692,
          0.0094],
        [-0.1061,
         -0.0474,
          0.0405,
         -0.0645,
          0.0473,
          0.1145,
          0.1136,
          0.0188,
          0.0707,
          0.0236],
        [-0.1065,
         -0.0368,
          0.0418,
         -0.0668,
          0.0445,
          0.0970,
          0.1204,
          0.0232,
          0.0680,
          0.0129],
        [-0.1039,
         -0.0401,
          0.0400,
         -0.0647,
          0.0436,
          0.1053,
          0.1188,
          0.0239,
          0.0670,
          0.0121],
        [-0.1056,
         -0.0397,
          0.0419,
         -0.0662,
          0.0426,
          0.0978,
          0.1244,
          0.0232,
          0.0663,
          0.0164],
        [-0.1079,
         -0.0427,
          0.0402,
         -0.0656,
          0.0391,
          0.1038,
          0.1195,
          0.0250,
          0.0662,
          0.0142],
        [-0.1095,
         -0.0394,
          0.0400,
         -0.0644,
          0.0397,
          0.1059,
          0.1185,
          0.0235,
          0.0694,
          0.0153],
        [-0.1074,
         -0.0473,
          0.0389,
         -0.0634,
          0.0455,
          0.1132,
          0.1142,
          0.0191,
          0.0702,
          0.0241],
        [-0.1021,
         -0.0325,
          0.0442,
         -0.0690,
          0.0479,
          0.0939,
          0.1296,
          0.0236,
          0.0666,
          0.0138],
        [-0.1101,
         -0.0403,
          0.0441,
         -0.0681,
          0.0438,
          0.1139,
          0.1093,
          0.0263,
          0.0724,
          0.0096],
        [-0.1063,
         -0.0369,
          0.0441,
         -0.0685,
          0.0432,
          0.1032,
          0.1217,
          0.0251,
          0.0713,
          0.0120],
        [-0.1023,
         -0.0336,
          0.0400,
         -0.0630,
          0.0478,
          0.1027,
          0.1185,
          0.0229,
          0.0664,
          0.0135],
        [-0.1101,
         -0.0439,
          0.0412,
         -0.0663,
          0.0437,
          0.1065,
          0.1163,
          0.0185,
          0.0725,
          0.0215],
        [-0.1073,
         -0.0426,
          0.0392,
         -0.0647,
          0.0404,
          0.1030,
          0.1213,
          0.0211,
          0.0691,
          0.0177],
        [-0.1071,
         -0.0460,
          0.0390,
         -0.0645,
          0.0407,
          0.1083,
          0.1132,
          0.0211,
          0.0683,
          0.0166],
        [-0.1104,
         -0.0431,
          0.0492,
         -0.0678,
          0.0270,
          0.1177,
          0.1204,
          0.0198,
          0.0693,
          0.0215],
        [-0.1031,
         -0.0404,
          0.0420,
         -0.0649,
          0.0444,
          0.1089,
          0.1189,
          0.0248,
          0.0682,
          0.0131],
        [-0.1113,
         -0.0480,
          0.0384,
         -0.0642,
          0.0479,
          0.1178,
          0.1044,
          0.0224,
          0.0715,
          0.0169],
        [-0.1076,
         -0.0447,
          0.0345,
         -0.0614,
          0.0500,
          0.1198,
          0.1066,
          0.0215,
          0.0697,
          0.0154],
        [-0.1071,
         -0.0396,
          0.0424,
         -0.0667,
          0.0402,
          0.1025,
          0.1235,
          0.0219,
          0.0670,
          0.0128],
        [-0.1040,
         -0.0352,
          0.0433,
         -0.0667,
          0.0449,
          0.1043,
          0.1209,
          0.0273,
          0.0678,
          0.0101],
        [-0.1062,
         -0.0328,
          0.0433,
         -0.0678,
          0.0453,
          0.1002,
          0.1236,
          0.0254,
          0.0680,
          0.0105],
        [-0.1095,
         -0.0405,
          0.0400,
         -0.0664,
          0.0403,
          0.1047,
          0.1213,
          0.0182,
          0.0713,
          0.0173],
        [-0.1095,
         -0.0374,
          0.0452,
         -0.0692,
          0.0403,
          0.1066,
          0.1159,
          0.0261,
          0.0713,
          0.0110],
        [-0.1090,
         -0.0424,
          0.0396,
         -0.0653,
          0.0416,
          0.1116,
          0.1126,
          0.0240,
          0.0698,
          0.0132],
        [-0.1091,
         -0.0318,
          0.0462,
         -0.0676,
          0.0391,
          0.1000,
          0.1287,
          0.0263,
          0.0642,
          0.0136],
        [-0.1090,
         -0.0441,
          0.0400,
         -0.0661,
          0.0407,
          0.1080,
          0.1151,
          0.0241,
          0.0692,
          0.0138],
        [-0.1086,
         -0.0376,
          0.0427,
         -0.0671,
          0.0436,
          0.1084,
          0.1121,
          0.0267,
          0.0705,
          0.0101],
        [-0.1061,
         -0.0417,
          0.0427,
         -0.0656,
          0.0393,
          0.1015,
          0.1238,
          0.0222,
          0.0682,
          0.0163],
        [-0.1072,
         -0.0439,
          0.0395,
         -0.0653,
          0.0429,
          0.1083,
          0.1161,
          0.0240,
          0.0687,
          0.0158],
        [-0.1074,
         -0.0330,
          0.0449,
         -0.0680,
          0.0462,
          0.0982,
          0.1243,
          0.0242,
          0.0682,
          0.0144],
        [-0.1059,
         -0.0349,
          0.0402,
         -0.0634,
          0.0483,
          0.1014,
          0.1205,
          0.0238,
          0.0682,
          0.0155],
        [-0.1036,
         -0.0353,
          0.0431,
         -0.0659,
          0.0450,
          0.1050,
          0.1210,
          0.0281,
          0.0675,
          0.0099],
        [-0.1074,
         -0.0424,
          0.0389,
         -0.0634,
          0.0440,
          0.1114,
          0.1114,
          0.0255,
          0.0692,
          0.0117],
        [-0.1010,
         -0.0470,
          0.0428,
         -0.0661,
          0.0388,
          0.1069,
          0.1197,
          0.0206,
          0.0630,
          0.0153],
        [-0.1061,
         -0.0386,
          0.0391,
         -0.0649,
          0.0450,
          0.1041,
          0.1193,
          0.0242,
          0.0648,
          0.0129],
        [-0.1123,
         -0.0402,
          0.0419,
         -0.0672,
          0.0421,
          0.1132,
          0.1089,
          0.0252,
          0.0721,
          0.0103],
        [-0.1097,
         -0.0474,
          0.0430,
         -0.0677,
          0.0400,
          0.1154,
          0.1088,
          0.0214,
          0.0699,
          0.0146],
        [-0.1046,
         -0.0501,
          0.0356,
         -0.0612,
          0.0472,
          0.1145,
          0.1135,
          0.0191,
          0.0683,
          0.0249],
        [-0.1047,
         -0.0474,
          0.0427,
         -0.0660,
          0.0345,
          0.1096,
          0.1211,
          0.0137,
          0.0699,
          0.0154],
        [-0.1080,
         -0.0488,
          0.0383,
         -0.0645,
          0.0438,
          0.1134,
          0.1057,
          0.0168,
          0.0754,
          0.0180],
        [-0.1069,
         -0.0419,
          0.0408,
         -0.0658,
          0.0407,
          0.1090,
          0.1191,
          0.0254,
          0.0672,
          0.0121],
        [-0.1067,
         -0.0463,
          0.0392,
         -0.0631,
          0.0518,
          0.1150,
          0.1092,
          0.0158,
          0.0734,
          0.0236],
        [-0.1042,
         -0.0477,
          0.0397,
         -0.0648,
          0.0404,
          0.1057,
          0.1175,
          0.0167,
          0.0708,
          0.0149],
        [-0.1041,
         -0.0482,
          0.0432,
         -0.0656,
          0.0442,
          0.1126,
          0.1099,
          0.0214,
          0.0718,
          0.0187],
        [-0.1084,
         -0.0505,
          0.0430,
         -0.0679,
          0.0411,
          0.1120,
          0.1029,
          0.0202,
          0.0753,
          0.0140],
        [-0.1096,
         -0.0434,
          0.0401,
         -0.0647,
          0.0382,
          0.1087,
          0.1127,
          0.0190,
          0.0727,
          0.0163],
        [-0.1106,
         -0.0387,
          0.0416,
         -0.0657,
          0.0462,
          0.1099,
          0.1100,
          0.0236,
          0.0702,
          0.0128],
        [-0.1011,
         -0.0489,
          0.0412,
         -0.0641,
          0.0460,
          0.1073,
          0.1121,
          0.0206,
          0.0699,
          0.0200],
        [-0.1091,
         -0.0408,
          0.0383,
         -0.0648,
          0.0430,
          0.1050,
          0.1152,
          0.0193,
          0.0706,
          0.0151],
        [-0.1092,
         -0.0381,
          0.0450,
         -0.0686,
          0.0440,
          0.1097,
          0.1128,
          0.0272,
          0.0716,
          0.0105],
        [-0.1118,
         -0.0399,
          0.0406,
         -0.0654,
          0.0446,
          0.1169,
          0.1066,
          0.0261,
          0.0716,
          0.0099],
        [-0.1064,
         -0.0449,
          0.0367,
         -0.0617,
          0.0417,
          0.1090,
          0.1150,
          0.0223,
          0.0675,
          0.0140],
        [-0.1087,
         -0.0379,
          0.0407,
         -0.0644,
          0.0427,
          0.1077,
          0.1166,
          0.0247,
          0.0703,
          0.0127],
        [-0.1079,
         -0.0435,
          0.0422,
         -0.0692,
          0.0438,
          0.1096,
          0.1183,
          0.0208,
          0.0712,
          0.0214]],
       grad_fn=<AddmmBackward>)

prints like this, (Edited original post also )
Do I have to reshape it everytime?

The way the printing works is that we plot the last two dimensions as a 2D matrix.
And extra dimensions before are stacked and these 2D matrices are written one below the other.
Note that the same thing is done by numpy and most libraries I know.

In your case, because the last dimension is 1, then have only colum vectors.
You can remove that dimension if you want to change the way it is printed.

torch.Size([100, 10])
This is what I get when I checked the shape of above displayed tensor. so how can I remove that or should I state somewhere dim=0?

Ho that’s surprising.
Can you try torch.set_printoptions(linewidth=120) ? Maybe the linewidth of your terminal is not set properly?

I have already set it to 20 , is that wrong? , Wow that solved my error , thank you very much , By the way what are the values of linewidth in general I have to use?

Ho right!
This value tells how wide the. screen is. And the value is in characters.
The usual default is 80. But if your screen is extra wide, you can increase that to use more of it.

If you set it to 20, then as you saw, it will be forced to write things in column as there isn’t enough space in each line to write the content.

Thank you so much , It was indeed a clear explanation . for easily to be noticed by others , I will change the topic to set print options

1 Like