learn
spicy strip
这个作者很懒,什么都没留下…
展开
-
module ‘tensorflow.compat.v1‘ has no attribute ‘contrib‘
-initializer = tf.contrib.layers.xavier_initializer(seed=1)import tensorflow.compat.v1 as tftf.disable_v2_behavior()initializer = tf.truncated_normal_initializer(stddev=0.1)原创 2021-04-13 15:04:02 · 416 阅读 · 0 评论 -
运行neural_graph_collaborative_filtering各种报错
1. AttributeError: module ‘tensorflow‘ has no attribute ‘sparse_tensor_dense_matmul‘Tensorflow2 已经没有 tf.sparse_tensor_dense_matmul(),变成tf.sparse.sparse_dense_matmul(st,dt)tf.sparse.sparse_dense_matmul(A_fold_hat[f], ego_embeddings)2. AttributeError: mo原创 2021-04-12 11:13:12 · 453 阅读 · 1 评论 -
Neural Collaborative Filtering
论文 https://arxiv.org/pdf/1708.05031.pdf项目环境配置系统:Windows 10显卡:GeForce 930mPython版本:python 3.7Tensorflow:2.2.0Keras:2.2.0数据集天池比赛处理后的数据集,包含Train.json和Test.json。Train.json(训练集):三个字段,分别为“user_id”、“click_article_id”以及“ratings”。Test.json(测试集):两个字段,分别原创 2021-04-12 11:12:20 · 173 阅读 · 0 评论 -
keras使用Merge报错解决
keras使用Merge报错在使用新版的高于2.1.6的keras使用merge函数可能会报错:TypeError: 'module' object is not callable。此时有两个办法可以解决。解决Keras使用Merge报错mode:合并模式,如果为字符串,则为下列值之一{“sum”,“mul”,“concat”,“ave”,“cos”,“dot”}以mul为例,其现在改为Multiply,例如mf_vector = Multiply()([mf_user_latent, mf_i原创 2021-04-05 20:11:55 · 1286 阅读 · 0 评论 -
no module name merge
在学习使用keras.layers的merge函数时(merge7 = merge([conv3,up7], mode = ‘concat’, concat_axis = 3)),报错了,原因是被废弃了,可以改成导入from keras.layers import concatenate,merge7 = concatenate([conv3, up7], axis=3)。同样,其他merge9也是参照以上方法更改。...原创 2020-11-29 16:00:51 · 650 阅读 · 0 评论 -
在使用tensorflow时报错——no kernel image is available for execution on the device
no kernel image is available for execution on the device使用tensorflow时候,报了一个错误“no kernel image is available for execution on the device”,那么这个是由于GPU算力不足导致的,可以尝试安装低版本的cuda和低版本的tensorfolw。例如我的显卡是930.我安装的cuda是8.0,然后tensorflow是1.15.使用语句pip install tensorflow=原创 2020-11-29 15:54:36 · 1067 阅读 · 0 评论 -
python 修改照片分辨率
#coding=utf-8import os #打开文件时需要from PIL import Imageimport reimport numpy as npfrom PIL import ImageStart_path='G:\\datathree\\'list=os.listdir(Start_path)count=0for pic in list: path...原创 2019-06-12 18:59:41 · 1203 阅读 · 0 评论 -
PYTHON图片转成视频
import cv2import osfps = 30fourcc = cv2.VideoWriter_fourcc('M', 'J', 'P', 'G')video_writer = cv2.VideoWriter(filename='C://Users//57296//Desktop//3.avi', fourcc=fourcc, fps=fps, frameSize=(480, ...原创 2019-06-12 18:58:30 · 2134 阅读 · 3 评论 -
Python word转PDF
from win32com.client import Dispatchfrom os import walkwdFormatPDF = 17def doc2pdf(input_file): word = Dispatch('Word.Application') doc = word.Documents.Open(input_file) doc.SaveAs(i...原创 2019-06-12 18:56:58 · 4010 阅读 · 0 评论 -
MFC浏览器
使用微软的active控件底下的Web brower,实现浏览器。功能有历史记录,刷新,前进,后退,主页,搜索框原创 2019-06-12 18:48:55 · 356 阅读 · 0 评论 -
基于java的tcp/IP聊天
数据库用了mysql,Java+swing。可实现文件传输,即时聊天,单独聊天,离线消息。原创 2019-06-12 18:46:12 · 222 阅读 · 0 评论 -
windows Anaconda3进行pip出错
pip提示ssl错误pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.Could not fetch URL https:*******: There was a problem confirming the ssl certifica...原创 2019-05-16 20:23:25 · 744 阅读 · 0 评论 -
使用Fiddler进行手机抓包
首先下载Fiddler百度网盘提取码:mrin安装完成后打开Fiddler进行配置在主菜单栏 Tools->Options进行配置先在HTTPS进行操作然后在Connections进行操作,8888为端口号接下来点击OK,关闭Fiddler使得配置生效重新打开Fiddler后在Fiddler右上方,有Online这一按钮,点击一下可以出现你的ip,例如下方ip为10.2...原创 2019-04-11 12:57:27 · 591 阅读 · 0 评论