mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-11-07 02:04:26 +00:00
Split python scripts
This commit is contained in:
17
tools/softmax_tes.py
Normal file
17
tools/softmax_tes.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import torch
|
||||
from utils import print_cpp_vector
|
||||
|
||||
|
||||
def gen_softmax_test_result():
|
||||
input = torch.tensor([
|
||||
0.573, 0.619, 0.732, 0.055, 0.243
|
||||
])
|
||||
|
||||
output = torch.nn.Softmax(dim=0)(input)
|
||||
print_cpp_vector(output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Generating test results...")
|
||||
print("Softmax test:")
|
||||
gen_softmax_test_result()
|
||||
Reference in New Issue
Block a user