我尝试参加我的第一次Kaggle比赛,RMSLE作为所需的损失函数.因为我没有发现如何实现这个loss function我试图解决的问题RMSE.我知道这是Keras过去的一部分,有没有办法在最新版本中使用它,也许通过自定义功能backend?
这是我设计的NN:
from keras.models import Sequential
from keras.layers.core import Dense , Dropout
from keras import regularizers
model = Sequential()
model.add(Dense(units = 128, kernel_initializer = "uniform", activation = "relu", input_dim = 28,activity_regularizer = regularizers.l2(0.01)))
model.add(Dropout(rate = 0.2))
model.add(Dense(units = 128, kernel_initializer = "uniform", activation = "relu"))
model.add(Dropout(rate = 0.2))
model.add(Dense(units = 1, kernel_initializer = "uniform", activation = "relu"))
model.compile(optimizer = "rmsprop", loss = "root_mean_squared_error")#, metrics =["accuracy"])
model.fit(train_set, label_log, batch_size = …Run Code Online (Sandbox Code Playgroud) 我在 Python 3.6 中有许多大型深度学习任务,我想从源代码构建 tensorflow(仅限 CPU),因为我的 MacBook Pro with Touchbar 13" 指出,如果使用 SSE4.1 SSE4.2 AVX AVX2 构建,tensorflow 会运行得更快和 FMA 支持。有关该主题的 StackOverflow 和 GitHub 上有很多问题,我都阅读了它们。没有一个解决为什么它对我不起作用。
我严格按照https://www.tensorflow.org/install/install_sources提供的说明进行操作
我的配置看起来像这样
./configure
Please specify the location of python. [Default is /anaconda/bin/python]: /anaconda/python.app/Contents/MacOS/python
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]:
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] n
No Google Cloud Platform support will be enabled for TensorFlow
Do …Run Code Online (Sandbox Code Playgroud)