mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-08-14 02:37:01 -07:00
add xlib.avecl
This commit is contained in:
parent
932edfe875
commit
0058474da7
56 changed files with 5569 additions and 0 deletions
17
xlib/avecl/_internal/initializer/Initializer.py
Normal file
17
xlib/avecl/_internal/initializer/Initializer.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
from ..Tensor import Tensor
|
||||
|
||||
class Initializer:
|
||||
"""
|
||||
Base class for tensor inititalizers
|
||||
"""
|
||||
def initialize_tensor(self, tensor : Tensor):
|
||||
"""
|
||||
Implement initialization of tensor
|
||||
|
||||
You can compute the data using python and then call buffer.set(numpy_value)
|
||||
or call kernel.run( tensor.get_device(), tensor.get_buffer, ...) to initialize the data using OpenCL
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def __str__(self): return 'Initializer'
|
||||
def __repr__(self): return self.__str__()
|
Loading…
Add table
Add a link
Reference in a new issue