mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-12-22 14:24:22 +00:00
WIP Migrate Activation to Tensor
This commit is contained in:
@@ -18,6 +18,8 @@ typedef std::vector<size_t> Shape;
|
||||
class Tensor
|
||||
{
|
||||
public:
|
||||
|
||||
Tensor() = default;
|
||||
Tensor(Shape shape, DType dtype, IBackend* backend);
|
||||
~Tensor();
|
||||
|
||||
@@ -27,6 +29,10 @@ public:
|
||||
void toDevice(const void* hostPtr);
|
||||
void toHost(void* hostPtr);
|
||||
|
||||
size_t size() const;
|
||||
size_t numel() const;
|
||||
void* data() const;
|
||||
|
||||
private:
|
||||
Shape shape;
|
||||
DType dtype;
|
||||
|
||||
Reference in New Issue
Block a user