nodes
nodes
¤
TorchBinaryParameterOp
¤
Bases: TorchParameterOp, ABC
Source code in cirkit/backend/torch/parameters/nodes.py
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
config
property
¤
in_shape1
property
¤
in_shape2
property
¤
__call__(x1, x2)
¤
Get the reparameterized parameters.
Returns:
| Name | Type | Description |
|---|---|---|
Tensor |
Tensor
|
The parameters after reparameterization. |
Source code in cirkit/backend/torch/parameters/nodes.py
363 364 365 366 367 368 369 370 | |
__init__(in_shape1, in_shape2, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
344 345 346 347 | |
forward(x1, x2)
abstractmethod
¤
Source code in cirkit/backend/torch/parameters/nodes.py
372 373 374 | |
TorchClampParameter
¤
Bases: TorchEntrywiseParameterOp
Exp reparameterization.
Source code in cirkit/backend/torch/parameters/nodes.py
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 | |
config
property
¤
vmax = vmax
instance-attribute
¤
vmin = vmin
instance-attribute
¤
__init__(in_shape, vmin=None, vmax=None, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
656 657 658 659 660 661 662 663 664 665 666 667 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
678 679 | |
TorchConjugateParameter
¤
Bases: TorchEntrywiseParameterOp
Conjugate parameterization.
Source code in cirkit/backend/torch/parameters/nodes.py
682 683 684 685 686 687 688 689 | |
__init__(in_shape, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
685 686 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
688 689 | |
TorchEntrywiseParameterOp
¤
Bases: TorchUnaryParameterOp, ABC
Source code in cirkit/backend/torch/parameters/nodes.py
377 378 379 380 | |
shape
property
¤
TorchEntrywiseReduceParameterOp
¤
Bases: TorchEntrywiseParameterOp, ABC
The base class for normalized reparameterization.
Source code in cirkit/backend/torch/parameters/nodes.py
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | |
config
property
¤
dim = dim
instance-attribute
¤
__init__(in_shape, *, dim=-1, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
416 417 418 419 420 421 422 423 424 425 426 | |
TorchExpParameter
¤
Bases: TorchEntrywiseParameterOp
Exp reparameterization.
Source code in cirkit/backend/torch/parameters/nodes.py
607 608 609 610 611 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
610 611 | |
TorchFlattenParameter
¤
Bases: TorchUnaryParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | |
config
property
¤
end_dim = end_dim
instance-attribute
¤
shape
cached
property
¤
start_dim = start_dim
instance-attribute
¤
__init__(in_shape, num_folds=1, start_dim=0, end_dim=-1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
782 783 | |
TorchGaussianProductLogPartition
¤
Bases: TorchParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | |
_log_two_pi = np.log(2.0 * np.pi)
instance-attribute
¤
config
property
¤
shape
property
¤
__init__(in_mean1_shape, in_stddev1_shape, in_mean2_shape, in_stddev2_shape, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 | |
forward(mean1, stddev1, mean2, stddev2)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
916 917 918 919 920 921 922 923 924 925 926 927 928 929 | |
TorchGaussianProductMean
¤
Bases: TorchParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | |
config
property
¤
shape
property
¤
__init__(in_mean1_shape, in_stddev1_shape, in_mean2_shape, in_stddev2_shape, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 | |
forward(mean1, stddev1, mean2, stddev2)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
838 839 840 841 842 843 844 845 846 847 | |
TorchGaussianProductStddev
¤
Bases: TorchBinaryParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 | |
config
property
¤
shape
property
¤
__init__(in_stddev1_shape, in_stddev2_shape, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
851 852 853 854 855 856 857 858 859 | |
forward(stddev1, stddev2)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
872 873 874 875 876 877 878 | |
TorchHadamardParameter
¤
Bases: TorchBinaryParameterOp
Hadamard product reparameterization.
Source code in cirkit/backend/torch/parameters/nodes.py
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 | |
shape
property
¤
__init__(in_shape1, in_shape2, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
493 494 495 496 497 | |
forward(x1, x2)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
503 504 | |
TorchIndexParameter
¤
Bases: TorchUnaryParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 | |
config
property
¤
dim = dim
instance-attribute
¤
indices
property
¤
shape
property
¤
__init__(in_shape, indices, dim=-1, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
471 472 | |
TorchKroneckerParameter
¤
Bases: TorchBinaryParameterOp
Kronecker product reparameterization.
Source code in cirkit/backend/torch/parameters/nodes.py
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 | |
_batched_kron = torch.vmap(torch.kron)
instance-attribute
¤
shape
cached
property
¤
__init__(in_shape1, in_shape2, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
510 511 512 513 514 515 | |
forward(x1, x2)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
521 522 | |
TorchLogParameter
¤
Bases: TorchEntrywiseParameterOp
Log reparameterization.
Source code in cirkit/backend/torch/parameters/nodes.py
614 615 616 617 618 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
617 618 | |
TorchLogSoftmaxParameter
¤
Bases: TorchEntrywiseReduceParameterOp
Log-Softmax reparameterization.
Range: (-inf, 0). Constraints: logsumexp is 0.
Source code in cirkit/backend/torch/parameters/nodes.py
718 719 720 721 722 723 724 725 726 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
725 726 | |
TorchMatMulParameter
¤
Bases: TorchBinaryParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 | |
shape
property
¤
__init__(in_shape1, in_shape2, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
730 731 732 733 734 735 | |
forward(x1, x2)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
741 742 743 744 | |
TorchMixingWeightParameter
¤
Bases: TorchUnaryParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 | |
shape
property
¤
__init__(in_shape, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
787 788 789 790 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
796 797 798 799 800 801 | |
TorchOuterProductParameter
¤
Bases: TorchBinaryParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 | |
config
property
¤
dim = dim
instance-attribute
¤
shape
property
¤
__init__(in_shape1, in_shape2, dim=-1, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | |
forward(x1, x2)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
556 557 558 559 560 561 562 563 | |
TorchOuterSumParameter
¤
Bases: TorchBinaryParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | |
config
property
¤
dim = dim
instance-attribute
¤
shape
property
¤
__init__(in_shape1, in_shape2, *, num_folds=1, dim=-1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | |
forward(x1, x2)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
597 598 599 600 601 602 603 604 | |
TorchParameterInput
¤
Bases: TorchParameterNode, ABC
The torch parameter input node. A parameter input is a parameter node in the computational graph that comptues parameter that does not have inputs. See TorchParameter for more details.
Source code in cirkit/backend/torch/parameters/nodes.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
__call__()
¤
Source code in cirkit/backend/torch/parameters/nodes.py
69 70 71 | |
extra_repr()
¤
Source code in cirkit/backend/torch/parameters/nodes.py
73 74 | |
forward()
abstractmethod
¤
Evaluate a torch parameter input node.
Returns:
| Name | Type | Description |
|---|---|---|
Tensor |
Tensor
|
A tensor of shape \((F,K_1,\ldots,K_n)\), where \(F\) is the number of folds, and |
Tensor
|
\((K_1,\ldots,K_n)\) is the shape of the tensors within each fold. |
Source code in cirkit/backend/torch/parameters/nodes.py
76 77 78 79 80 81 82 83 | |
TorchParameterNode
¤
Bases: AbstractTorchModule, ABC
The abstract parameter node class. A parameter node is a node in the computational graph that computes parameters. See TorchParameter for more details.
Source code in cirkit/backend/torch/parameters/nodes.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
config
property
¤
Retrieves the configuration of the parameter node, i.e., a dictionary mapping
hyperparameters of the parameter node to their values. The hyperparameter names must
match the argument names in the __init__ method.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dict[str, Any]: A dictionary from hyperparameter names to their value. |
fold_settings
property
¤
shape
abstractmethod
property
¤
sub_modules
property
¤
__init__(*, num_folds=1)
¤
Initialize a torch parameter node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_folds
|
int
|
The number of folds computed by the node. |
1
|
Source code in cirkit/backend/torch/parameters/nodes.py
19 20 21 22 23 24 25 | |
reset_parameters()
¤
Source code in cirkit/backend/torch/parameters/nodes.py
58 59 60 | |
TorchParameterOp
¤
Bases: TorchParameterNode, ABC
Source code in cirkit/backend/torch/parameters/nodes.py
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | |
_in_shapes = in_shapes
instance-attribute
¤
config
property
¤
in_shapes
property
¤
__call__(*xs)
¤
Get the reparameterized parameters.
Returns:
| Name | Type | Description |
|---|---|---|
Tensor |
Tensor
|
The parameters after reparameterization. |
Source code in cirkit/backend/torch/parameters/nodes.py
295 296 297 298 299 300 301 302 | |
__init__(*in_shapes, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
283 284 285 | |
extra_repr()
¤
Source code in cirkit/backend/torch/parameters/nodes.py
304 305 306 307 308 309 | |
forward(*xs)
abstractmethod
¤
Source code in cirkit/backend/torch/parameters/nodes.py
311 312 313 | |
TorchPointerParameter
¤
Bases: TorchParameterInput
Source code in cirkit/backend/torch/parameters/nodes.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | |
_parameter = parameter
instance-attribute
¤
config
property
¤
fold_idx
property
¤
shape
property
¤
The shape of the output parameter.
__init__(parameter, *, fold_idx=None)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |
deref()
¤
Source code in cirkit/backend/torch/parameters/nodes.py
272 273 | |
forward()
¤
Source code in cirkit/backend/torch/parameters/nodes.py
275 276 277 278 279 | |
TorchPolynomialDifferential
¤
Bases: TorchUnaryParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 | |
order = order
instance-attribute
¤
shape
property
¤
__init__(in_shape, *, num_folds=1, order=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
967 968 969 970 971 | |
_diff_once(x)
classmethod
¤
Source code in cirkit/backend/torch/parameters/nodes.py
981 982 983 984 985 | |
forward(coeff)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
987 988 989 990 991 992 993 | |
TorchPolynomialProduct
¤
Bases: TorchBinaryParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 | |
shape
property
¤
forward(coeff1, coeff2)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 | |
TorchReduceLSEParameter
¤
Bases: TorchReduceParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
702 703 704 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
703 704 | |
TorchReduceParameterOp
¤
Bases: TorchUnaryParameterOp, ABC
The base class for normalized reparameterization.
Source code in cirkit/backend/torch/parameters/nodes.py
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | |
config
property
¤
dim = dim
instance-attribute
¤
shape
property
¤
__init__(in_shape, dim=-1, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
388 389 390 391 392 393 394 395 396 397 398 | |
TorchReduceProductParameter
¤
Bases: TorchReduceParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
697 698 699 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
698 699 | |
TorchReduceSumParameter
¤
Bases: TorchReduceParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
692 693 694 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
693 694 | |
TorchScaledSigmoidParameter
¤
Bases: TorchEntrywiseParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | |
config
property
¤
vmax = vmax
instance-attribute
¤
vmin = vmin
instance-attribute
¤
__init__(in_shape, vmin, vmax, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
634 635 636 637 638 639 640 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
649 650 | |
TorchSigmoidParameter
¤
Bases: TorchEntrywiseParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
628 629 630 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
629 630 | |
TorchSoftmaxParameter
¤
Bases: TorchEntrywiseReduceParameterOp
Softmax reparameterization.
Range: (0, 1), 0 available if input is masked, 1 available when only one element valid. Constraints: sum to 1.
Source code in cirkit/backend/torch/parameters/nodes.py
707 708 709 710 711 712 713 714 715 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
714 715 | |
TorchSquareParameter
¤
Bases: TorchEntrywiseParameterOp
Square reparameterization.
Source code in cirkit/backend/torch/parameters/nodes.py
621 622 623 624 625 | |
forward(x)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
624 625 | |
TorchSumParameter
¤
Bases: TorchBinaryParameterOp
Source code in cirkit/backend/torch/parameters/nodes.py
475 476 477 478 479 480 481 482 483 484 485 486 487 | |
shape
property
¤
__init__(in_shape1, in_shape2, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
476 477 478 479 480 | |
forward(x1, x2)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
486 487 | |
TorchTensorParameter
¤
Bases: TorchParameterInput
A torch tensor parameter is a TorchParameterInput that stores a torch.nn.parameter.Parameter object.
Source code in cirkit/backend/torch/parameters/nodes.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | |
_dtype = dtype
instance-attribute
¤
_initializer_ = nn.init.normal_ if initializer_ is None else initializer_
instance-attribute
¤
_ptensor = None
instance-attribute
¤
_requires_grad = requires_grad
instance-attribute
¤
_shape = shape
instance-attribute
¤
config
property
¤
device
property
¤
Retrieve the device of the parameter.
Returns:
| Type | Description |
|---|---|
device
|
torch.device: The parameter device. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the parameter has not been initialized. See the reset_parameters method. |
dtype
property
¤
Retrieve the data type of the parameter.
Returns:
| Type | Description |
|---|---|
dtype
|
torch.dtype: The parameter data type. |
fold_settings
property
¤
initializer
property
¤
requires_grad
property
writable
¤
Retrieve whether the torch parameter requires gradients.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if it requires gradients, False otherwise. |
shape
property
¤
__init__(*shape, requires_grad=True, dtype=None, initializer_=None, num_folds=1)
¤
Initializes a torch tensor parameter. Given a shape \((K_1,\ldots,K_n)\) and a number of folds \(F\), it eventually materializes a torch parameter of shape \((F,K_1,\ldots,K_n)\).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*shape
|
int
|
The shape of the tensor parameter folds \((K_1,\ldots,K_n)\). |
()
|
requires_grad
|
bool
|
Whether the parameter requires the computation of gradients. |
True
|
dtype
|
dtype | None
|
The data type of the parameter. If it is None, then it defaults to the current default torch data type, i.e., it is given by torch.get_default_dtype. |
None
|
initializer_
|
Callable[[Tensor], Tensor] | None
|
The in-place initializer used to initialize the tensor parameter. It is a callable with only a tensor as input. If it is None, then it defaults to sampling from a standard normal distribution, i.e., torch.nn.init.normal_. |
None
|
num_folds
|
int
|
The number of folds \(F\). |
1
|
Source code in cirkit/backend/torch/parameters/nodes.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
forward()
¤
Evaluate a torch parameter input node.
Returns:
| Name | Type | Description |
|---|---|---|
Tensor |
Tensor
|
A tensor of shape \((F,K_1,\ldots,K_n)\), where \(F\) is the number of folds, and |
Tensor
|
\((K_1,\ldots,K_n)\) is the shape of the tensors within each fold. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the parameter has not been initialized. See the reset_parameters method. |
Source code in cirkit/backend/torch/parameters/nodes.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | |
reset_parameters()
¤
Allocate and initialize the torch tensor parameter. If the tensor has already been allocated, then this function simply call the initializer to reset the parameter values.
Source code in cirkit/backend/torch/parameters/nodes.py
197 198 199 200 201 202 203 204 205 206 207 208 209 | |
TorchUnaryParameterOp
¤
Bases: TorchParameterOp, ABC
Source code in cirkit/backend/torch/parameters/nodes.py
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
config
property
¤
in_shape
property
¤
__call__(x)
¤
Get the reparameterized parameters.
Returns:
| Name | Type | Description |
|---|---|---|
Tensor |
Tensor
|
The parameters after reparameterization. |
Source code in cirkit/backend/torch/parameters/nodes.py
329 330 331 332 333 334 335 336 | |
__init__(in_shape, *, num_folds=1)
¤
Source code in cirkit/backend/torch/parameters/nodes.py
317 318 | |
forward(x)
abstractmethod
¤
Source code in cirkit/backend/torch/parameters/nodes.py
338 339 340 | |