zoukankan      html  css  js  c++  java
  • 拾遗

    一、钉钉文件小助手,2020 年 6 月 3 日 16:23

    build_main_part() 用于构建出静态图 (Variable及Operation), 并在训练过程中不变;
    session.run() 一次每个batch跑一个step,run 里面的参数才会参与计算与更新,一般只需要填 train_op 与 loss;
    需要在 tf.summary.scalar 中画图的一定要作为 run 的参数;
    optimizer.apply_gradients() 与 minimize() 内部 global step都会自增1;

    二、钉钉文件小助手,2020 年 5 月 19 日 10:50

    定积分 → 黎曼可积 → 任意分割区间任意取值 → 上下限互换 →(or Newton-Leibniz formula)→ 定积分值相反。

    三、钉钉文件小助手,2020 年 3 月 5 日 16:47

    foobar2k for mac:无暗黑模式,功能过于单一甚至残废,竟然将我辛苦下的Jay的歌识别成日文版的,且无歌词。弃。

    网易云音乐 for mac:出乎意料的精炼小巧,皮肤倒是很容易换,但竟然“高尚”地无法导入本地音乐文件夹,单独打开一首歌可爱女人也识别成了日文版。虽有歌词,且能匹配iTunes。弃。留着听许嵩吧。

    iTunes:导入整张专辑挺方便,但不喜欢官方,不能播放flac文件。弃。

    几乎折腾了一天从百度云下载的Jay的歌利用U盘转运至MBA,最后还是删了。用另听吧。
    另:bilibili或者YouTube上Jay的专辑MV或歌曲合集。

    四、钉钉文件小助手,2019年12月20日 11:23

    sublime text → pycharm → vscode
    sublime text 3弃坑原因:Jedi插件跳转定义失效(同时代码提示太卡),全局搜索鸡肋,git push需要命令行
    pycharm弃坑原因:太重
    vscode 优点:能同时写LaTeX,装了Mariana Pro主题,file specific 2/4 spaces,obvious code changes,but no multi-row tabs,全局搜索稍微不太习惯

    后续 2019年12月23日 14:24 补充:

    sublime text3:安装插件需要翻墙;vscode:补全和跳转竟然也是依赖Jedi。

    五、KDD paper auxiliary loss:

     1 def loss_op(self):
     2         super(Base_Two_Tower_Hete_Graph_Text, self).loss_op()
     3         with tf.name_scope("{}_Loss_Op".format(self.name)):
     4             if self.training_config.use_neigh_hinge_loss:
     5                 margin = 0.2
     6                 alpha = 0.1
     7                 logging.info('calculate neighbor proximity hinge loss, margin = {}, alpha = {}'.format(margin, alpha))
     8 
     9                 for i in [self.query_self_and_neigh_emb, self.shop_self_and_neigh_emb]:
    10                     self.dis = tf.matmul(i[0], tf.transpose(i[1]))
    11                     self.positive_distance = tf.reshape(tf.diag_part(self.dis), [self.config.batch_size, 1])
    12                     self.term1 = term1 = tf.reduce_mean(
    13                         tf.maximum(0., - self.positive_distance + (self.dis + margin * tf.eye(self.config.batch_size)) + margin))
    14                     self.loss = self.loss + alpha * term1
    15 
    16             elif self.training_config.use_neigh_nce_loss:
    17                 alpha = 1
    18                 neighbor_cnt = self.training_config.igraph_neighbor_cnt
    19                 logging.info('calculate neighbor proximity NCE loss, alpha = {}'.format(alpha))
    20 
    21                 for self_and_neigh_emb in [self.query_self_and_neigh_emb, self.shop_self_and_neigh_emb]:
    22                     temp0 = tf.split(self_and_neigh_emb, neighbor_cnt * 2 + 1, axis=1)
    23                     self.term = 0.0
    24                     for i in range(neighbor_cnt):
    25                         self.dis = tf.matmul(temp0[0], tf.transpose(temp0[i+1]))
    26                         self.positive_distance = tf.reshape(tf.diag_part(self.dis), [self.config.batch_size, 1])
    27                         self.negtive_distance = self.dis - (self.positive_distance * tf.eye(self.config.batch_size))
    28                         term = tf.reduce_mean(-tf.log(tf.sigmoid(self.positive_distance)+1e-24) -
    29                                                     tf.reduce_mean(tf.log(1 - tf.sigmoid(self.negtive_distance)+1e-24), axis=1, keep_dims=True))
    30                         self.term += term
    31                     self.loss = self.loss + alpha * self.term / neighbor_cnt
    32             else:
    33                 self.loss = self.loss + 0.0
    View Code

    六、meta learning papers:

    七:some public materials:

    www2020-DTL-Tutorial-LinkedIn.pptx
    2019-Intelligent Feed Recommendation-TangJie.pptx
    Deep Semantic Matching in Amazon Product Search-YiweiSong.pdf
    DeepGCNs.pptx
    Future of Personalized Recommendation Systems_xiexing.pdf
    KDD17-metapath2vec.pdf
    Neural Architecture Search and Beyond_Barret Zoph_Google.pdf
    tianshou_n+e_thu.pdf

    八、currently reading papers:

    九、currently reading repositories:

    十、VScode settings json

     1 {
     2     "files.autoSave": "off",
     3     "latex-workshop.message.update.show": false,
     4     "latex-workshop.view.pdf.viewer": "tab",
     5     "latex-workshop.message.badbox.show": false,
     6     "latex-workshop.latex.tools": [
     7         {
     8             // 编译工具和命令
     9             "name": "xelatex",
    10             "command": "xelatex",
    11             "args": [
    12                 "-synctex=1",
    13                 "-interaction=nonstopmode",
    14                 "-file-line-error",
    15                 "-pdf",
    16                 "%DOCFILE%"
    17             ]
    18         },
    19         {
    20             "name": "pdflatex",
    21             "command": "pdflatex",
    22             "args": [
    23                 "-synctex=1",
    24                 "-interaction=nonstopmode",
    25                 "-file-line-error",
    26                 "%DOCFILE%"
    27             ]
    28         },
    29         {
    30             "name": "bibtex",
    31             "command": "bibtex",
    32             "args": [
    33                 "%DOCFILE%"
    34             ]
    35         }
    36     ],
    37     "latex-workshop.latex.recipes": [
    38         {
    39             "name": "xelatex",
    40             "tools": [
    41                 "xelatex"
    42             ]
    43         },
    44         {
    45             "name": "pdflatex",
    46             "tools": [
    47                 "pdflatex"
    48             ]
    49         },
    50         {
    51             "name": "xe->bib->xe->xe",
    52             "tools": [
    53                 "xelatex",
    54                 "bibtex",
    55                 "xelatex",
    56                 "xelatex"
    57             ]
    58         },
    59         {
    60             "name": "pdf->bib->pdf->pdf",
    61             "tools": [
    62                 "pdflatex",
    63                 "bibtex",
    64                 "pdflatex",
    65                 "pdflatex"
    66             ]
    67         }
    68     ],
    69     "editor.fontSize": 14,
    70     "editor.codeLens": true,
    71     "terminal.integrated.inheritEnv": false,
    72     "[python]": {
    73         
    74     },
    75     "python.linting.enabled": false,
    76     "workbench.colorTheme": "Mariana Pro (Warm)",
    77     "editor.wordWrap": "on",
    78     "workbench.editor.enablePreview": false,
    79     "breadcrumbs.enabled": true,
    80     "workbench.activityBar.visible": true,
    81     "workbench.list.horizontalScrolling": true,
    82     "editor.minimap.enabled": false,
    83     "git.enableSmartCommit": true,
    84     "git.confirmSync": false,
    85     "update.mode": "manual",
    86     "explorer.confirmDelete": false,
    87     "extensions.autoUpdate": false,
    88     "extensions.ignoreRecommendations": false,
    89     "window.zoomLevel": 0,
    90     "workbench.statusBar.visible": true
    91 }
    View Code
  • 相关阅读:
    luogu3810 【模板】三维偏序(陌上花开)
    POJ 1704 Georgia and Bob(阶梯博弈)
    URAL 1004 Sightseeing Trip(floyd求最小环+路径输出)
    BZOJ 1064: [Noi2008]假面舞会(dfs + 图论好题!)
    Codeforces Round #332 (Div. 2) D. Spongebob and Squares(枚举)
    HDU 4313 Matrix(并查集)
    HDU 4312 Meeting point-2(切比雪夫距离转曼哈顿距离)
    HDU 4311 Meeting point-1(曼哈顿距离最小)
    HDU 4309 Seikimatsu Occult Tonneru(最大流+二进制枚举)
    HDU 4303 Hourai Jeweled(树形DP)
  • 原文地址:https://www.cnblogs.com/niuxichuan/p/14097366.html
Copyright © 2011-2022 走看看