repo stringlengths 1 152 ⌀ | file stringlengths 14 221 | code stringlengths 501 25k | file_length int64 501 25k | avg_line_length float64 20 99.5 | max_line_length int64 21 134 | extension_type stringclasses 2
values |
|---|---|---|---|---|---|---|
null | pytorch-main/caffe2/operators/im2col_op.h | #ifndef CAFFE2_OPERATORS_IM2COL_OP_H_
#define CAFFE2_OPERATORS_IM2COL_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <typename T, class Context>
class Im2ColOp final : pu... | 9,004 | 29.016667 | 78 | h |
null | pytorch-main/caffe2/operators/index_hash_ops.h | #ifndef CAFFE2_OPERATORS_INDEX_HASH_OPS_H_
#define CAFFE2_OPERATORS_INDEX_HASH_OPS_H_
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include <c10/util/irange.h>
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
C10_DECLARE_EXPORT_CAFFE2_OP_TO_C10(IndexHash);
namespace caffe2 {
template <class Co... | 2,268 | 27.3625 | 76 | h |
null | pytorch-main/caffe2/operators/index_ops.h | #ifndef CAFFE2_OPERATORS_INDEX_OPS_H_
#define CAFFE2_OPERATORS_INDEX_OPS_H_
#include <limits>
#include <mutex>
#include <sstream>
#include <unordered_map>
#include <vector>
#include "caffe2/core/blob_serialization.h"
#include "caffe2/core/operator.h"
#include "caffe2/core/tensor.h"
#include "c10/util/irange.h"
namesp... | 3,212 | 24.299213 | 71 | h |
null | pytorch-main/caffe2/operators/inference_lstm_op.h | #ifndef LSTM_OP_H_
#define LSTM_OP_H_
#include <algorithm>
#include <sstream>
#include <unordered_map>
#include <vector>
#include "caffe2/core/blob_serialization.h"
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include <c10/util/irange.h>
#include "caffe2/core/operator.h"
#include "caffe2/core/tensor.h"
#include "... | 9,923 | 30.807692 | 80 | h |
null | pytorch-main/caffe2/operators/instance_norm_op.h | #ifndef CAFFE2_OPERATORS_INSTANCE_NORM_OP_H_
#define CAFFE2_OPERATORS_INSTANCE_NORM_OP_H_
#include <array>
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class InstanceNormOp final : public Operator<Context> {... | 7,459 | 25.642857 | 80 | h |
null | pytorch-main/caffe2/operators/integral_image_op.h | #ifndef INTEGRAL_IMAGE_OP_H_
#define INTEGRAL_IMAGE_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class IntegralImageOp final : public Operator<Context> {
public:
temp... | 923 | 22.692308 | 64 | h |
null | pytorch-main/caffe2/operators/jsd_op.h | #ifndef CAFFE2_OPERATORS_JSD_OP_H_
#define CAFFE2_OPERATORS_JSD_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class BernoulliJSDOp final : public Operator<Context> {
pub... | 721 | 23.066667 | 63 | h |
null | pytorch-main/caffe2/operators/key_split_ops.h | #pragma once
#include <c10/util/irange.h>
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include <vector>
namespace caffe2 {
template <typename T, class Context>
class KeySplitOp : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_FUNCTIONS;
template <c... | 1,494 | 26.181818 | 76 | h |
null | pytorch-main/caffe2/operators/layer_norm_op.h | #ifndef CAFFE2_OPERATORS_LAYER_NORM_OP_H_
#define CAFFE2_OPERATORS_LAYER_NORM_OP_H_
#include <array>
#include <vector>
#include "caffe2/core/context.h"
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include "caffe2/core/operator.h"
#include "caffe2/core/types.h"
#include "caffe2/utils/math.h"
C10_DECLARE_EXPORT_C... | 8,012 | 26.441781 | 80 | h |
null | pytorch-main/caffe2/operators/leaky_relu_op.h | #pragma once
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
template <typename T, class Context>
class LeakyReluOp : public Operator<Context> {
public:
template <class... Args>
explicit LeakyReluOp(Args&&... args)
: Operator<Context>(... | 1,111 | 21.24 | 70 | h |
null | pytorch-main/caffe2/operators/length_split_op.h | #ifndef CAFFE2_OPERATORS_LENGTH_SPLIT_OP_H_
#define CAFFE2_OPERATORS_LENGTH_SPLIT_OP_H_
#include "caffe2/core/common_omp.h"
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <clas... | 2,313 | 29.051948 | 79 | h |
null | pytorch-main/caffe2/operators/lengths_pad_op.h | #ifndef CAFFE2_OPERATORS_LENGTHS_PAD_OP_H_
#define CAFFE2_OPERATORS_LENGTHS_PAD_OP_H_
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <class Context>
class LengthsPadOp : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_FUNCTIONS;
... | 2,607 | 27.977778 | 79 | h |
null | pytorch-main/caffe2/operators/lengths_reducer_fused_8bit_rowwise_ops.h | #ifndef CAFFE2_OPERATORS_LENGTHS_REDUCER_FUSED_8BIT_ROWWISE_OPS_H_
#define CAFFE2_OPERATORS_LENGTHS_REDUCER_FUSED_8BIT_ROWWISE_OPS_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/fused_rowwise_8bit_conversion_ops.h"
#include "caffe2/oper... | 5,540 | 29.278689 | 80 | h |
null | pytorch-main/caffe2/operators/lengths_reducer_fused_nbit_rowwise_ops.h | #ifndef CAFFE2_OPERATORS_LENGTHS_REDUCER_FUSED_NBIT_ROWWISE_OPS_H_
#define CAFFE2_OPERATORS_LENGTHS_REDUCER_FUSED_NBIT_ROWWISE_OPS_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/fused_rowwise_nbit_conversion_ops.h"
#include "caffe2/oper... | 23,598 | 33.451095 | 80 | h |
null | pytorch-main/caffe2/operators/lengths_reducer_ops.h | #pragma once
#include <c10/util/irange.h>
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/perfkernels/embedding_lookup.h"
#ifdef USE_FBGEMM
#include "fbgemm/Fbgemm.h"
#endif
#include <algorithm>
#include <functional>
namespace caffe2 {
// A templated class that implements SparseLe... | 23,499 | 31.369146 | 109 | h |
null | pytorch-main/caffe2/operators/lengths_reducer_rowwise_8bit_ops.h |
#ifndef CAFFE2_OPERATORS_LENGTHS_REDUCER_ROWWISE_8bits_OP_H_
#define CAFFE2_OPERATORS_LENGTHS_REDUCER_ROWWISE_8bits_OP_H_
// SparseLengthsSum8bits
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/reducer_functors.h"
#include "caffe2/perfker... | 6,137 | 32.358696 | 80 | h |
null | pytorch-main/caffe2/operators/lengths_top_k_op.h |
#ifndef CAFFE2_OPERATORS_LENGTHS_TOP_K_OP_H_
#define CAFFE2_OPERATORS_LENGTHS_TOP_K_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/conv_pool_op_base.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class C... | 1,358 | 24.166667 | 56 | h |
null | pytorch-main/caffe2/operators/listwise_l2r_op.h | // Copyright 2004-present Facebook. All Rights Reserved.
#pragma once
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class LambdaRankNdcgOp final : public Operator<Context> {
... | 1,677 | 25.21875 | 79 | h |
null | pytorch-main/caffe2/operators/load_save_op.h | #ifndef CAFFE2_OPERATORS_LOAD_SAVE_OP_H_
#define CAFFE2_OPERATORS_LOAD_SAVE_OP_H_
#include <cstdio>
#include <map>
#include <unordered_set>
#include <c10/util/irange.h>
#include <c10/util/string_view.h>
#include "caffe2/core/blob_serialization.h"
#include "caffe2/core/context.h"
#include "caffe2/core/db.h"
#include ... | 14,136 | 32.030374 | 80 | h |
null | pytorch-main/caffe2/operators/load_save_op_util.h | #ifndef CAFFE2_OPERATORS_LOAD_SAVE_OP_UTIL_H_
#define CAFFE2_OPERATORS_LOAD_SAVE_OP_UTIL_H_
#include <set>
#include <string>
#include <unordered_map>
#include "caffe2/core/blob.h"
#include "caffe2/core/blob_serialization.h"
namespace caffe2 {
namespace load_save_op_util {
struct BlobState {
int64_t total_size;
... | 1,642 | 25.934426 | 76 | h |
null | pytorch-main/caffe2/operators/local_response_normalization_op.h | #ifndef CAFFE2_OPERATORS_LOCAL_RESPONSE_NORMALIZATION_OP_H_
#define CAFFE2_OPERATORS_LOCAL_RESPONSE_NORMALIZATION_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class LRNO... | 2,828 | 28.46875 | 72 | h |
null | pytorch-main/caffe2/operators/locally_connected_op.h | #ifndef CAFFE2_OPERATORS_LOCALLY_CONNECTED_OP_H_
#define CAFFE2_OPERATORS_LOCALLY_CONNECTED_OP_H_
#include <vector>
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/conv_op_shared.h"
#include "caffe2/operators/conv_pool_op_base.h"
#include "caffe2/operators/locally_connect... | 3,890 | 28.477273 | 74 | h |
null | pytorch-main/caffe2/operators/locally_connected_op_util.h | #ifndef CAFFE2_OPERATORS_LOCALLY_CONNECTED_OP_UTIL_H_
#define CAFFE2_OPERATORS_LOCALLY_CONNECTED_OP_UTIL_H_
#include <vector>
#include "caffe2/core/types.h"
namespace caffe2 {
namespace lc_op_util {
struct ShapeParams {
int N;
int C;
int M;
int input_image_size;
int output_image_size;
int kernel_size;
... | 1,332 | 20.5 | 55 | h |
null | pytorch-main/caffe2/operators/logit_op.h | #ifndef CAFFE2_OPERATORS_LOGIT_OP_H_
#define CAFFE2_OPERATORS_LOGIT_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/elementwise_ops.h"
C10_DECLARE_EXPORT_CAFFE2_OP_TO_C10(Logit)
namespace caffe2 {
template <class Co... | 1,138 | 23.76087 | 76 | h |
null | pytorch-main/caffe2/operators/loss_op.h | #ifndef CAFFE2_OPERATORS_LOSS_OP_H_
#define CAFFE2_OPERATORS_LOSS_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/reduction_ops.h"
#include "caffe2/operators/utility_ops.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
// Averag... | 1,058 | 28.416667 | 79 | h |
null | pytorch-main/caffe2/operators/lpnorm_op.h | #ifndef CAFFE2_OPERATORS_LPNORM_OP_H_
#define CAFFE2_OPERATORS_LPNORM_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class LpNormOp : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_FUNCTIONS;
... | 1,279 | 24.098039 | 68 | h |
null | pytorch-main/caffe2/operators/lstm_unit_op.h | #ifndef CAFFE2_OPERATORS_LSTM_UNIT_OP_H_
#define CAFFE2_OPERATORS_LSTM_UNIT_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/perfkernels/lstm_unit_cpu.h"
#include "caffe2/utils/conversions.h"
namespace caffe2 {
namespace detail {
template <typename T, typename Context>
inline ... | 6,733 | 27.294118 | 78 | h |
null | pytorch-main/caffe2/operators/lstm_utils.h | #include <algorithm>
#include <vector>
#include "caffe2/core/tensor.h"
#include "caffe2/utils/eigen_utils.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
namespace {
using t_tuple = std::tuple<Tensor, Tensor>;
template <typename T>
T copy_ctor(const T& x) {
return x;
}
template <>
Tensor copy_ctor(const Tens... | 9,536 | 28.803125 | 80 | h |
null | pytorch-main/caffe2/operators/map_ops.h | #ifndef CAFFE2_OPERATORS_MAP_OPS_H_
#define CAFFE2_OPERATORS_MAP_OPS_H_
#include "caffe2/core/blob_serialization.h"
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include <c10/util/irange.h>
#include <algorithm>
#include <iterator>
#include <string>
#include <typeinfo>
#include <unordered_map>
#i... | 8,083 | 28.940741 | 80 | h |
null | pytorch-main/caffe2/operators/margin_loss_l2r_op.h | // Copyright 2004-present Facebook. All Rights Reserved.
#pragma once
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class SessionMarginLossOp final : public Operator<Context> ... | 1,324 | 24.480769 | 74 | h |
null | pytorch-main/caffe2/operators/margin_ranking_criterion_op.h | #ifndef CAFFE2_OPERATORS_MARGIN_RANKING_CRITERION_OP_H_
#define CAFFE2_OPERATORS_MARGIN_RANKING_CRITERION_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
template <class Context>
class MarginRankingCriterionOp final : public Operator<Contex... | 1,113 | 24.906977 | 73 | h |
null | pytorch-main/caffe2/operators/matmul_op.h | #ifndef CAFFE2_OPERATORS_MATMUL_OP_H_
#define CAFFE2_OPERATORS_MATMUL_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context, class Engine = DefaultEngine>
class MatMulOp final : public Operator<Context> {
public... | 2,852 | 26.171429 | 74 | h |
null | pytorch-main/caffe2/operators/max_pool_with_index_gpu.h | #pragma once
#include <cfloat>
#include "caffe2/core/context.h"
#include "caffe2/core/context_gpu.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/conv_pool_op_base.h"
#include "caffe2/operators/pool_op.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
class MaxPool... | 1,155 | 23.595745 | 77 | h |
null | pytorch-main/caffe2/operators/mean_op.h | #ifndef CAFFE2_OPERATORS_MEAN_OPS_H_
#define CAFFE2_OPERATORS_MEAN_OPS_H_
#include "caffe2/core/common_omp.h"
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/core/types.h"
#include "caffe2/utils/math.h"
#include "caffe2/utils/proto_utils.h"
#include ... | 3,314 | 24.305344 | 75 | h |
null | pytorch-main/caffe2/operators/merge_id_lists_op.h | #ifndef CAFFE2_OPERATORS_MERGE_ID_LISTS_OP_H_
#define CAFFE2_OPERATORS_MERGE_ID_LISTS_OP_H_
#include <set>
#include <vector>
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include <c10/util/irange.h>
C10_DECLARE_EXPORT_CAFFE2_OP_TO_C10(MergeIdLists... | 2,596 | 29.197674 | 79 | h |
null | pytorch-main/caffe2/operators/minmax_ops.h | #ifndef CAFFE2_OPERATORS_MINMAX_OPS_H_
#define CAFFE2_OPERATORS_MINMAX_OPS_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/core/types.h"
#include "caffe2/utils/math.h"
#include <c10/util/irange.h>
namespace caffe2 {
template <typename T, class C... | 3,898 | 26.652482 | 72 | h |
null | pytorch-main/caffe2/operators/mish_op.h | #ifndef CAFFE2_OPERATORS_MISH_OP_H_
#define CAFFE2_OPERATORS_MISH_OP_H_
#include "caffe2/operators/elementwise_ops.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <class Context>
struct MishFunctor {
template <typename T>
bool operator()(const int N, const T* X, T* Y, Context* context) const;
};
t... | 794 | 21.083333 | 80 | h |
null | pytorch-main/caffe2/operators/mod_op.h | #ifndef CAFFE_OPERATORS_MOD_OP_H_
#define CAFFE_OPERATORS_MOD_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
template <class Context>
class ModOp final : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_FUNCTIONS;
template <cla... | 984 | 23.02439 | 78 | h |
null | pytorch-main/caffe2/operators/moments_op.h | #ifndef CAFFE2_OPERATORS_MOMENTS_OP_H_
#define CAFFE2_OPERATORS_MOMENTS_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include <c10/util/irange.h>
#include <algorithm>
#include <vector>
namespace caffe2 {
template <typename T, class Context>
class MomentsOp ... | 4,088 | 28 | 91 | h |
null | pytorch-main/caffe2/operators/multi_class_accuracy_op.h | #ifndef CAFFE2_OPERATORS_MULTI_CLASS_ACCURACY_OP_H_
#define CAFFE2_OPERATORS_MULTI_CLASS_ACCURACY_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
template <typename T, class Context>
class MultiClassAccuracyOp final : public Operator<Context> {
public:
USE_SIMPLE_CTOR_D... | 539 | 22.478261 | 61 | h |
null | pytorch-main/caffe2/operators/ngram_ops.h | #pragma once
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
#include <vector>
namespace caffe2 {
template <typename F, typename T, class Context>
class NGramFromCategoricalOp : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_F... | 2,705 | 30.835294 | 79 | h |
null | pytorch-main/caffe2/operators/no_default_engine_op.h | #ifndef CAFFE2_OPERATORS_NO_DEFAULT_ENGINE_OP_H_
#define CAFFE2_OPERATORS_NO_DEFAULT_ENGINE_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
/**
* A helper class to denote that an op does not have a default engine.
*
* NoDefaultEngineOp i... | 1,063 | 28.555556 | 77 | h |
null | pytorch-main/caffe2/operators/normalize_l1_op.h | #ifndef CAFFE2_OPERATORS_NORMALIZE_L1_OP_H_
#define CAFFE2_OPERATORS_NORMALIZE_L1_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class NormalizeL1Op final : public Operator<Context> {
public:
USE_OPERA... | 1,075 | 25.9 | 80 | h |
null | pytorch-main/caffe2/operators/normalize_op.h | #ifndef CAFFE2_OPERATORS_NORMALIZE_OP_H_
#define CAFFE2_OPERATORS_NORMALIZE_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/eigen_utils.h"
#include "caffe2/utils/math.h"
#define KEPS 1e-12f
namespace caffe2 {
template <typename T, class Context>
class NormalizeOp fina... | 3,021 | 27.509434 | 78 | h |
null | pytorch-main/caffe2/operators/numpy_tile_op.h | #ifndef CAFFE2_OPERATORS_NUMPY_TILE_OP_H_
#define CAFFE2_OPERATORS_NUMPY_TILE_OP_H_
#include "caffe2/core/common_omp.h"
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
// Copy a Blob n t... | 3,809 | 30.487603 | 79 | h |
null | pytorch-main/caffe2/operators/one_hot_ops.h | #ifndef CAFFE_OPERATORS_ONE_HOT_OPS_H_
#define CAFFE_OPERATORS_ONE_HOT_OPS_H_
#include "caffe2/core/context.h"
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
C10_DECLARE_EXPORT_CAFFE2_OP_TO_C10(BatchBucketOneHot);
nam... | 2,562 | 24.376238 | 79 | h |
null | pytorch-main/caffe2/operators/onnx_while_op.h | #ifndef CAFFE2_OPERATORS_ONNX_WHILE_OP_H_
#define CAFFE2_OPERATORS_ONNX_WHILE_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/create_scope_op.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <class Context>
class ONNXWhil... | 10,733 | 32.648903 | 80 | h |
null | pytorch-main/caffe2/operators/op_utils_cudnn.h | #ifndef CAFFE2_OPERATORS_CUDNN_OP_UTILS_H_
#define CAFFE2_OPERATORS_CUDNN_OP_UTILS_H_
#include "caffe2/core/cudnn_wrappers.h"
namespace caffe2 {
// Earlier in the days Caffe sets the default cudnn workspace to 8MB. We bump
// it up to 64MB in Caffe2, as this enables the use of Winograd in many cases,
// something ve... | 2,120 | 37.563636 | 80 | h |
null | pytorch-main/caffe2/operators/operator_fallback_gpu.h | #ifndef CAFFE2_OPERATORS_OPERATOR_FALLBACK_H_
#define CAFFE2_OPERATORS_OPERATOR_FALLBACK_H_
#include "caffe2/core/common.h"
#include "caffe2/core/context.h"
#include "caffe2/core/context_gpu.h"
#include "caffe2/core/operator.h"
#include "caffe2/proto/caffe2_pb.h"
namespace caffe2 {
/**
* @brief A templated class to... | 4,183 | 36.693694 | 79 | h |
null | pytorch-main/caffe2/operators/order_switch_ops.h | #ifndef CAFFE2_OPERATORS_ORDER_SWITCH_OPS_H_
#define CAFFE2_OPERATORS_ORDER_SWITCH_OPS_H_
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include <c10/util/irange.h>
#include <vector>
namespace caffe2 {
// Note(Yangqing): I think it is possible to do a more general swapaxes operator
// but I am a ... | 2,189 | 22.548387 | 80 | h |
null | pytorch-main/caffe2/operators/pack_rnn_sequence_op.h | #ifndef CAFFE2_OPERATORS_PACK_RNN_SEQUENCE_OP_H_
#define CAFFE2_OPERATORS_PACK_RNN_SEQUENCE_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
#include <algorithm>
#include <vector>
namespace caffe2 {
template <class Context, bool For... | 3,112 | 31.427083 | 80 | h |
null | pytorch-main/caffe2/operators/pack_segments.h | #ifndef CAFFE2_OPERATORS_PACK_SEGMENTS_H_
#define CAFFE2_OPERATORS_PACK_SEGMENTS_H_
#include <atomic>
#include <limits>
#include <mutex>
#include <unordered_map>
#include <vector>
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include "caffe2/core/operator.h"
#include "caffe2/core/tensor.h"
#include "caffe2/utils/m... | 2,738 | 26.39 | 79 | h |
null | pytorch-main/caffe2/operators/pad_op.h | #ifndef CAFFE2_OPERATORS_PAD_OP_H_
#define CAFFE2_OPERATORS_PAD_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/conv_pool_op_base.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
// Padding mode similar to numpy.
enum class PadM... | 2,920 | 29.747368 | 76 | h |
null | pytorch-main/caffe2/operators/partition_ops.h | #ifndef CAFFE2_OPERATORS_PARTITION_OPS_H_
#define CAFFE2_OPERATORS_PARTITION_OPS_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <typename Index>
static inline int moduloPartition(Index key, int numPartitions) {
int shard = key % numPar... | 10,081 | 30.704403 | 80 | h |
null | pytorch-main/caffe2/operators/percentile_op.h | // Operator to calculate percentile values for an input tensor of data,
// given samples of data from the same distribution, labeled with their
// percentile values.
#ifndef CAFFE2_OPERATORS_PERCENTILE_OP_H_
#define CAFFE2_OPERATORS_PERCENTILE_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/export_caffe2... | 1,009 | 24.897436 | 71 | h |
null | pytorch-main/caffe2/operators/piecewise_linear_transform_op.h | #ifndef CAFFE2_OPERATORS_PIECEWISE_LINEAR_TRANSFORM_OP_H_
#define CAFFE2_OPERATORS_PIECEWISE_LINEAR_TRANSFORM_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include <c10/util/irange.h>
#include "caffe2/core/operator.h"
C10_DECLARE_EXPORT_CAFFE2_OP_TO_C10(PiecewiseLinearTransf... | 8,407 | 31.715953 | 80 | h |
null | pytorch-main/caffe2/operators/pool_op.h | #ifndef CAFFE2_OPERATORS_POOL_OP_H_
#define CAFFE2_OPERATORS_POOL_OP_H_
#include <vector>
#include "caffe2/core/common_omp.h"
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/conv_pool_op_base.h"
namespace caffe2 {
template <typename T, c... | 8,559 | 26.088608 | 80 | h |
null | pytorch-main/caffe2/operators/pow_op.h | #ifndef CAFFE2_OPERATORS_POW_OP_H_
#define CAFFE2_OPERATORS_POW_OP_H_
#include "caffe2/core/common_omp.h"
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/elementwise_ops.h"
#include "caffe2/operators/elementwise_ops_utils.h"
#include "caffe... | 4,677 | 33.145985 | 105 | h |
null | pytorch-main/caffe2/operators/prefetch_op.h | #ifndef CAFFE2_OPERATORS_PREFETCH_OP_H_
#define CAFFE2_OPERATORS_PREFETCH_OP_H_
#include <condition_variable>
#include <mutex>
#include <thread> // NOLINT
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
// PrefetchOperator is an operator that prefetches the next batch. It shoul... | 4,663 | 31.615385 | 80 | h |
null | pytorch-main/caffe2/operators/prelu_op.h | #pragma once
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class PReluOp final : public Operator<Context> {
public:
template <class... Args>
explicit PReluOp(Args&&... arg... | 1,067 | 23.272727 | 74 | h |
null | pytorch-main/caffe2/operators/prepend_dim_op.h |
#ifndef CAFFE2_OPERATORS_PREPEND_DIM_OP_H_
#define CAFFE2_OPERATORS_PREPEND_DIM_OP_H_
#include "caffe2/core/common_omp.h"
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include <c10/util/irange.h>
namespace caffe2 {
template <class Context>
class PrependDimOp : ... | 2,800 | 27.292929 | 85 | h |
null | pytorch-main/caffe2/operators/quant_decode_op.h | #ifndef QUANT_DECODE_OP_H_
#define QUANT_DECODE_OP_H_
#include <c10/util/irange.h>
#include <c10/util/typeid.h>
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/core/tensor.h"
namespace caffe2 {
namespace {
template <class CodebookT, class CodeT>
void Decode(
const Tensor& co... | 5,465 | 30.595376 | 78 | h |
null | pytorch-main/caffe2/operators/quantile_op.h | #pragma once
#include "caffe2/core/operator.h"
#include "c10/util/irange.h"
#include <cmath>
#include <limits>
namespace caffe2 {
template <typename Context>
class QuantileOp final : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_FUNCTIONS;
QuantileOp(const OperatorDef& operator_def, Workspace* ws)
... | 4,193 | 26.592105 | 78 | h |
null | pytorch-main/caffe2/operators/rank_loss_op.h | #pragma once
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
// support multiple batches of sessions
template <typename T, class Context>
class PairWiseLossOp final : public Operator<Context> {
public:
USE_SIMPLE... | 820 | 21.805556 | 63 | h |
null | pytorch-main/caffe2/operators/reciprocal_op.h | #ifndef CAFFE2_OPERATORS_RECIPROCAL_OP_H_
#define CAFFE2_OPERATORS_RECIPROCAL_OP_H_
#include "caffe2/operators/elementwise_ops.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <class Context>
struct ReciprocalFunctor {
template <typename T>
bool operator()(const int N, const T* X, T* Y, Context* con... | 721 | 20.878788 | 74 | h |
null | pytorch-main/caffe2/operators/reduce_front_back_max_ops.h | #ifndef CAFFE2_OPERATORS_REDUCE_FRONT_BACK_MAX_OPS_H_
#define CAFFE2_OPERATORS_REDUCE_FRONT_BACK_MAX_OPS_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <typename T, class Co... | 4,448 | 31.007194 | 81 | h |
null | pytorch-main/caffe2/operators/reduce_front_back_sum_mean_ops.h | #ifndef CAFFE2_OPERATORS_REDUCE_FRONT_BACK_SUM_MEAN_OPS_H_
#define CAFFE2_OPERATORS_REDUCE_FRONT_BACK_SUM_MEAN_OPS_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <class Cont... | 5,377 | 31.203593 | 81 | h |
null | pytorch-main/caffe2/operators/reduce_ops.h | #ifndef CAFFE2_OPERATORS_REDUCE_OPS_H_
#define CAFFE2_OPERATORS_REDUCE_OPS_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/core/types.h"
#include "caffe2/utils/math.h"
#include <c10/util/irange.h>
#include <algorithm>
#include <functional>
#include <vector>
namespace caffe2 {
... | 9,999 | 24.316456 | 94 | h |
null | pytorch-main/caffe2/operators/reducer_functors.h |
#ifndef CAFFE2_OPERATORS_RECUDER_FUNCTORS_H_
#define CAFFE2_OPERATORS_RECUDER_FUNCTORS_H_
#include <array>
#include "caffe2/core/context.h"
#include "caffe2/core/tensor.h"
#include "caffe2/utils/eigen_utils.h"
#include "caffe2/utils/math.h"
#include "caffe2/utils/proto_utils.h"
namespace caffe2 {
/////////////////... | 24,714 | 28.422619 | 80 | h |
null | pytorch-main/caffe2/operators/relu_n_op.h | #ifndef CAFFE2_OPERATORS_RELU_N_OP_H_
#define CAFFE2_OPERATORS_RELU_N_OP_H_
#include <vector>
#include "caffe2/operators/elementwise_ops.h"
namespace caffe2 {
template <class Context>
struct ReluNFunctor {
explicit ReluNFunctor(OperatorBase& op)
: n(op.GetSingleArgument<float>("n", 6.0f)) {
CAFFE_ENFORC... | 990 | 21.022222 | 73 | h |
null | pytorch-main/caffe2/operators/remove_data_blocks_op.h | #ifndef CAFFE2_OPERATORS_REMOVE_DATA_BLOCKS_OP_H_
#define CAFFE2_OPERATORS_REMOVE_DATA_BLOCKS_OP_H_
#include <algorithm>
#include <vector>
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <class Context>
class RemoveDataBlocksOp final : publ... | 2,691 | 29.942529 | 80 | h |
null | pytorch-main/caffe2/operators/replace_nan_op.h | #ifndef CAFFE_OPERATORS_REPLACE_NAN_OP_H_
#define CAFFE_OPERATORS_REPLACE_NAN_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <class Context>
class ReplaceNaNOp final : public Operator<Context> {
pub... | 1,170 | 24.456522 | 76 | h |
null | pytorch-main/caffe2/operators/reshape_op.h | #ifndef CAFFE2_OPERATORS_RESHAPE_OP_H_
#define CAFFE2_OPERATORS_RESHAPE_OP_H_
#include "caffe2/core/common_omp.h"
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
// Takes a shape and dat... | 5,768 | 31.22905 | 80 | h |
null | pytorch-main/caffe2/operators/resize_3d_op.h | #pragma once
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
C10_DECLARE_EXPORT_CAFFE2_OP_TO_C10(ResizeNearest3D);
namespace caffe2 {
template <typename T, class Context>
class ResizeNearest3DOp final : public Operator<Context> {
public:
template... | 2,677 | 27.795699 | 80 | h |
null | pytorch-main/caffe2/operators/resize_op.h | #pragma once
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
C10_DECLARE_EXPORT_CAFFE2_OP_TO_C10(ResizeNearest);
namespace caffe2 {
template <typename T, class Context>
class ResizeNearestOp final : public Operator<Context> {
public:
template <c... | 2,307 | 27.146341 | 80 | h |
null | pytorch-main/caffe2/operators/reverse_packed_segs_op.h | #ifndef CAFFE2_OPERATORS_REVERSE_PACKED_SEGS_OP_H_
#define CAFFE2_OPERATORS_REVERSE_PACKED_SEGS_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <class Context>
class ReversePackedSegsOp final : public Operator<Context> {
public:
USE... | 2,805 | 29.835165 | 80 | h |
null | pytorch-main/caffe2/operators/rmac_regions_op.h |
#ifndef CAFFE2_OPERATORS_RMAC_REGIONS_OP_H
#define CAFFE2_OPERATORS_RMAC_REGIONS_OP_H
#include "caffe2/core/operator.h"
namespace caffe2 {
template <class Context>
class RMACRegionsOp final : public Operator<Context> {
public:
template <class... Args>
explicit RMACRegionsOp(Args&&... args)
: Operator<Con... | 708 | 21.870968 | 77 | h |
null | pytorch-main/caffe2/operators/rms_norm_op.h | #ifndef CAFFE2_OPERATORS_RMS_NORM_OP_H_
#define CAFFE2_OPERATORS_RMS_NORM_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/core/types.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
// RMSNorm op.
// https://openreview.net/pdf?id=SygkZ3MTJE
template <class Context>
clas... | 2,968 | 25.508929 | 78 | h |
null | pytorch-main/caffe2/operators/roi_align_gradient_op.h | // Copyright 2004-present Facebook. All Rights Reserved.
#ifndef CAFFE2_OPERATORS_ROI_ALIGN_GRADIENT_OP_H_
#define CAFFE2_OPERATORS_ROI_ALIGN_GRADIENT_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
C10_DECLARE... | 1,510 | 29.22 | 77 | h |
null | pytorch-main/caffe2/operators/roi_align_op.h | #ifndef CAFFE2_OPERATORS_ROI_ALIGN_OP_H_
#define CAFFE2_OPERATORS_ROI_ALIGN_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
C10_DECLARE_EXPORT_CAFFE2_OP_TO_C10(RoIAlign)
namespace caffe2 {
template <typename T... | 2,875 | 29.273684 | 80 | h |
null | pytorch-main/caffe2/operators/roi_align_rotated_gradient_op.h | // Copyright 2004-present Facebook. All Rights Reserved.
#ifndef ROI_ALIGN_ROTATED_GRADIENT_OP_H_
#define ROI_ALIGN_ROTATED_GRADIENT_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
template <typename T, class Context>
class RoIAlignRotated... | 1,393 | 28.659574 | 77 | h |
null | pytorch-main/caffe2/operators/roi_align_rotated_op.h | // Copyright 2004-present Facebook. All Rights Reserved.
#ifndef ROTATED_ROI_ALIGN_OP_H_
#define ROTATED_ROI_ALIGN_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/export_caffe2_op_to_c10.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
C10_DECLARE_EXPORT_CAFFE2_OP_TO_C10(RoIAlignRot... | 1,628 | 30.326923 | 77 | h |
null | pytorch-main/caffe2/operators/roi_pool_op.h | #ifndef ROI_POOL_OP_H_
#define ROI_POOL_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class RoIPoolOp final : public Operator<Context> {
public:
template <class... Arg... | 2,503 | 30.3 | 79 | h |
null | pytorch-main/caffe2/operators/rowmul_op.h | #ifndef CAFFE2_OPERATORS_ROW_MUL_H_
#define CAFFE2_OPERATORS_ROW_MUL_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
// A hacky version of Mul with broadcast
// RowMul([mat, w], [outp... | 2,008 | 24.75641 | 67 | h |
null | pytorch-main/caffe2/operators/scale_blobs_op.h | #ifndef CAFFE2_OPERATORS_SCALE_BLOBS_OP_H_
#define CAFFE2_OPERATORS_SCALE_BLOBS_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <class Context>
class ScaleBlobsOp final : public Operator<Context> {
publi... | 1,503 | 24.066667 | 68 | h |
null | pytorch-main/caffe2/operators/scale_op.h | #ifndef CAFFE2_OPERATORS_SCALE_OP_H_
#define CAFFE2_OPERATORS_SCALE_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <class Context>
class ScaleOp final : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_FUNCTIONS;
templat... | 1,019 | 22.181818 | 76 | h |
null | pytorch-main/caffe2/operators/self_binning_histogram_op.h | #pragma once
#include "caffe2/core/operator.h"
#include "c10/util/irange.h"
#include <algorithm>
#include <cmath>
#include <limits>
namespace caffe2 {
template <class Context>
class SelfBinningHistogramOp final : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_FUNCTIONS;
template <class... Args>
expl... | 6,289 | 33.371585 | 91 | h |
null | pytorch-main/caffe2/operators/selu_op.h | #ifndef CAFFE2_OPERATORS_SELU_OP_H_
#define CAFFE2_OPERATORS_SELU_OP_H_
#include "caffe2/core/common_omp.h"
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
template <typename T, class Context>
class SeluOp final : public Operator<Context> {
publ... | 1,545 | 25.20339 | 73 | h |
null | pytorch-main/caffe2/operators/sequence_ops.h | #ifndef CAFFE2_OPERATORS_SEQUENCE_OPS_H_
#define CAFFE2_OPERATORS_SEQUENCE_OPS_H_
#include "caffe2/core/operator.h"
#include "caffe2/core/tensor.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <class Context>
class GatherPaddingOp final : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_FUNCT... | 8,264 | 30.425856 | 80 | h |
null | pytorch-main/caffe2/operators/shape_op.h |
#pragma once
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "c10/util/irange.h"
namespace caffe2 {
// RecordShapeOp records the shape of the input tensor to a vector of int. You
// mostly don't need this operator explicitly, and it is mostly used in the
// autodiff process.
template <cl... | 1,675 | 28.928571 | 81 | h |
null | pytorch-main/caffe2/operators/sinusoid_position_encoding_op.h | #ifndef CAFFE2_OPERATORS_SINUSOID_POSITION_ENCODING_OP_H_
#define CAFFE2_OPERATORS_SINUSOID_POSITION_ENCODING_OP_H_
#ifdef _MSC_VER
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#endif // _MSC_VER
#include <cmath>
#include "caffe2/core/operator.h"
#include "Eigen/Core"
#include "caffe2/utils/eigen_utils... | 2,853 | 29.042105 | 78 | h |
null | pytorch-main/caffe2/operators/slice_op.h |
#pragma once
#include "caffe2/core/context.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <class SIndex, class Context>
bool SliceImpl(
Tensor* output,
const Tensor& data,
const Tensor& starts,
const Tensor& ends,
Cont... | 10,150 | 29.21131 | 115 | h |
null | pytorch-main/caffe2/operators/softmax_op.h | #ifndef CAFFE2_OPERATORS_SOFTMAX_OP_H_
#define CAFFE2_OPERATORS_SOFTMAX_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class SoftmaxOp final : public Operator<Context> {
... | 1,174 | 23.479167 | 66 | h |
null | pytorch-main/caffe2/operators/softmax_with_loss_op.h | #ifndef SOFTMAX_WITH_LOSS_OP_H_
#define SOFTMAX_WITH_LOSS_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class SoftmaxWithLossOp final : public Operator<Context> {
public... | 2,883 | 31.404494 | 79 | h |
null | pytorch-main/caffe2/operators/softplus_op.h | #ifndef CAFFE2_OPERATORS_SOFTPLUS_OP_H_
#define CAFFE2_OPERATORS_SOFTPLUS_OP_H_
#include "caffe2/core/common_omp.h"
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
namespace caffe2 {
template <typename T, class Context>
class SoftplusOp final : public Operator<Cont... | 781 | 20.135135 | 59 | h |
null | pytorch-main/caffe2/operators/softsign_op.h | #ifndef CAFFE2_OPERATORS_SOFTSIGN_OP_H_
#define CAFFE2_OPERATORS_SOFTSIGN_OP_H_
#include <vector>
#include "caffe2/operators/elementwise_ops.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <class Context>
struct SoftsignFunctor {
template <typename T>
bool operator()(const int N, const T* X, T* Y,... | 675 | 20.125 | 73 | h |
null | pytorch-main/caffe2/operators/space_batch_op.h | #ifndef CAFFE2_OPERATORS_SPACE_BATCH_OP_H_
#define CAFFE2_OPERATORS_SPACE_BATCH_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "c10/util/irange.h"
namespace caffe2 {
template <typename Context>
void spaceToBatch(
c... | 6,899 | 31.701422 | 80 | h |
null | pytorch-main/caffe2/operators/sparse_dropout_with_replacement_op.h | #ifndef CAFFE2_OPERATORS_SPARSE_DROPOUT_WITH_REPLACEMENT_OP_H_
#define CAFFE2_OPERATORS_SPARSE_DROPOUT_WITH_REPLACEMENT_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <class Context>
class SparseDrop... | 1,122 | 30.194444 | 80 | h |
null | pytorch-main/caffe2/operators/sparse_itemwise_dropout_with_replacement_op.h | #ifndef CAFFE2_OPERATORS_SPARSE_ITEMWISE_DROPOUT_WITH_REPLACEMENT_OP_H_
#define CAFFE2_OPERATORS_SPARSE_ITEMWISE_DROPOUT_WITH_REPLACEMENT_OP_H_
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <class Context... | 1,163 | 31.333333 | 80 | h |
null | pytorch-main/caffe2/operators/sparse_lp_regularizer_op.h | #pragma once
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
template <typename T, class Context>
class TORCH_API SparseLpRegularizerOp final : public Operator<Context> {
public:
USE_OPERATOR_CONTEXT_FUNCTIONS;
template <class... Args>
explicit SparseLpRegularizerOp(Args&&.... | 1,130 | 24.704545 | 74 | h |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.