reid from https://github.com/michuanhaohao/reid-strong-baseline
zhangmeng
2020-01-17 f7c4a3cfd07adede3308f8d9d3d7315427d90a7c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#pragma once
 
// @generated from tools/autograd/templates/VariableType.h
 
#include <ATen/ATen.h>
 
#include <c10/util/intrusive_ptr.h>
 
#include <torch/csrc/WindowsTorchApiMacro.h>
#include <ATen/core/EnableNamedTensor.h>
 
#include <cstdint> // for size_t
#include <functional> // for function
#include <memory> // for unique_ptr
#include <string>
#include <vector>
 
namespace at {
  struct Quantizer;
};
 
namespace torch { namespace autograd {
 
struct Variable;
using at::Context;
using at::Device;
#ifdef BUILD_NAMEDTENSOR
using at::Dimname;
using at::DimnameList;
#endif
using at::Generator;
using at::IntArrayRef;
using at::MemoryFormat;
using at::QScheme;
using at::Scalar;
using at::ScalarType;
using at::Storage;
using at::Tensor;
using at::TensorList;
using at::TensorOptions;
using at::Quantizer;
// This is temporary typedef to enable Quantizer in aten native function API
// we'll remove them when we are actually exposing Quantizer class
// to frontend
using ConstQuantizerPtr = const c10::intrusive_ptr<Quantizer>&;
using c10::optional;
 
namespace VariableType {
  TORCH_API std::vector<at::DeprecatedTypeProperties*> allCUDATypes();
  TORCH_API std::vector<at::DeprecatedTypeProperties*> allCPUTypes();
 
  // checks that t is actually a Variable
  const Variable & checked_cast_variable(const Tensor & t, const char * name, int pos);
  Variable & checked_cast_variable(Tensor & t, const char * name, int pos);
 
  // TODO These are only needed in the header because they're defined in
  //      VariableTypeManual.cpp but registered from one of the codegened
  //      VariableType_X.cpp. Instead, we should register them from
  //      VariableTypeManual.cpp and then we can remove these declarations
  //      from the header.
  at::Tensor & unpack(Tensor & t, const char * name, int pos);
  const at::Tensor & unpack(const Tensor & t, const char * name, int pos);
  at::Tensor unpack_opt(const Tensor & t, const char * name, int pos);
  std::vector<at::Tensor> unpack(at::TensorList tl, const char *name, int pos);
  void backward(const Tensor& self, const Tensor& gradient, bool keep_graph, bool create_graph);
  void set_data(const Tensor & self, const Tensor & new_data);
  Tensor data(const Tensor & self);
  bool is_leaf(const Tensor & self);
  int64_t output_nr(const Tensor & self);
  int64_t _version(const Tensor & self);
  Tensor & copy_(Tensor & self, const Tensor & src, bool non_blocking);
  Tensor & resize_(Tensor & self, IntArrayRef size);
  Tensor & resize_as_(Tensor & self, const Tensor & the_template);
  Tensor detach(const Tensor & self);
  Tensor & detach_(Tensor & self);
};
 
}} // namespace torch::autograd