小编Jel*_* Wu的帖子

python3 识别 tensorflow,但不识别其任何属性

python3 无法识别任何 tensorflow 属性

AttributeError: 模块“tensorflow”没有属性“variable_scope”

AttributeError: 模块“tensorflow”没有属性“squared_difference”

已安装张量流

pip3 列表 | grep tensorflow tensorflow 2.0.0
tensorflow-estimator 2.0.1

attributeerror tensorflow

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

如何仅使用 numpy 和 PIL 检测图像翻译

给定两个图像,我需要检测两者之间是否存在平移偏移。我只能使用 numpy 和 PIL。

这篇文章展示了如何使用 PIL 应用 (x, y) 翻译,但尚未找到类似的内容来检测翻译。

根据我的阅读,互相关似乎是解决方案的一部分,并且有numpy.correlate函数。但是,我不知道如何使用该函数的输出来检测水平和垂直平移坐标。

第一张图片

第二张图片

python numpy image-processing python-imaging-library

3
推荐指数
1
解决办法
1660
查看次数

psql:错误:无法连接到服务器:致命:用户“postgres”的对等身份验证失败

我使用这里的命令安装并设置了 postgresql-12 [ https://www.postgresql.org/download/linux/redhat/]

yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install postgresql12
yum install postgresql12-server
/usr/pgsql-12/bin/postgresql-12-setup initdb
systemctl enable postgresql-12
systemctl start postgresql-12
Run Code Online (Sandbox Code Playgroud)

然后我尝试登录数据库

psql postgres postgres
Run Code Online (Sandbox Code Playgroud)

我得到了错误

psql: error: could not connect to server: FATAL:  Peer authentication failed for user "postgres"
Run Code Online (Sandbox Code Playgroud)

我的系统上有两个 pg_hba.conf 文件。我检查了身份验证设置,如下所示,按照这里的建议 [ psql: FATAL: Ident authentication failed for user "postgres"

/data/pg_data_dir/pg_hba.conf

# TYPE  DATABASE        USER            ADDRESS                 METHOD
host    all             all             0.0.0.0/0               md5

# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local …
Run Code Online (Sandbox Code Playgroud)

postgresql

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