update hyperparameter trên trang training_interface.html
This commit is contained in:
+20
-10
@@ -520,15 +520,15 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group" id="nEstimatorsGroup">
|
||||
<label>N Estimators:</label>
|
||||
<input type="number" id="nEstimators" value="100" min="10" max="1000" required>
|
||||
<input type="number" id="nEstimators" value="400" min="10" max="1000" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Max Depth:</label>
|
||||
<input type="number" id="maxDepth" value="20" min="1" max="50" required>
|
||||
<input type="number" id="maxDepth" value="12" min="1" max="50" required>
|
||||
</div>
|
||||
<div class="form-group" id="learningRateGroup">
|
||||
<label>Learning Rate:</label>
|
||||
<input type="number" step="0.0001" id="learningRate" value="0.1" min="0.0001" max="1" required>
|
||||
<input type="number" step="0.0001" id="learningRate" value="0.05" min="0.0001" max="1" required>
|
||||
</div>
|
||||
<div class="form-group" id="testSizeGroup">
|
||||
<label>Tỷ lệ dữ liệu test (0-1):</label>
|
||||
@@ -1411,42 +1411,52 @@
|
||||
nEstimatorsGroup.style.display = '';
|
||||
learningRateGroup.style.display = '';
|
||||
useGpuGroup.style.display = '';
|
||||
document.querySelector('#nEstimatorsGroup label').textContent = 'N Estimators:';
|
||||
document.getElementById('nEstimators').value = 400;
|
||||
document.getElementById('maxDepth').value = 12;
|
||||
document.querySelector('#learningRateGroup label').textContent = 'Learning Rate:';
|
||||
document.getElementById('learningRate').value = 0.05;
|
||||
} else if (modelType === 'random_forest') {
|
||||
nEstimatorsGroup.style.display = '';
|
||||
learningRateGroup.style.display = 'none';
|
||||
useGpuGroup.style.display = 'none';
|
||||
document.querySelector('#nEstimatorsGroup label').textContent = 'Trees:';
|
||||
document.getElementById('nEstimators').value = 300;
|
||||
document.getElementById('maxDepth').value = 18;
|
||||
} else if (modelType === 'decision_tree') {
|
||||
nEstimatorsGroup.style.display = 'none';
|
||||
learningRateGroup.style.display = 'none';
|
||||
useGpuGroup.style.display = 'none';
|
||||
document.getElementById('maxDepth').value = 12;
|
||||
} else if (modelType === 'svm') {
|
||||
nEstimatorsGroup.style.display = 'none';
|
||||
learningRateGroup.style.display = 'none';
|
||||
useGpuGroup.style.display = 'none';
|
||||
document.getElementById('maxDepth').value = 12;
|
||||
} else if (modelType === 'cnn') {
|
||||
// CNN uses n_estimators as epochs and supports GPU
|
||||
nEstimatorsGroup.style.display = '';
|
||||
document.querySelector('#nEstimatorsGroup label').textContent = 'Epochs (số lần training):';
|
||||
document.getElementById('nEstimators').value = 50;
|
||||
document.getElementById('nEstimators').value = 30;
|
||||
learningRateGroup.style.display = 'none';
|
||||
useGpuGroup.style.display = ''; // Show GPU option for CNN
|
||||
} else if (modelType === 'swin-unet') {
|
||||
// Swin-UNet uses n_estimators as epochs and supports GPU
|
||||
nEstimatorsGroup.style.display = '';
|
||||
document.querySelector('#nEstimatorsGroup label').textContent = 'Epochs (số lần training):';
|
||||
document.getElementById('nEstimators').value = 100;
|
||||
document.getElementById('nEstimators').value = 80;
|
||||
learningRateGroup.style.display = ''; // Show learning rate for Swin-UNet
|
||||
document.querySelector('#learningRateGroup label').textContent = 'Learning Rate (mặc định: 0.0005):';
|
||||
document.getElementById('learningRate').value = 0.0005;
|
||||
document.querySelector('#learningRateGroup label').textContent = 'Learning Rate (mặc định: 0.0003):';
|
||||
document.getElementById('learningRate').value = 0.0003;
|
||||
useGpuGroup.style.display = ''; // Show GPU option for Swin-UNet
|
||||
} else if (modelType === 'mobilenet-lraspp') {
|
||||
// MobileNetV3 + LR-ASPP uses n_estimators as epochs and supports GPU
|
||||
nEstimatorsGroup.style.display = '';
|
||||
document.querySelector('#nEstimatorsGroup label').textContent = 'Epochs (số lần training):';
|
||||
document.getElementById('nEstimators').value = 60;
|
||||
document.getElementById('nEstimators').value = 50;
|
||||
learningRateGroup.style.display = ''; // Show learning rate for MobileNet
|
||||
document.querySelector('#learningRateGroup label').textContent = 'Learning Rate (mặc định: 0.001):';
|
||||
document.getElementById('learningRate').value = 0.001;
|
||||
document.querySelector('#learningRateGroup label').textContent = 'Learning Rate (mặc định: 0.0008):';
|
||||
document.getElementById('learningRate').value = 0.0008;
|
||||
useGpuGroup.style.display = ''; // Show GPU option for MobileNet
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user