我需要通过控制器中的代码关闭当前的fxml窗口
我知道stage.close()或stage.hide()在fx中执行此操作
如何在fxml中实现这个?我试过了
private void on_btnClose_clicked(ActionEvent actionEvent) {
Parent root = FXMLLoader.load(getClass().getResource("currentWindow.fxml"));
Scene scene = new Scene(root);
Stage stage = new Stage();
stage.setScene(scene);
stage.show();
}
Run Code Online (Sandbox Code Playgroud)
但它不起作用!
所有帮助将不胜感激.谢谢!
我正在尝试按照这些说明从现有检查点训练模型 .
我已使用faster_rcnn_resnet101_voc07.config配置配置了对象检测培训管道.
在检查点部分,我已经设置了预定义模型的检查点文件所在的目录fast_rcnn_resnet101_coco.tar.gz
根据这个问题,fine_tune_checkpoint可以是包含三个文件的目录的路径:(.data-00000-of-00001,.index,.meta).
所以我设置了目录" / home/docs/car_dataset/models/model/train " 的路径
gradient_clipping_by_norm: 10.0
fine_tune_checkpoint: "/home/docs/car_dataset/models/model/train"
from_detection_checkpoint: true
num_steps: 800000
data_augmentation_options {
random_horizontal_flip {
}
}
Run Code Online (Sandbox Code Playgroud)
但是当我执行训练脚本时:
python object_detection/train.py --logtostderr\
--pipeline_config_path=/home/docs/car_dataset/models/model/faster_rcnn_resnet101_voc07.config\
--train_dir=/home/docs/car_dataset/models/model/train\
--num_gpus=2
Run Code Online (Sandbox Code Playgroud)
我收到了错误:
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file /home/docs/car_dataset/models/model/train: Failed precondition: /home/docs/car_dataset/models/model/train: perhaps your file is in a different file format and you need to use a different restore operator?
Run Code Online (Sandbox Code Playgroud)
我也尝试过设置目录中每个文件的路径
fine_tune_checkpoint: "/home/docs/car_dataset/models/model/train/model.ckpt.meta"
Run Code Online (Sandbox Code Playgroud)
但我得到错误:
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table …
Run Code Online (Sandbox Code Playgroud)