• 大小: 44KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-02
  • 语言: 其他
  • 标签: compact  bili  改进版  

资源简介

compact bilinear pooling(tensorflow版本),可用于细粒度分类,特征融合

资源截图

代码片段和文件信息

from __future__ import absolute_import division print_function

import numpy as np
import tensorflow as tf

from sequential_fft import sequential_batch_fft sequential_batch_ifft

def _fft(bottom sequential compute_size):
    if sequential:
        return sequential_batch_fft(bottom compute_size)
    else:
        return tf.fft(bottom)

def _ifft(bottom sequential compute_size):
    if sequential:
        return sequential_batch_ifft(bottom compute_size)
    else:
        return tf.ifft(bottom)

def _generate_sketch_matrix(rand_h rand_s output_dim):
    “““
    Return a sparse matrix used for tensor sketch operation in compact bilinear
    pooling

    Args:
        rand_h: an 1D numpy array containing indices in interval ‘[0 output_dim)‘.
        rand_s: an 1D numpy array of 1 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\
     文件           6  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\.gitignore
     文件        1359  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\LICENSE.txt
     文件        4336  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\README.md
     文件        6856  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\compact_bilinear_pooling.py
     文件        3295  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\compact_bilinear_pooling_test.py
     目录           0  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\sequential_fft\
     文件          82  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\sequential_fft\__init__.py
     目录           0  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\sequential_fft\build\
     文件      113054  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\sequential_fft\build\sequential_batch_fft.so
     文件         461  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\sequential_fft\compile.sh
     文件        3529  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\sequential_fft\sequential_batch_fft.cc
     文件        5375  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\sequential_fft\sequential_batch_fft_kernel.cu.cc
     文件        1700  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\sequential_fft\sequential_batch_fft_ops.py
     文件        5280  2017-03-22 05:15  tensorflow_compact_bilinear_pooling-master\sequential_fft\sequential_batch_fft_test.py

评论

共有 条评论