-
Notifications
You must be signed in to change notification settings - Fork 734
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
Add Estimator Python API and Inception Example #1597
Merged
+890
−3
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
c895d4c
py inception
qiuxin2012 0fcf1fc
update inception
qiuxin2012 d29ab25
cleanup
qiuxin2012 2a209ea
some fix
qiuxin2012 7243534
add option
qiuxin2012 e4432bf
Add checkpoint
cyita 93f2d5c
Add Estimator python api and test case
cyita b41e8b3
Merge remote-tracking branch 'origin/yina-pyinception' into pyInception
cyita 07fc103
Add bigdl inception v1 example[TODO:Test]
cyita 18cfb60
add inception model
cyita ca7e3dd
change preprocess
cyita 850e476
test
cyita dc2fcad
Add comments
cyita 1300bff
bug fix
cyita 5d77502
Change validation preprocess method
cyita f3e7e36
Bug fix
cyita 342ec82
add imagemirror
cyita e671e13
add random cropper
cyita 917edf0
remove bigdl preprocessing
cyita e1c3ba1
hflip
cyita 25d79a0
validation resize
cyita fbbf24c
revert some changes
cyita 94af40d
fix
cyita 62522d0
merge pyEstimator
cyita c325ade
merge master
cyita fc57b32
Add readme
cyita 4b56df8
revert version
cyita c112efe
Fix & add comments
cyita a064fe4
Add license
cyita 1906279
Code style fix
cyita 271ff93
Scala style fix
cyita File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix & add comments
commit c112efea9e9e47769ede39fe71e5dca44ac5152b
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -246,10 +246,14 @@ def image_frame(cls, image_frame, memory_type="DRAM", bigdl_type="float"): | |
def image_set(cls, imageset, memory_type="DRAM", bigdl_type="float"): | ||
""" | ||
Create FeatureSet from ImageFrame. | ||
:param imageset: ImageFrame | ||
:param imageset: ImageSet | ||
:param memory_type: string, DRAM or PMEM | ||
If it's DRAM, will cache dataset into dynamic random-access memory | ||
If it's PMEM, will cache dataset into Intel Optane DC Persistent Memory | ||
If it's a Int number n, will cache dataset into disk, and only hold 1/n | ||
of the data into memory during the training. After going through the | ||
1/n, we will release the current cache, and load another 1/n into | ||
memory. | ||
:param bigdl_type: numeric type | ||
:return: A feature set | ||
""" | ||
|
@@ -265,6 +269,10 @@ def sample_rdd(cls, rdd, memory_type="DRAM", bigdl_type="float"): | |
:param memory_type: string, DRAM or PMEM | ||
If it's DRAM, will cache dataset into dynamic random-access memory | ||
If it's PMEM, will cache dataset into Intel Optane DC Persistent Memory | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Append following comment like
|
||
If it's a Int number n, will cache dataset into disk, and only hold 1/n | ||
of the data into memory during the training. After going through the | ||
1/n, we will release the current cache, and load another 1/n into | ||
memory. | ||
:param bigdl_type:numeric type | ||
:return: A feature set | ||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,9 @@ import com.intel.analytics.bigdl.transform.vision.image.opencv.OpenCVMat | |
import com.intel.analytics.bigdl.transform.vision.image.{FeatureTransformer, ImageFeature} | ||
import org.opencv.core.Core | ||
|
||
/** | ||
* Flip the image horizontally and vertically | ||
*/ | ||
class Mirror() extends FeatureTransformer { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add comment for all public class. |
||
override def transformMat(feature: ImageFeature): Unit = { | ||
Mirror.transform(feature.opencvMat(), feature.opencvMat()) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
comment here