Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
xerus
xerus
Commits
584e371c
Commit
584e371c
authored
Jan 04, 2021
by
Philipp Trunschke
Browse files
bugfix
parent
325e579a
Pipeline
#2153
failed with stages
in 4 minutes and 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/xerus/python/ttnetwork.cpp
View file @
584e371c
...
...
@@ -3,7 +3,7 @@
void
expose_ttnetwork
(
module
&
m
)
{
class_
<
TTTensor
,
TensorNetwork
>
(
m
,
"TTTensor"
)
.
def
(
pickle
(
[](
const
TTTensor
&
_self
)
{
// __getstate__
[](
const
TTTensor
&
_self
)
{
// __getstate__
return
bytes
(
misc
::
serialize
(
_self
));
},
[](
bytes
_bytes
)
{
// __setstate__
...
...
@@ -11,7 +11,7 @@ void expose_ttnetwork(module& m) {
}
))
.
def
(
init
<>
(),
"constructs an empty TTTensor"
)
.
def
(
init
<
const
TTTensor
&>
())
.
def
(
init
<
const
TTTensor
&>
())
.
def
(
init
<
const
Tensor
&>
())
.
def
(
init
<
const
Tensor
&
,
value_t
>
())
.
def
(
init
<
const
Tensor
&
,
value_t
,
size_t
>
())
...
...
@@ -80,11 +80,11 @@ void expose_ttnetwork(module& m) {
class_
<
TTOperator
,
TensorNetwork
>
(
m
,
"TTOperator"
)
.
def
(
pickle
(
[](
const
TT
Tensor
&
_self
)
{
// __getstate__
[](
const
TT
Operator
&
_self
)
{
// __getstate__
return
bytes
(
misc
::
serialize
(
_self
));
},
[](
bytes
_bytes
)
{
// __setstate__
return
misc
::
deserialize
<
TT
Tens
or
>
(
_bytes
);
return
misc
::
deserialize
<
TT
Operat
or
>
(
_bytes
);
}
))
.
def
(
init
<
const
Tensor
&>
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment