Relative Content

Tag Archive for pythonpytorchtensor

How to convert a set of tensor values to a list while keeping the format float precision

I have a 3 lists of ids (sequence[i].id_column) and when I print them, I see (I don’t know for what reason) the format of the second list changes! for example 4.2 becomes 4.2e+00. I tried to add all those lists to a set (unique_values) and then convert it to a list (unique_values_tensor) to make the values inside it to be unique (unique_values-sorted). however I see unique_values_sorted has different format. Please help me how can I keep all these three lists in a list that has unique values of them (not having repeated values) and in the correct format like the values displayed for the first id_column_tensor.