deepmd.tf.nvnmd.utils
Submodules
Package Contents
Classes
Encoding value as hex, bin, and dec format. | |
Input and output for binary file. | |
Input and output for dict class data | |
Input and output for .txt file with string. |
Functions
| Build one layer with continuous or quantized value. |
| Mapping function implemented by numpy. |
| Get weight and bias of embedding network. |
| Get weight and bias of fitting network. |
Attributes
- class deepmd.tf.nvnmd.utils.Encode[source]
Encoding value as hex, bin, and dec format.
- byte2hex(bs, nbyte)[source]
Convert byte into hex bs: low byte in the first hex: low byte in the right.
- check_dec(idec, nbit, signed=False, name='')[source]
Check whether the data (idec) is in the range range is \([0, 2^nbit-1]\) for unsigned range is \([-2^{nbit-1}, 2^{nbit-1}-1]\) for signed.
- extend_list(slbin, nfull)[source]
Extend the list (slbin) to the length (nfull) the attched element of list is 0.
such as, when
slbin = [‘10010’,’10100’],nfull = 4extent it to
[‘10010’,’10100’,’00000’,’00000]
- class deepmd.tf.nvnmd.utils.FioDic[source]
Input and output for dict class data the file can be .json or .npy file containing a dictionary.
- deepmd.tf.nvnmd.utils.one_layer(inputs, outputs_size, activation_fn=tf.nn.tanh, precision=GLOBAL_TF_FLOAT_PRECISION, stddev=1.0, bavg=0.0, name='linear', reuse=None, seed=None, use_timestep=False, trainable=True, useBN=False, uniform_seed=False, initial_variables=None, mixed_prec=None, final_layer=False)[source]
Build one layer with continuous or quantized value. Its weight and bias can be initialed with random or constant value.
- deepmd.tf.nvnmd.utils.map_nvnmd(x, map_y, map_dy, prec, nbit=None)[source]
Mapping function implemented by numpy.
- deepmd.tf.nvnmd.utils.get_filter_weight(weights: int, spe_j: int, layer_l: int)[source]
Get weight and bias of embedding network.