fix(model): checkpoints in h5 format
This commit is contained in:
@ -163,8 +163,8 @@ def continent_agent(ground, position, size):
|
||||
while True:
|
||||
# if trials > CONTINENT_MAX_TRIALS:
|
||||
# print('couldnt proceed')
|
||||
# if size <= 0 or trials > CONTINENT_MAX_TRIALS: break
|
||||
if size <= 0: break
|
||||
if size <= 0 or trials > CONTINENT_MAX_TRIALS: break
|
||||
# if size <= 0: break
|
||||
|
||||
dx = np.random.randint(2) or -1
|
||||
dy = np.random.randint(2) or -1
|
||||
@ -184,8 +184,8 @@ def continent_agent(ground, position, size):
|
||||
trials = 0
|
||||
size -= 1
|
||||
ground[x, y] = np.random.randint(1, p['ground_noise'])
|
||||
# else:
|
||||
# trials += 1
|
||||
else:
|
||||
trials += 1
|
||||
|
||||
def neighbours(ground, position, radius):
|
||||
x, y = position
|
||||
@ -271,7 +271,7 @@ def generate_map(**kwargs):
|
||||
|
||||
ym = ym * -1
|
||||
|
||||
random_size = ground_size / continents
|
||||
random_size = ground_size / continents
|
||||
continent_agent(ground, position, size=random_size)
|
||||
|
||||
ground = ndimage.gaussian_filter(ground, sigma=(1 - p['sharpness']) * 20)
|
||||
|
@ -12,7 +12,7 @@ function generate() {
|
||||
const queryString = new URLSearchParams(formData).toString()
|
||||
map.src = '/map?' + queryString;
|
||||
map.classList.add('d-none');
|
||||
|
||||
map.width = formData.get('width');
|
||||
}
|
||||
|
||||
mapSettings.addEventListener('submit', (e) => {
|
||||
|
@ -21,7 +21,7 @@
|
||||
<aside class='col-3 px-4 bg-dark text-light text-center py-3'>
|
||||
<h3>World Map Generator</h3>
|
||||
|
||||
<div class='panel px-4'>
|
||||
<div class='panel px-4 pb-3'>
|
||||
<form class='mt-5' id='map-settings'>
|
||||
{% for k, v in parameters.items() %}
|
||||
<div class='form-group'>
|
||||
|
Reference in New Issue
Block a user