我在tensorflow网站上找到了一些示例代码,如下所示。
wait = new WebDriverWait(driver, 20);
By container = By.xpath(".//*[@id='webForm:sensorContainer']/div/div[1]/div[1]/div/div[6]");
wait.until(ExpectedConditions.visibilityOfElementLocated(container));
/* Read the text that appears in the XPath text control. */
WebElement ajaxControl = driver.findElement(container);
String ajaxTextFirstPara = ajaxControl.getText().trim();
WebElement ele= driver.findElement(container);
try{
wait.until(ExpectedConditions.stalenessOf(ele));
}catch(TimeoutException e){
}
/* Wait for the new content to appear in the xpath text control. */
By newAjaxcontrol = container;
Wait<WebDriver> newwait = new FluentWait<>(driver)
.withTimeout(60, TimeUnit.SECONDS)
.pollingEvery(5, TimeUnit.SECONDS)
.ignoring(NoSuchElementException.class);
newwait.until(ExpectedConditions
.visibilityOfElementLocated(newAjaxcontrol));
WebElement undergroundTemperature_14_L_value= driver.findElement(newAjaxcontrol);
String undergroundTemperature_14_L =undergroundTemperature_14_L_value.getText().trim();
if(ajaxTextFirstPara!= undergroundTemperature_14_L)
{
System.out.println("diffeerent");
}else{
System.out.println("same");
}
你能让我知道训练失败的原因吗?装置
答案 0 :(得分:5)
培训损失是培训数据的损失。 Loss是一个函数,它接收正确的输出和模型输出并计算它们之间的误差。然后使用损失来根据错误的大小以及最有助于它的元素来调整权重。