目前,我可以在 1 台 PC 上的 2 个单独的 Excel 实例中同时运行 2 个 Excel VBA 进程。
我的目标是每分钟将数据从 Excel 实例 2 导入到 Excel 实例 1。
不幸的是,无法从 Excel 实例 1 中的工作簿连接到 Excel 实例 2 中打开的工作簿。
由于我可以连接到已保存的工作簿,因此解决方案可能是每分钟将工作簿保存在实例 2 中,并从已保存的工作簿中检索新数据。
虽然这是一个相当沉重的方法。是否有更好的解决方案来连接到另一个 Excel 实例中的另一个打开的工作簿?
(在同一个实例中打开工作簿不是解决方案,因为在这种情况下我不能再同时运行 2 个 VBA 进程。)
如果我运行此代码来使用 Knit 训练 GBM 模型,我会收到几页 Iter 输出,如下所示。有没有办法抑制这个输出?
mod_gbm <- train(classe ~ ., data = TrainSet, method = "gbm")
## Iter TrainDeviance ValidDeviance StepSize Improve
## 1 1.6094 nan 0.1000 0.1322
## 2 1.5210 nan 0.1000 0.0936
## 3 1.4608 nan 0.1000 0.0672
## 4 1.4165 nan 0.1000 0.0561
## 5 1.3793 nan 0.1000 0.0441
Run Code Online (Sandbox Code Playgroud)
谢谢你!
我在 GPU 上使用 R 和 Keras 以及 Tensorflow 2.0。
将第二个显示器连接到我的 GPU 后,我在深度学习脚本期间收到此错误:
我的结论是 GPU 内存不足,解决方案似乎是以下代码:
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto()
config.gpu_options.allow_growth = True # dynamically grow the memory used on the GPU
config.log_device_placement = True # to log device placement (on which device the operation ran)
# (nothing gets printed in Jupyter, only if you run it standalone)
sess = tf.Session(config=config)
set_session(sess) # set this TensorFlow session as the default session for Keras
Run Code Online (Sandbox Code Playgroud)
根据这篇文章: …