FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TensorFlow.NET/src/TensorFlowNET.Core/Data/PrefetchDataset.cs at master · ehtick/TensorFlow.NET · GitHub
ehtick
/
TensorFlow.NET
Public
forked from
SciSharp/TensorFlow.NET
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
TensorFlow.NET
/
src
/
TensorFlowNET.Core
/
Data
/
PrefetchDataset.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (22 loc) · 806 Bytes
Breadcrumbs
TensorFlow.NET
/
src
/
TensorFlowNET.Core
/
Data
/
PrefetchDataset.cs
Copy path
File metadata and controls
24 lines (22 loc) · 806 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using
static
Tensorflow
.
Binding
;
namespace
Tensorflow
{
/// <summary>
/// Creates a `Dataset` that prefetches elements from this dataset.
/// </summary>
public
class
PrefetchDataset
:
UnaryUnchangedStructureDataset
{
public
PrefetchDataset
(
IDatasetV2
input_dataset
,
long
buffer_size
=
-
1
,
int
?
slack_period
=
null
)
:
base
(
input_dataset
)
{
var
buffer_size_tensor
=
tf
.
convert_to_tensor
(
buffer_size
,
dtype
:
TF_DataType
.
TF_INT64
,
name
:
"buffer_size"
)
;
variant_tensor
=
ops
.
prefetch_dataset
(
input_dataset
.
variant_tensor
,
buffer_size_tensor
,
input_dataset
.
output_types
,
input_dataset
.
output_shapes
,
slack_period
:
slack_period
)
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL