dualing.utils.projector

Helpers and methods to project embedded data.

dualing.utils.projector._tensor_to_numpy(tensor: tensorflow.Tensor)

Converts a tensor to a numpy array.

Parameters

tensor – Tensor to be converted.

Returns

Array with the same values as the tensor.

Return type

(np.ndarray)

dualing.utils.projector.plot_embeddings(embeddings: Union[tensorflow.Tensor, numpy.array], labels: Union[tensorflow.Tensor, numpy.array], dims: Optional[Tuple[int, Ellipsis]] = (0, 1))

Plots embedded data along their true labels.

Parameters
  • embeddings – Tensor or array holding the embedded data.

  • labels – Tensor or array holding the true labels.

  • dims – Dimensions to be plotted.