AI-TensorFlow-Libtensorflow
view release on metacpan or search on metacpan
lib/AI/TensorFlow/Libtensorflow/Graph.pm view on Meta::CPAN
arg 'string' => 'oper_name',
] => 'TF_Operation' );
$ffi->attach( [ 'GraphSetTensorShape' => 'SetTensorShape' ] => [
arg 'TF_Graph' => 'graph',
arg 'TF_Output' => 'output',
arg 'tf_dims_buffer' => [qw(dims num_dims)],
arg 'TF_Status' => 'status',
] => 'void');
$ffi->attach( ['GraphGetTensorShape' => 'GetTensorShape'] => [
arg 'TF_Graph' => 'graph',
arg 'TF_Output' => 'output',
arg 'tf_dims_buffer' => [qw(dims num_dims)],
arg 'TF_Status' => 'status',
] => 'void' => sub {
my ($xs, @rest) = @_;
my ($graph, $output, $status) = @rest;
my $dims = [ (0)x($graph->GetTensorNumDims($output, $status)) ];
$xs->($graph, $output, $dims, $status);
return $dims;
});
$ffi->attach( [ 'GraphGetTensorNumDims' => 'GetTensorNumDims' ] => [
arg 'TF_Graph' => 'graph',
arg 'TF_Output' => 'output',
arg 'TF_Status' => 'status',
] => 'int');
$ffi->attach( [ 'GraphNextOperation' => 'NextOperation' ] => [
arg 'TF_Graph' => 'graph',
arg 'size_t*' => 'pos',
] => 'TF_Operation');
$ffi->attach( [ 'UpdateEdge' => 'UpdateEdge' ] => [
arg 'TF_Graph' => 'graph',
arg 'TF_Output' => 'new_src',
arg 'TF_Input' => 'dst',
arg 'TF_Status' => 'status',
] => 'void');
$ffi->attach([ 'GraphToGraphDef' => 'ToGraphDef' ] => [
arg 'TF_Graph' => 'graph',
arg 'TF_Buffer' => 'output_graph_def',
arg 'TF_Status' => 'status',
] => 'void');
$ffi->attach( [ 'GraphGetOpDef' => 'GetOpDef' ] => [
arg TF_Graph => 'graph',
arg string => 'op_name',
arg TF_Buffer => 'output_op_def',
arg TF_Status => 'status',
] => 'void');
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
AI::TensorFlow::Libtensorflow::Graph - A TensorFlow computation, represented as a dataflow graph
=head1 SYNOPSIS
use aliased 'AI::TensorFlow::Libtensorflow::Graph' => 'Graph';
=head1 DESCRIPTION
=head1 CONSTRUCTORS
=head2 New
=over 2
C<<<
New()
>>>
=back
my $graph = Graph->New;
ok $graph, 'created graph';
B<Returns>
=over 4
=item L<TFGraph|AI::TensorFlow::Libtensorflow::Lib::Types/TFGraph>
An empty graph.
=back
B<C API>: L<< C<TF_NewGraph>|AI::TensorFlow::Libtensorflow::Manual::CAPI/TF_NewGraph >>
=head1 METHODS
=head2 ImportGraphDef
B<C API>: L<< C<TF_GraphImportGraphDef>|AI::TensorFlow::Libtensorflow::Manual::CAPI/TF_GraphImportGraphDef >>
=head2 ImportGraphDefWithResults
B<C API>: L<< C<TF_GraphImportGraphDefWithResults>|AI::TensorFlow::Libtensorflow::Manual::CAPI/TF_GraphImportGraphDefWithResults >>
=head2 ImportGraphDefWithReturnOutputs
B<C API>: L<< C<TF_GraphImportGraphDefWithReturnOutputs>|AI::TensorFlow::Libtensorflow::Manual::CAPI/TF_GraphImportGraphDefWithReturnOutputs >>
=head2 OperationByName
B<C API>: L<< C<TF_GraphOperationByName>|AI::TensorFlow::Libtensorflow::Manual::CAPI/TF_GraphOperationByName >>
=head2 SetTensorShape
B<C API>: L<< C<TF_GraphSetTensorShape>|AI::TensorFlow::Libtensorflow::Manual::CAPI/TF_GraphSetTensorShape >>
( run in 0.382 second using v1.01-cache-2.11-cpan-3d66aa2751a )