NAME

AI::TensorFlow::Libtensorflow::ApiDefMap - Maps Operation to API description

SYNOPSIS

use aliased 'AI::TensorFlow::Libtensorflow::ApiDefMap' => 'ApiDefMap';

CONSTRUCTORS

New

use AI::TensorFlow::Libtensorflow;
use AI::TensorFlow::Libtensorflow::Status;

my $map = ApiDefMap->New(
  AI::TensorFlow::Libtensorflow::TFLibrary->GetAllOpList,
  my $status = AI::TensorFlow::Libtensorflow::Status->New
);
ok $map, 'Created ApiDefMap';

C API: TF_NewApiDefMap

METHODS

Put

C API: TF_ApiDefMapPut

Get

    Get($name, $status)

my $api_def_buf = $map->Get(
  'NoOp',
  my $status = AI::TensorFlow::Libtensorflow::Status->New
);

cmp_ok $api_def_buf->length, '>', 0, 'Got ApiDef buffer for NoOp operation';

Parameters

Str $name

Name of the operation to retrieve.

TFStatus $status

Status.

Returns

Maybe[TFBuffer]

Contains a serialized ApiDef proto for the operation.

C API: TF_ApiDefMapGet

DESTRUCTORS

DESTROY

C API: TF_DeleteApiDefMap

AUTHOR

Zakariyya Mughal <zmughal@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2022-2023 by Auto-Parallel Technologies, Inc.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004