小编Abd*_*mam的帖子

ValueError:模型未配置为计算准确度

使用此代码时,我从一些教程中得到了错误,指出模型未配置为计算准确度,我应该通过准确度,奇怪的是我已经通过了指标 = ['accuracy']

我已经搜索了很多,除了我的之外,我看到的所有代码都可以正常工作。

评估人工神经网络

from keras.wrappers.scikit_learn import KerasClassifier
from sklearn.model_selection import cross_val_score
from tensorflow.python.keras.models import Sequential #Used to initialize the NN
from tensorflow.python.keras.layers import Dense #Used to create the layers in the ANN

def build_classifier():
    classifier = Sequential()
    classifier.add(Dense(units = 6, kernel_initializer = 'uniform', activation = 'relu',input_dim = 11))
    classifier.add(Dense(units= 6, kernel_initializer = 'uniform', activation = 'relu'))
    classifier.add(Dense(units = 1, kernel_initializer = 'uniform', activation = 'sigmoid'))
    classifier.compile(optimizer='adam', loss='binary_crossentropy', metrics= ['accuracy'])
    return classifier
# Needs to be revised from evaluting …
Run Code Online (Sandbox Code Playgroud)

python scikit-learn keras tensorflow

6
推荐指数
1
解决办法
1988
查看次数

无法加载用于 LZ4 支持的 Python 扩展。LZ4 压缩将不可用

我是 ROS 的新手,我刚刚打开一个终端并输入了roscore另一个终端并输入rostopic node了这个错误,上面写着

无法加载用于 LZ4 支持的 Python 扩展。LZ4 压缩将不可用。

我搜索并转到https://pypi.org/project/lz4/#files并使用 lz4pip install lz4安装,安装后存在相同的错误,我该怎么办?

我在 ubuntu 16.04 上安装了 ros sudo apt-get install ros-kinetic-desktop-full

预期输出:/rosout /rosout_agg

实际输出:无法加载用于 LZ4 支持的 Python 扩展。LZ4 压缩将不可用。/rosout /rosout_agg

python ros lz4

5
推荐指数
1
解决办法
3410
查看次数

ORACLE SQL 中 NOT IN 与 NULL 值的困境

当我使用这段代码时

WHEN col1 NOT IN (SELECT col2 FROM table_name) THEN 'something'
Run Code Online (Sandbox Code Playgroud)

知道 col2 包含 NULL 值,它没有给出预期结果,为什么会发生这种情况?将 IN 与 NULL 值一起使用是否会扰乱内存中存储的数据还是什么?

sql oracle null sql-in

2
推荐指数
1
解决办法
5839
查看次数

二进制点的不同表示

我在 C 中有一个代码,它只是打印 hello world,就像这样

#include <stdio.h>

int main(void)
{
printf("Hello, world\n");
}
Run Code Online (Sandbox Code Playgroud)

为了在 ubuntu 中编译代码,我使用了命令 make filename,它给了我这样的汇编代码:

    .text
    .file   "hello.c"
    .globl  main
    .align  16, 0x90
    .type   main,@function
main:                                   # @main
    .cfi_startproc
# BB#0:
    pushq   %rbp
.Ltmp0:
    .cfi_def_cfa_offset 16
.Ltmp1:
    .cfi_offset %rbp, -16
    movq    %rsp, %rbp
.Ltmp2:
    .cfi_def_cfa_register %rbp
    subq    $16, %rsp
    movabsq $.L.str, %rdi
    movb    $0, %al
    callq   printf
    xorl    %ecx, %ecx
    movl    %eax, -4(%rbp)          # 4-byte Spill
    movl    %ecx, %eax
    addq    $16, %rsp
    popq    %rbp
    retq
.Lfunc_end0: …
Run Code Online (Sandbox Code Playgroud)

c assembly hexdump machine-language xxd

0
推荐指数
1
解决办法
45
查看次数

标签 统计

python ×2

assembly ×1

c ×1

hexdump ×1

keras ×1

lz4 ×1

machine-language ×1

null ×1

oracle ×1

ros ×1

scikit-learn ×1

sql ×1

sql-in ×1

tensorflow ×1

xxd ×1