Skip to content

Instantly share code, notes, and snippets.

View matteorapa's full-sized avatar
🎯
Focusing

Matteo Rapa matteorapa

🎯
Focusing
View GitHub Profile
@matteorapa
matteorapa / cuda.ipynb
Last active August 24, 2024 22:02
cuda.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def generate_initial_population(num_population):
# [learning_rate, hidden_size, number_of_layers, fitness]
learning_rate = np.empty([num_population, 1], dtype=np.float32)
hidden_size = np.empty([num_population, 1], dtype=np.int32)
number_of_layers = np.empty([num_population, 1], dtype=np.int32)
fitness = np.zeros([num_population, 1], dtype=np.float32)
for i in range(num_population):
learning_rate[i] = round(random.uniform(0.001, 0.1), 3)
@matteorapa
matteorapa / first.txt
Created June 14, 2022 07:33
My first gist
My first gist on github.