Skip to content

Commit

Permalink
Update ChatGraphViewer.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
AkiKurisu committed Apr 23, 2024
1 parent cdc0fc8 commit 76a1047
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Editor/ChatModel/ChatGraphViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ public void LoadGraph(string graphPath)
//Using a simplest dimensionality reduction method
using var projection = ops.RandomNormal(new TensorShape(dataBase.dim, 2), 0, 1, 0);
using var transformed_vectors = ops.MatMul2D(tensor, projection, false, false);
using var meanPool_vectors = ops.L2Norm(transformed_vectors);
meanPool_vectors.MakeReadable();
using var normalized_vectors = ops.L2Norm(transformed_vectors);
normalized_vectors.MakeReadable();
for (int i = 0; i < count; i++)
{
data[i] = new(meanPool_vectors[i, 0], meanPool_vectors[i, 1]);
data[i] = new(normalized_vectors[i, 0], normalized_vectors[i, 1]);
}
}

Expand Down

0 comments on commit 76a1047

Please sign in to comment.