2024-06-11 21:28:52 +10:00
|
|
|
import numpy as np
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
|
|
|
from models import train_kohonen_network, create_kohonen_params
|
|
|
|
|
|
|
|
X = np.random.random((1000,3))
|
|
|
|
|
2024-06-12 01:28:34 +10:00
|
|
|
IMAGE_SIZE = 100
|
2024-06-11 21:28:52 +10:00
|
|
|
|
2024-06-12 01:28:34 +10:00
|
|
|
params = create_kohonen_params(X, IMAGE_SIZE, IMAGE_SIZE, 100).unwrap()
|
2024-06-11 21:28:52 +10:00
|
|
|
image_data = train_kohonen_network(X, params, use_mlflow=True).unwrap()
|
|
|
|
|
|
|
|
plt.imsave(f'{IMAGE_SIZE}.png', image_data)
|