- 博客(18)
- 资源 (385)
- 问答 (103)
- 收藏
- 关注
原创 seq2seq attention代码实现 / attention_decoder使用
from tensorflow.contrib.legacy_seq2seq.python.ops import seq2seq as seq2seq_lib # padding的是0 self.sequence_len = tf.reduce_sum(tf.sign(self.inputs), reduction_indices=1) ...
2019-01-31 12:05:20 1120
原创 python numpy 判断两个数组完全相等
import numpy as npa = np.array([1,2,3])b = np.array([1,2,3])print((a==b).all())a = np.array([3,2,1])b = np.array([1,2,3])print((a==b).all())
2019-01-25 17:21:29 47699
原创 tensorflow 得到RNN的最后一个 非padding 的 hidden state
def collect_final_step_of_lstm(lstm_representation, lengths): # lstm_representation: [batch_size, passsage_length, dim] # lengths: [batch_size] lengths = tf.maximum(lengths, tf.zeros_like(...
2019-01-21 18:06:35 734 1
原创 一个小程序判断tensorflow模型是否restore成功
import tensorflow as tfimport osckpt_dir = "./model/"if os.path.exists(ckpt_dir): epoch = tf.Variable(0, name='epoch', trainable=False)else: epoch = tf.Variable(1, name='epoch', trainabl...
2019-01-17 19:42:05 837
原创 一些attention的tensorflow实现 和使用方法
https://github.com/allenai/document-qa/blob/master/docqa/nn/attention.py
2019-01-16 16:24:48 4547
原创 relative position embedding 相关论文和代码
https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/layers/common_attention.py论文:Self-Attention with Relative Position RepresentationsMUSIC TRANSFORMER: GENERATING MUSIC WITH LO...
2019-01-16 12:04:48 1831
原创 一组向量 和 一组向量 的attention计算,pytorch实现
class GetAttentionHiddens(nn.Module): def __init__(self, input_size, attention_hidden_size, similarity_attention = False): super(GetAttentionHiddens, self).__init__() self.scoring ...
2019-01-16 10:29:58 1025
原创 一个向量 和 一组向量 的attention计算, pytorch实现
class BilinearSeqAttn(nn.Module): """A bilinear attention layer over a sequence X w.r.t y: * o_i = x_i'Wy for x_i in X. """ def __init__(self, x_size, y_size, opt, identity=False): ..
2019-01-16 10:07:44 1345
原创 pointer network 的pytorch实现
class GetSpanStartEnd(nn.Module): # supports MLP attention and GRU for pointer network updating def __init__(self, x_size, h_size, opt, do_indep_attn=True, attn_type="Bilinear", do_ptr_update=...
2019-01-16 09:58:13 2429
原创 linear self attention 的pytorch实现 和使用
# For summarizing a set of vectors into a single vectorclass LinearSelfAttn(nn.Module): """Self attention over a sequence: * o_i = softmax(Wx_i) for x_i in X. """ def __init__(self, i...
2019-01-16 09:46:29 4154
原创 深度学习+推荐系统 初步理解
给定user_id和item_id和user对item的score训练,user_id1, item_id1, score1user_id1, item_id2, score2user_id2, item_id1, score3...预测给定user_id和item_id时的score,然后排序。最简单的就是把user_id和item_id进行embedding,然后点乘。...
2019-01-16 09:17:47 474
原创 AUC 会随1/0 label数比例而变
import numpy as npfrom sklearn import metricsy_true = np.array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])y_scores = np.array([0.1, 0.1,0.1,0.1,0.1,0.1, 0.1, 0.1, 0.1, 0.9, 0.9])print(metrics.roc_auc_scor...
2019-01-11 11:40:53 414
原创 numpy,True/False转1/0,bool转int,float转bool,float转int1/0
import numpy as npa = np.array([0.5,0.4,0.6])print((a>0.5).astype(int))
2019-01-11 11:17:38 12686 7
原创 lucene 7 删除索引 实例
import org.apache.lucene.analysis.standard.StandardAnalyzer;import org.apache.lucene.document.Document;import org.apache.lucene.document.Field;import org.apache.lucene.document.TextField;import or...
2019-01-06 09:13:31 648 1
转载 劳逆讲Neural Symbolic Machines的视频,以及他的其他工作
Neural Symbolic Machines: Learning Semantic Parsers on Freebase with Weak Supervision以及Memory Augmented Policy Optimization for Program Synthesis with Generalizationhttps://www.bilibili.com/video/a...
2019-01-04 14:36:00 761
huggingface.co/Salesforce/blip-image-captioning-base
2024-08-22
Qwen2-7B 的 model-00004-of-00004.safetensors 的2/2
2024-07-29
Qwen2-7B 的 model-00004-of-00004.safetensors 的1/2
2024-07-29
Qwen2-7B 的 model-00003-of-00004.safetensors 的2/2
2024-07-29
Qwen2-7B 的 model-00003-of-00004.safetensors 的1/2
2024-07-29
Qwen2-7B 的 model-00002-of-00004.safetensors 的2/2
2024-07-28
Qwen2-7B 的 model-00002-of-00004.safetensors 的1/2
2024-07-28
Qwen2-7B 的 model-00001-of-00004.safetensors 的2/2
2024-07-28
Qwen2-7B 的 model-00001-of-00004.safetensors 的1/2
2024-07-28
Qwen2-7B-Instruct 的 model-00004-of-00004.safetensors 的2/2
2024-07-26
Qwen2-7B-Instruct 的 model-00004-of-00004.safetensors 的1/2
2024-07-26
Qwen2-7B-Instruct 的 model-00003-of-00004.safetensors 的2/2
2024-07-26
Qwen2-7B-Instruct 的 model-00003-of-00004.safetensors 的1/2
2024-07-26
Qwen2-7B-Instruct 的 model-00002-of-00004.safetensors 的2/2
2024-07-26
Qwen2-7B-Instruct 的 model-00002-of-00004.safetensors 的1/2
2024-07-26
Qwen2-7B-Instruct 的 model-00001-of-00004.safetensors 的2/2
2024-07-25
Qwen2-7B-Instruct 的 model-00001-of-00004.safetensors 的1/2
2024-07-25
torch-2.3.0+cu118-cp38-cp38-linux-x86-64.whl
2024-06-24
meta-llama-3-8b-instruct 的 model-00004-of-00004.safetensors
2024-05-29
meta-llama-3-8b-instruct 的 model-00003-of-00004.safetensors 的3/3
2024-05-29
meta-llama-3-8b-instruct 的 model-00003-of-00004.safetensors 的2/3
2024-05-29
meta-llama-3-8b-instruct 的 model-00003-of-00004.safetensors 的1/3
2024-05-29
meta-llama-3-8b-instruct 的 model-00002-of-00004.safetensors 的3/3
2024-05-29
meta-llama-3-8b-instruct 的 model-00002-of-00004.safetensors 的2/3
2024-05-29
meta-llama-3-8b-instruct 的 model-00002-of-00004.safetensors 的1/3
2024-05-29
meta-llama-3-8b-instruct 的 model-00001-of-00004.safetensors 的3/3
2024-05-29
meta-llama-3-8b-instruct 的 model-00001-of-00004.safetensors 的2/3
2024-05-29
meta-llama-3-8b-instruct 的 model-00001-of-00004.safetensors 的1/3
2024-05-29
huggingface的bert-base-chinese
2024-03-05
huggingface的bert-base-uncased
2024-03-03
自动驾驶,如何得到方向盘转动的ground truth?
2024-03-18
AlphaGo能超越人类,因为训练时 对于模型的每个输入,都有一个100%正确的答案?
2024-01-16
其实LLM/ChatGPT是否在距离AlphaGo式AI越来越远?
2024-01-16
技术上,ChatGPT要成为 AI医生/AI律师/AI教师 还欠缺哪些能力?
2024-01-11
数学 是且仅是 一种语言和一种工具,不是科学的全部?
2023-12-14
哪些时候用CUDA编程更好?
2023-12-14
用RL做NLP,和 根据那条数据的reward重新标注那条数据 有什么区别?
2022-05-07
没有物理机器人载体,如何在模拟环境里的进行学习和研究机器人?
2022-04-28
2022年了,USB式GPU有哪些进展?
2022-04-28
2022年了,有哪些稳压deepfm的CTR模型?
2022-04-01
CTR模型,如果上线了没效果,这时可以进行哪些分析工作?以及有无必要投入大量时间分析?
2022-03-24
算法工程师如何应对做算法策略的不确定性;比如没效果,这时绩效怎么保证?
2022-03-01
CTR模型必须要有一个测试数据集吗? 训练数据集和测试数据集是同一个,可以吗?
2022-02-25
为啥我感觉现在机器学习模型就是一种模糊匹配工具or相似识别工具?
2022-02-16
因果推断技术靠谱吗,感觉里面的影响因素太多了,所以能实际解决落地问题吗?
2022-02-08
XGB/GBDT/决策树,得出特征重要性的原理是什么?
2022-02-08
强化学习是不是无人驾驶的未来?
2022-02-01
GAN生成图像,弄一个discriminator ,和无D直接生成,区别是?
2022-02-01
哪些互联网公司的管理职级和专业职级是分开的?
2022-01-22
CTR模型的AUC如果比较高,是否其实只是 因为复购行为带来的AUC虚高?
2022-01-17
CTR模型的本质是不是算出 user的哪些特征和item的哪些特征 最匹配?
2022-01-08
人工智能的因果学习(Causal Learning)到底想解决什么问题?
2021-12-17
BYOL里stop-gradient的作用是什么?
2021-12-01
马上2022年了,强化学习+NLP 有了哪些突破?
2021-11-26
马上2022年了,pointer-network现在看来的作用是什么?
2021-11-26
总被主管说文档写的不好怎么办?
2021-11-18
NER任务只有一个类的情况下,BME或者Yes-No的数据预处理方式对结果有影响吗?
2021-11-08
学好数学对于编程的真实增益的性价比到底如何?
2021-11-03
学好数学对于编程的真实增益到底是多少?
2021-11-03
如果说每一个数学公式都在描述一件事情,那么数学公式的推导,是在做什么?
2021-10-26
每个物理公式是否都是在【描述】一个事情?
2021-10-12
求通俗讲讲数学或理论物理进行研究的细节,复杂公式是不是也都是由基础公式而来?
2021-09-14
TA创建的收藏夹 TA关注的收藏夹
TA关注的人