You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

RandomizedSearchCV.fit输出KerasRegressor、rv_frozen对象是什么含义?

输出含义说明

1. Jupyter Notebook 中的 RandomizedSearchCV 输出

你在Jupyter中调用fit方法后看到的这段输出是RandomizedSearchCV类实例的默认结构化展示内容,仅用于呈现你配置的搜索参数:包括3折交叉验证、待优化的Keras回归器、超参数搜索范围等,属于完全正常的信息输出,不是错误。如果不想展示该输出,只需在fit语句末尾添加分号;即可。

你看到的输出内容:

RandomizedSearchCV(cv=3,
estimator=<tensorflow.python.keras.wrappers.scikit_learn.KerasRegressor
object at 0x7f466c02fe20>,
param_distributions={'learning_rate': <scipy.stats._distn_infrastructure.rv_frozen object at
0x7f46ed175580>,
'n_hidden': [0, 1, 2, 3],
'n_neurons': array([ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,
...99])})

2. 终端运行得到的 TensorFlow 日志输出

你重定向到trace.txt的所有内容都是TensorFlow的INFO(信息)级别日志(日志开头的I就是INFO的标识,错误为E、警告为W),全部属于正常运行提示,不是错误,无需修复。
各条日志的具体含义:

  • Not creating XLA devices, tf_xla_enable_xla_devices not set:未开启XLA(加速线性代数)编译优化,TensorFlow默认不启用该功能,不影响正常训练推理
  • This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA...:你安装的预编译版本TensorFlow已经适配了你CPU的高级指令集,在核心运算中会自动调用加速,仅提示如果要在全运算链路启用需要自行源码编译TensorFlow,普通使用无需处理
  • Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.:TensorFlow使用默认配置创建了算子调度线程池,仅提示可调整线程数参数优化性能,无特殊需求不用修改
  • None of the MLIR optimization passes are enabled (registered 2):MLIR中间表示优化模块默认未启用,不影响正常运行
  • CPU Frequency: 1190400000 Hz:TensorFlow检测到的CPU主频信息,纯运行提示
    如果不想看到这类INFO级别的日志,可在代码最开头、导入TensorFlow之前添加如下配置:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

该配置会屏蔽INFO、WARNING级别的日志,仅打印错误信息。

内容的提问来源于stack exchange,提问作者goahead97

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.27 08:06:04