当我拖动项目时,如何使用JavaFX在macOS上更改光标?
我尝试使用函数model.save('my_model.h5')
来更改光标,但是当我拖动一个项目时,会在光标后面看到白皮书。
new_model = models.Sequential()
new_model.add(...) # Some layers
# Here you add the model you previously trained
# In case you need to use another head, use model.layers[-1].output
convnet = KerasModel(inputs=model.inputs, outputs=model.output)
convnet.set_weights(WEIGHTS_FILE) # The path to the file where you saved your model
convnet.trainable = False # Lock in its weights
new_model.add(convnet)
# Add a new head if you got rid of it
示例:
使用自定义光标拖放:
我试图在Ubuntu 19和Windows 10上运行代码,但是这个问题不存在。