mantel/create_image.py

13 lines
355 B
Python
Raw Normal View History

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))
IMAGE_SIZE = 100
2024-06-11 21:28:52 +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)