AI-TensorFlow-Libtensorflow

 view release on metacpan or  search on metacpan

lib/AI/TensorFlow/Libtensorflow/Manual/CAPI.pod  view on Meta::CPAN


=head2 TF_StringStreamNext

=over 2

  Retrieves the next item from the given TF_StringStream and places a pointer
  to it in *result. If no more items are in the list, *result is set to NULL
  and false is returned.
  
  Ownership of the items retrieved with this function remains with the library.
  Item points are invalidated after a call to TF_StringStreamDone.

=back

  /* From <tensorflow/c/env.h> */
  TF_CAPI_EXPORT extern bool TF_StringStreamNext(TF_StringStream* list,
                                                 const char** result);

=head2 TF_StringStreamDone

=over 2

lib/AI/TensorFlow/Libtensorflow/Manual/CAPI.pod  view on Meta::CPAN


=over 2

  Expose higher level Assignment operation for Pluggable vendors to implement
  in the plugin for Training. The API takes in the context with indices for
  the input and value tensors. It also accepts the copy callback provided by
  pluggable vendor to do the copying of the tensors. The caller takes ownership
  of the `source` and `dest` tensors and is responsible for freeing them with
  TF_DeleteTensor. This function will return an error when the following
  conditions are met:
    1. `validate_shape` is set to `true`
    2. The variable is initialized
    3. The shape of the value tensor doesn't match the shape of the variable
       tensor.

=back

  /* From <tensorflow/c/kernels_experimental.h> */
  TF_CAPI_EXPORT extern void TF_AssignVariable(
      TF_OpKernelContext* ctx, int input_index, int value_index,
      bool validate_shape,
      void (*copyFunc)(TF_OpKernelContext* ctx, TF_Tensor* source,
                       TF_Tensor* dest),
      TF_Status* status);

=head2 TF_AssignRefVariable

=over 2

  Expose higher level Assignment operation for Pluggable vendors to implement
  in the plugin for Training on ref variables. The API takes in the context
  with indices for the input and value tensors. It also accepts the copy
  callback provided by pluggable vendor to do the copying of the tensors. The
  caller takes ownership of the `source` and `dest` tensors and is responsible
  for freeing them with TF_DeleteTensor.

=back

  /* From <tensorflow/c/kernels_experimental.h> */
  TF_CAPI_EXPORT extern void TF_AssignRefVariable(
      TF_OpKernelContext* ctx, int input_ref_index, int output_ref_index,
      int value_index, bool use_locking, bool validate_shape,
      void (*copyFunc)(TF_OpKernelContext* ctx, TF_Tensor* source,
                       TF_Tensor* dest),
      TF_Status* status);

=head2 TF_AssignUpdateVariable

=over 2

  Expose higher level AssignUpdate operation for Pluggable vendors to implement
  in the plugin for Training. The API takes in the context with indices for the

t/upstream/CAPI/014_SetShape.t  view on Meta::CPAN

	$graph->SetTensorShape($feed_out_0, undef, $s);
	$num_dims = $graph->GetTensorNumDims($feed_out_0, $s);
	TF_Utils::AssertStatusOK($s);
	is $num_dims, -1, 'Dims are still unknown';

	note 'Set the shape to be 2 x Unknown';
	my $dims = [2, -1];
	$graph->SetTensorShape( $feed_out_0, $dims, $s);
	TF_Utils::AssertStatusOK($s);

	note 'Fetch the shape and validate it is 2 by -1.';
	$num_dims = $graph->GetTensorNumDims($feed_out_0, $s);
	TF_Utils::AssertStatusOK($s);
	is $num_dims, 2, '2 dimensions';

	my $returned_dims;
	$returned_dims = $graph->GetTensorShape( $feed_out_0, $s );
	TF_Utils::AssertStatusOK($s);
	is $returned_dims, $dims, "Got shape [ @$dims ]";




( run in 0.223 second using v1.01-cache-2.11-cpan-a5abf4f5562 )