编译模型时,将参数丢失传递给编译函数.例如:
model.compile(loss ='mean_squared_error',optimizer ='adam')但是我很好奇Keras是否有办法通过我自己的成本函数?
我正在尝试在 mac os 上的虚拟环境中安装 zipline。
Python 版本 = 3.6 / numpy、预装 cython
当我尝试pip install zipline
虚拟环境时,出现以下错误。(控制台上打印出很多警告,但我认为下面的警告是我的问题的关键)
1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
----------------------------------------
Failed building wheel for bcolz
Run Code Online (Sandbox Code Playgroud)
我尝试安装 bcolz,但似乎没有解决问题。我很感激解决方案。
提前致谢!
编辑 :
错误代码太长,超出了控制台范围。这是最后几行的一些错误。
31 warnings generated.
In file included from bcolz/carray_ext.c:242:
In file included from /Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18:
In file included from /Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:
/Users/choehyeong-gyu/PycharmProjects/CubicHill/venv/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] …
Run Code Online (Sandbox Code Playgroud) 我在Anaconda上运行python 3.6.1。每当我尝试与seaborn密谋时,都会收到以下警告。
C:\Anaconda3\lib\site-packages\seaborn\categorical.py:1428: FutureWarning: remove_na is deprecated and is a private function. Do not use.
stat_data = remove_na(group_data)
Run Code Online (Sandbox Code Playgroud)
即使我尝试下面页面上发布的barplot示例,https: //seaborn.pydata.org/genic/seaborn.barplot.html
我仍然得到相同的结果。
提前致谢。
我简化了代码。但是结果也一样
[这与https://seaborn.pydata.org/genic/seaborn.barplot.html中的代码相同]
import seaborn as sns
sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
sns.barplot(x="day", y="total_bill", data=tips)
Run Code Online (Sandbox Code Playgroud)