You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ResourceVariable.Implicit.cs 921 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using Tensorflow.Eager;
  3. namespace Tensorflow
  4. {
  5. public partial class ResourceVariable
  6. {
  7. public static implicit operator _VariableScopeStore(ResourceVariable variable)
  8. {
  9. return null;
  10. }
  11. public static implicit operator ResourceVariable(_VariableScopeStore store)
  12. {
  13. return null;
  14. }
  15. public static implicit operator Tensor(ResourceVariable var)
  16. => var.Handle;
  17. public static implicit operator EagerTensor(ResourceVariable var)
  18. => var.Handle as EagerTensor;
  19. /*public static implicit operator ResourceVariable(Tensor var)
  20. => var.ResourceVar;*/
  21. public static implicit operator RefVariable(ResourceVariable var)
  22. {
  23. return null;
  24. }
  25. public static implicit operator IntPtr(ResourceVariable var)
  26. => var._handle;
  27. }
  28. }