-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Unittest] FSU Unittest with Simple FC Model #2835
Conversation
a159899
to
ce93c66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM :) I have some questions on this PR. Could you answer to this? Thank you.
model->addLayer(ml::train::createLayer( | ||
"fully_connected", | ||
{withKey("unit", 1000), withKey("weight_initializer", "xavier_uniform"), | ||
withKey("bias_initializer", "zeros")})); | ||
model->addLayer(ml::train::createLayer( | ||
"fully_connected", | ||
{withKey("unit", 1000), withKey("weight_initializer", "xavier_uniform"), | ||
withKey("bias_initializer", "zeros")})); | ||
model->addLayer(ml::train::createLayer( | ||
"fully_connected", | ||
{withKey("unit", 1000), withKey("weight_initializer", "xavier_uniform"), | ||
withKey("bias_initializer", "zeros")})); | ||
model->addLayer(ml::train::createLayer( | ||
"fully_connected", | ||
{withKey("unit", 1000), withKey("weight_initializer", "xavier_uniform"), | ||
withKey("bias_initializer", "zeros")})); | ||
model->addLayer(ml::train::createLayer( | ||
"fully_connected", | ||
{withKey("unit", 1000), withKey("weight_initializer", "xavier_uniform"), | ||
withKey("bias_initializer", "zeros")})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about updating this duplicate code blocks with loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea i will fix that !
model->save("simplefc_weight_fp16_fp16_100.bin", | ||
ml::train::ModelFormat::MODEL_FORMAT_BIN); | ||
model->load("./simplefc_weight_fp16_fp16_100.bin"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple question. Why do we need this save
and load
code? Is it because it only supports inference mode now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for test FSU, we need file that stored in storage. so save model file, and load files for now
--> in real Inference case, they have bin files already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, that's what the FSU is !🤣 Thank you for the kind reply :)
in.push_back(input); | ||
l.push_back(label); | ||
|
||
answer = model->inference(1, in, l); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can we check the FSU works from this test code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check mem_usage.
actually i add this case for FSU build test, not for detail works
--> working test will be add to benchmarks tool
Add Unittest for FSU - Use Simple FC Model that consist with 6-FC layer - FP16-FP16 / Lookahead 1 **Self evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: Donghak PARK <[email protected]>
ce93c66
to
9abf939
Compare
LGTM. Question on FSU in general:
|
i think It is possible to activate FSU by simply setting Setproperty after loading the model that train has been completed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
In the end, an app like the "f" should be able to do so. |
That's a great idea. By raising the level of abstraction, allowing users with pre-trained weights to simply activate the swap functionality using something like model.Run(parm) would significantly enhance convenience during development. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add Unittest for FSU
i will add more case of FSU Model at Benchmark
Self evaluation: