Skip to content

Performance optimization, refactoring and revamping.#362

Merged
Oceania2018 merged 23 commits into
masterfrom
perf-ops
Aug 22, 2019
Merged

Performance optimization, refactoring and revamping.#362
Oceania2018 merged 23 commits into
masterfrom
perf-ops

Conversation

@Nucs

@Nucs Nucs commented Aug 21, 2019

Copy link
Copy Markdown
Member

Changes:

  • Refactored DisposableObject.
  • Added seperate build directory for TensorflowNET.Examples.GPU.
  • _FetchHandler: Switched to NPTypeCode (perf-op).
  • gfile.cs, Walk(...): Handle case when directory top doesn't exist.
  • Tensor.Creation: Perf-opted when creating tensor from NDArray of dtype string.
  • Graph.cs: refactor and added docs.
  • Tensor.Explicit.cs: perf-ops.
  • Tensor.Explicit.cs: Added guards for explicit casts.
  • Cleanup and docs to all Tensor.cs files.
  • Changed all uses of System.Convert to NumSharp.Utilities.Converts.
  • Added all missing types in dtypes.cs.
  • Renamed tensor.Data<T> to tensor.ToArray<T>, added obsolete message.
  • Renamed tensor.Data() to tensor.BufferToArray(), added obsolete message.
  • Revamped Tensor.ToArray<T>() and Tensor.BufferToArray().
  • Made GraphKeys to use const string instead allocating strings at every new GraphKeys() call.
  • Tensor: Added explicit cast to string.
  • Tensor.DisposeUnmanagedResources: Nullify _handle after delete.

@Oceania2018, Please review my changes to ensure I did not break something I did not know of.
All unit tests pass. All examples pass (except for those with broken urls)

Nucs added 19 commits August 21, 2019 15:53
- Added supported_numericals_TF_DataType
- Cleanup and docs to all Tensor.cs files
- Changed all uses of System.Convert to NumSharp.Utilities.Converts
- Added all missing types in dtypes.cs
- Renamed tensor.Data<T> to tensor.ToArray<T>, added obsolete message
- Renamed tensor.Data() to tensor.BufferToArray(), added obsolete message
- Made GraphKeys to use const string instead allocating strings at every use of GraphKeys.
- Fixed all locations _dtype is used incorrectly.
@Nucs Nucs added the enhancement New feature or request label Aug 21, 2019
@Nucs
Nucs requested a review from Oceania2018 August 21, 2019 21:22
@Oceania2018
Oceania2018 self-requested a review August 22, 2019 01:49

@Oceania2018 Oceania2018 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be very careful when do touch DisposeObject.
Crashed, examples can't go through.

image

@Oceania2018
Oceania2018 merged commit 6c8c2e5 into master Aug 22, 2019
@Nucs

Nucs commented Aug 28, 2019

Copy link
Copy Markdown
Member Author

This memory corruption has been fixed in the PR #366

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants