Accessing Hidden State Using C API #22419
Unanswered
vectorphresh
asked this question in
API Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I wanted to know anyone has had success accessing a models hidden state using C Training API. I thought that I could export to ONNX with the hidden state as both an input and output parameter of the model, but when I run the TrainStep function my program crashes. The documentation hints that I may be able to access model parameters directly, but I'm not quiet getting it. Here's my training function. I instantiated the hidden layer outside of this function:
Update 10/14/2024: I realized trying to init the tensors in a separate function may have not been using the same memory allocator, I instead am saving the floating point representation of hidden layer. Still no dice on completing call to TrainStep. Next step is try compiling with debug.
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 22.04
ONNX Runtime installed from (source or binary): binary
ONNX Runtime version: onnxruntime-training-linux-x64-1.16.3.tgz
ONNX Language: C
Visual Studio version (if applicable): Using Visual Studio Code
GCC/Compiler version (if compiling from source): 11.4.0-1ubuntu1~22.04
CUDA/cuDNN version: N/A (Cpu only. was trying to get Cpu working before exporting for cuda)
GPU model and memory: RTX 4080 16GB
Beta Was this translation helpful? Give feedback.
All reactions