view release on metacpan or search on metacpan
maint/inc/PreloadPodWeaver.pm
maint/process-capi.pl
maint/process-notebook.pl
perlcritic.rc
t/01_hello_tf.t
t/02_load_graph.t
t/03_create_tftensor.t
t/04_allocate_tftensor.t
t/05_session_run.t
t/AI/TensorFlow/Libtensorflow.t
t/lib/TF_TestQuiet.pm
t/lib/TF_Utils.pm
t/models/README
t/models/graph.pb
t/upstream/CAPI/001_Version.t
t/upstream/CAPI/002_Status.t
t/upstream/CAPI/003_Tensor.t
t/upstream/CAPI/004_MalformedTensor.t
t/upstream/CAPI/005_AllocateTensor.t
t/upstream/CAPI/006_MaybeMove.t
t/upstream/CAPI/007_LibraryLoadFunctions.t
Makefile.PL view on Meta::CPAN
"namespace::autoclean" => 0,
"overload" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"Data::Dumper" => 0,
"PDL" => 0,
"PDL::Core" => 0,
"Path::Tiny" => 0,
"Test2::V0" => 0,
"Test::More" => 0,
"aliased" => 0,
"lib" => 0
},
"VERSION" => "0.0.7",
"test" => {
"TESTS" => "t/*.t t/AI/TensorFlow/*.t t/upstream/CAPI/*.t"
}
);
lib/AI/TensorFlow/Libtensorflow/Manual/Notebook/InferenceUsingTFHubEnformerGeneExprPredModel.pod view on Meta::CPAN
my $encoded = $encoder->index( $p->dummy(0) );
return $encoded;
}
####
{
say "Testing one-hot encoding:\n";
my $onehot_test_seq = "ACGTNtgcan";
my $test_encoded = one_hot_dna( $onehot_test_seq );
$SHOW_ENCODER = 0;
say "One-hot encoding of sequence '$onehot_test_seq' is:";
say $test_encoded->info, $test_encoded;
}
perlcritic.rc view on Meta::CPAN
theme = ( core + pbp + security + maintenance ) * bugs
include = CodeLayout::ProhibitTrailingWhitespace CodeLayout::RequireConsistentNewlines
[-Subroutines::ProhibitSubroutinePrototypes]
# alternate that works better with dzil ::PkgVersion
[-TestingAndDebugging::RequireUseStrict]
[-TestingAndDebugging::RequireUseWarnings]
[Community::StrictWarnings]
extra_importers = Test2::V0
# vim: ft=dosini
t/01_hello_tf.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use AI::TensorFlow::Libtensorflow;
subtest "Get version of Tensorflow" => sub {
my $version = AI::TensorFlow::Libtensorflow->Version;
note $version;
pass;
};
done_testing;
t/02_load_graph.t view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More tests => 1;
use lib 't/lib';
use TF_TestQuiet;
use AI::TensorFlow::Libtensorflow;
use Path::Tiny;
use lib 't/lib';
subtest "Load graph" => sub {
my $model_file = path("t/models/graph.pb");
my $ffi = FFI::Platypus->new( api => 1 );
my $data = $model_file->slurp_raw;
t/03_create_tftensor.t view on Meta::CPAN
#!/usr/bin/env perl
use Test::More tests => 1;
use strict;
use warnings;
use lib 't/lib';
use TF_TestQuiet;
use TF_Utils;
use AI::TensorFlow::Libtensorflow;
use PDL;
subtest "Create a TFTensor" => sub {
my $p_data = sequence(float, 1, 5, 12);
my $t = TF_Utils::FloatPDLToTFTensor($p_data);
is $t->NumDims, 3, '3D TFTensor';
t/04_allocate_tftensor.t view on Meta::CPAN
#!/usr/bin/env perl
use Test::More tests => 1;
use strict;
use warnings;
use lib 't/lib';
use TF_TestQuiet;
use AI::TensorFlow::Libtensorflow;
use AI::TensorFlow::Libtensorflow::DataType qw(FLOAT);
use List::Util qw(product);
use PDL;
use PDL::Core ':Internal';
use FFI::Platypus::Memory;
use FFI::Platypus::Buffer qw(scalar_to_pointer);
subtest "Allocate a TFTensor" => sub {
t/05_session_run.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0 ':DEFAULT', '!float';
use lib 't/lib';
use TF_TestQuiet;
use TF_Utils;
use PDL::Core;
use AI::TensorFlow::Libtensorflow;
use AI::TensorFlow::Libtensorflow::DataType qw(FLOAT);
use aliased 'AI::TensorFlow::Libtensorflow::Output';
use aliased 'AI::TensorFlow::Libtensorflow::Tensor';
use FFI::Platypus::Buffer qw(scalar_to_pointer);
use FFI::Platypus::Memory qw(memcpy);
t/AI/TensorFlow/Libtensorflow.t view on Meta::CPAN
#!/usr/bin/env perl
use Test::More tests => 1;
use strict;
use warnings;
use lib 't/lib';
use TF_TestQuiet;
use AI::TensorFlow::Libtensorflow;
pass;
done_testing;
t/lib/TF_TestQuiet.pm view on Meta::CPAN
package TF_TestQuiet;
use strict;
use warnings;
sub import {
if( $ENV{HARNESS_ACTIVE} && ! ( $ENV{AUTHOR_TESTING} || $ENV{RELEASE_TESTING} ) ) {
$ENV{TF_CPP_MIN_LOG_LEVEL} = 3;
}
}
t/lib/TF_Utils.pm view on Meta::CPAN
use AI::TensorFlow::Libtensorflow;
use AI::TensorFlow::Libtensorflow::Lib;
use AI::TensorFlow::Libtensorflow::DataType qw(FLOAT INT32 INT8);
use Path::Tiny;
use List::Util qw(first);
use PDL::Core ':Internal';
use FFI::Platypus::Buffer;
use Test2::V0;
my $ffi = AI::TensorFlow::Libtensorflow::Lib->ffi;
sub ScalarStringTensor {
my ($str, $status) = @_;
#my $tensor = AI::TensorFlow::Libtensorflow::Tensor->_Allocate(
#AI::TensorFlow::Libtensorflow::DType::STRING,
#\@dims, $ndims,
#$data_size_bytes,
#);
t/upstream/CAPI/002_Status.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
use aliased 'AI::TensorFlow::Libtensorflow::Status';
subtest "(CAPI, Status)" => sub {
my $s = Status->New;
is $s->GetCode, AI::TensorFlow::Libtensorflow::Status::OK, 'OK code';
is $s->Message, '', 'empty message';
note 'Set status to CANCELLED';
$s->SetStatus('CANCELLED', 'cancel');
t/upstream/CAPI/003_Tensor.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
use aliased 'AI::TensorFlow::Libtensorflow::Lib';
use aliased 'AI::TensorFlow::Libtensorflow::Tensor';
use AI::TensorFlow::Libtensorflow::DataType qw(FLOAT);
use FFI::Platypus::Buffer qw(window scalar_to_pointer);
use FFI::Platypus::Memory qw(memset free);
use AI::TensorFlow::Libtensorflow::Lib::_Alloc;
subtest "(CAPI, Tensor)" => sub {
my $n = 6;
t/upstream/CAPI/004_MalformedTensor.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
use aliased 'AI::TensorFlow::Libtensorflow::Tensor';
use AI::TensorFlow::Libtensorflow::DataType qw(FLOAT);
subtest "(CAPI, MalformedTensor)" => sub {
my $noop_dealloc = sub {};
my $t = Tensor->New(FLOAT, [], \undef, $noop_dealloc);
ok ! defined $t, 'No data passed in so no tensor created';
};
t/upstream/CAPI/005_AllocateTensor.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
use aliased 'AI::TensorFlow::Libtensorflow::Tensor';
use AI::TensorFlow::Libtensorflow::DataType qw(FLOAT);
subtest "(CAPI, AllocateTensor)" => sub {
my $num_bytes = 6 * FLOAT->Size;
my @dims = (2, 3);
my $t = Tensor->Allocate(FLOAT, \@dims, $num_bytes);
cmp_ok $t->Type, '==', FLOAT, 'a FLOAT TFTensor';
t/upstream/CAPI/006_MaybeMove.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
use aliased 'AI::TensorFlow::Libtensorflow::Tensor';
use AI::TensorFlow::Libtensorflow::DataType qw(FLOAT);
use FFI::Platypus::Buffer qw(window scalar_to_pointer);
use FFI::Platypus::Memory qw(memset free);
use AI::TensorFlow::Libtensorflow::Lib::_Alloc;
subtest "(CAPI, MaybeMove)" => sub {
my $num_bytes = 6 * FLOAT->Size;
window( my $values,
t/upstream/CAPI/007_LibraryLoadFunctions.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
subtest "(CAPI, LibraryLoadFunctions)" => sub {
my $todo = todo 'Test not implemented at this time. No library built to load.';
pass;
};
done_testing;
t/upstream/CAPI/008_TensorEncodeDecodeStrings.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
subtest "(CAPI, TensorEncodeDecodeStrings)" => sub {
my $todo = todo 'Test not implemented at this time. Upstream test uses C++ tensorflow::Tensor.';
pass;
};
done_testing;
t/upstream/CAPI/009_SessionOptions.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
use aliased 'AI::TensorFlow::Libtensorflow::SessionOptions';
subtest "(CAPI, SessionOptions)" => sub {
my $opt = SessionOptions->New;
ok $opt, 'created session options';
};
done_testing;
t/upstream/CAPI/010_DeprecatedSession.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
subtest "(CAPI, DeprecatedSession)" => sub {
my $todo = todo 'DeprecatedSession not implemented.';
pass;
};
done_testing;
t/upstream/CAPI/011_DataTypeEnum.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
subtest "(CAPI, DataTypeEnum)" => sub {
my $todo = todo 'Test not implemented. Casting between C++ and C DataType enum is not needed.';
pass;
};
done_testing;
t/upstream/CAPI/012_StatusEnum.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
subtest "(CAPI, StatusEnum)" => sub {
my $todo = todo 'Test not implemented. Casting between C++ and C Status enum is not needed.';
pass;
};
done_testing;
t/upstream/CAPI/013_GetAllOpList.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
subtest "(CAPI, GetAllOpList)" => sub {
my $buf = AI::TensorFlow::Libtensorflow::TFLibrary->GetAllOpList();
ok $buf;
};
done_testing;
t/upstream/CAPI/014_SetShape.t view on Meta::CPAN
#!/usr/bin/env perl
use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use TF_Utils;
use aliased 'AI::TensorFlow::Libtensorflow';
use aliased 'AI::TensorFlow::Libtensorflow::Graph';
use aliased 'AI::TensorFlow::Libtensorflow::Status';
use aliased 'AI::TensorFlow::Libtensorflow::Output';
use AI::TensorFlow::Libtensorflow::DataType qw(INT32);
subtest "(CAPI, SetShape)" => sub {
my $s = Status->New;
my $graph = Graph->New;
view all matches for this distributionview release on metacpan - search on metacpan