def test_DTNNEmbedding_pickle():
  tg = TensorGraph()
  atom_numbers = Feature(shape=(None, 23), dtype=tf.int32)
  Embedding = DTNNEmbedding(in_layers=[atom_numbers])
  tg.add_output(Embedding)
  tg.set_loss(Embedding)
  tg.build()
  tg.save()
def test_CombineMeanStd_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = CombineMeanStd(in_layers=[feature, feature])
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_LSTM_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 10, 10))
  layer = LSTM(n_hidden=10, batch_size=tg.batch_size, in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_Gather_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Gather(indices=[[0], [2], [3]], in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_DAGGather_pickle():
  tg = TensorGraph()
  atom_features = Feature(shape=(None, 30))
  membership = Feature(shape=(None,), dtype=tf.int32)
  Gather = DAGGather(in_layers=[atom_features, membership])
  tg.add_output(Gather)
  tg.set_loss(Gather)
  tg.build()
  tg.save()
def testGraphCNNPoolLayer_pickle():
  V = Feature(shape=(None, 200, 50))
  A = Feature(shape=(None, 200, 1, 200))
  gcnnpool = GraphEmbedPoolLayer(32, in_layers=[V, A])
  tg = TensorGraph()
  tg.add_output(gcnnpool)
  tg.set_loss(gcnnpool)
  tg.build()
  tg.save()
def test_Exp_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Exp(feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_Repeat_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Repeat(n_times=10, in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_DTNNExtract_pickle():
  tg = TensorGraph()
  atom_features = Feature(shape=(None, 30))
  Ext = DTNNExtract(0, in_layers=[atom_features])
  tg.add_output(Ext)
  tg.set_loss(Ext)
  tg.build()
  tg.save()
def test_BatchNorm_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 10))
  layer = BatchNorm(in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_SigmoidCrossEntropy_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = SigmoidCrossEntropy(in_layers=[feature, feature])
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_ToFloat_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = ToFloat(in_layers=[feature])
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_Constant_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Constant(np.array([15.0]))
  output = Add(in_layers=[feature, layer])
  tg.add_output(output)
  tg.set_loss(output)
  tg.build()
  tg.save()
def test_SetGather_pickle():
  tg = TensorGraph()
  atom_feature = Feature(shape=(None, 100))
  atom_split = Feature(shape=(None,), dtype=tf.int32)
  Gather = SetGather(5, 16, in_layers=[atom_feature, atom_split])
  tg.add_output(Gather)
  tg.set_loss(Gather)
  tg.build()
  tg.save()
def test_Reshape_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Reshape(shape=(None, 2), in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_WeightedError_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 10))
  layer = WeightedError(in_layers=[feature, feature])
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_Conv3DTranspose_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 10, 10, 10, 1))
  layer = Conv3DTranspose(num_outputs=3, in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_StopGradient_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  output = StopGradient(feature)
  tg.add_output(output)
  tg.set_loss(output)
  tg.build()
  tg.save()
Exemple #19
0
def test_Squeeze_pickle():
    tg = TensorGraph()
    feature = Feature(shape=(tg.batch_size, 1))
    layer = Squeeze(squeeze_dims=-1, in_layers=feature)
    tg.add_output(layer)
    tg.set_loss(layer)
    tg.build()
    tg.save()
Exemple #20
0
def test_Conv3D_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 10, 10, 10, 1))
  layer = Conv3D(num_outputs=3, in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #21
0
def test_Reshape_pickle():
    tg = TensorGraph()
    feature = Feature(shape=(tg.batch_size, 1))
    layer = Reshape(shape=(None, 2), in_layers=feature)
    tg.add_output(layer)
    tg.set_loss(layer)
    tg.build()
    tg.save()
Exemple #22
0
def test_hingeloss_pickle():
    tg = TensorGraph()
    feature = Feature(shape=(1, None))
    layer = Hingeloss(in_layers=[feature, feature])
    tg.add_output(layer)
    tg.set_loss(layer)
    tg.build()
    tg.save()
Exemple #23
0
def test_Dense_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  dense = Dense(out_channels=1, in_layers=feature)
  tg.add_output(dense)
  tg.set_loss(dense)
  tg.build()
  tg.save()
Exemple #24
0
def test_ToFloat_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = ToFloat(in_layers=[feature])
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #25
0
def test_ReduceSquareDifference_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = ReduceSquareDifference(in_layers=[feature, feature])
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_Cast_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Cast(in_layers=feature, dtype=tf.int32)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #27
0
def test_SigmoidCrossEntropy_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = SigmoidCrossEntropy(in_layers=[feature, feature])
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #28
0
def test_StopGradient_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  output = StopGradient(feature)
  tg.add_output(output)
  tg.set_loss(output)
  tg.build()
  tg.save()
Exemple #29
0
def test_Conv1D_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1, 1))
  conv = Conv1D(2, 1, in_layers=feature)
  tg.add_output(conv)
  tg.set_loss(conv)
  tg.build()
  tg.save()
Exemple #30
0
def test_Slice_pickle():
    V = Feature(shape=(None, 10))
    out = Slice(5, 1, in_layers=[V])
    tg = TensorGraph()
    tg.add_output(out)
    tg.set_loss(out)
    tg.build()
    tg.save()
Exemple #31
0
def test_DTNNEmbedding_pickle():
    tg = TensorGraph()
    atom_numbers = Feature(shape=(None, 23), dtype=tf.int32)
    Embedding = DTNNEmbedding(in_layers=[atom_numbers])
    tg.add_output(Embedding)
    tg.set_loss(Embedding)
    tg.build()
    tg.save()
Exemple #32
0
def test_LSTM_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 10, 10))
  layer = LSTM(n_hidden=10, batch_size=tg.batch_size, in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #33
0
def test_Sigmoid_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Sigmoid(in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #34
0
def test_Repeat_pickle():
    tg = TensorGraph()
    feature = Feature(shape=(tg.batch_size, 1))
    layer = Repeat(n_times=10, in_layers=feature)
    tg.add_output(layer)
    tg.set_loss(layer)
    tg.build()
    tg.save()
Exemple #35
0
def test_Gather_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Gather(indices=[[0], [2], [3]], in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #36
0
def test_Transpose_pickle():
    tg = TensorGraph()
    feature = Feature(shape=(tg.batch_size, 1))
    layer = Transpose(perm=(1, 0), in_layers=feature)
    tg.add_output(layer)
    tg.set_loss(layer)
    tg.build()
    tg.save()
Exemple #37
0
def test_CombineMeanStd_pickle():
    tg = TensorGraph()
    feature = Feature(shape=(tg.batch_size, 1))
    layer = CombineMeanStd(in_layers=[feature, feature])
    tg.add_output(layer)
    tg.set_loss(layer)
    tg.build()
    tg.save()
Exemple #38
0
def test_Exp_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Exp(feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
def test_Squeeze_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Squeeze(in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #40
0
def test_DTNNExtract_pickle():
    tg = TensorGraph()
    atom_features = Feature(shape=(None, 30))
    Ext = DTNNExtract(0, in_layers=[atom_features])
    tg.add_output(Ext)
    tg.set_loss(Ext)
    tg.build()
    tg.save()
Exemple #41
0
def test_Cast_pickle():
    tg = TensorGraph()
    feature = Feature(shape=(tg.batch_size, 1))
    layer = Cast(in_layers=feature, dtype=tf.int32)
    tg.add_output(layer)
    tg.set_loss(layer)
    tg.build()
    tg.save()
Exemple #42
0
def test_WeightedError_pickle():
    tg = TensorGraph()
    feature = Feature(shape=(tg.batch_size, 10))
    layer = WeightedError(in_layers=[feature, feature])
    tg.add_output(layer)
    tg.set_loss(layer)
    tg.build()
    tg.save()
Exemple #43
0
def test_BatchNorm_pickle():
    tg = TensorGraph()
    feature = Feature(shape=(tg.batch_size, 10))
    layer = BatchNorm(in_layers=feature)
    tg.add_output(layer)
    tg.set_loss(layer)
    tg.build()
    tg.save()
def test_Variable_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Variable(np.array([15.0]))
  output = Multiply(in_layers=[feature, layer])
  tg.add_output(output)
  tg.set_loss(output)
  tg.build()
  tg.save()
def test_SparseSoftmaxCrossEntropy_pickle():
  tg = TensorGraph()
  logits = Feature(shape=(tg.batch_size, 5))
  labels = Feature(shape=(tg.batch_size,), dtype=tf.int32)
  layer = SparseSoftMaxCrossEntropy(in_layers=[labels, logits])
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #46
0
def test_Constant_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Constant(np.array([15.0]))
  output = Add(in_layers=[feature, layer])
  tg.add_output(output)
  tg.set_loss(output)
  tg.build()
  tg.save()
Exemple #47
0
def test_SparseSoftmaxCrossEntropy_pickle():
    tg = TensorGraph()
    logits = Feature(shape=(tg.batch_size, 5))
    labels = Feature(shape=(tg.batch_size, ), dtype=tf.int32)
    layer = SparseSoftMaxCrossEntropy(in_layers=[labels, logits])
    tg.add_output(layer)
    tg.set_loss(layer)
    tg.build()
    tg.save()
Exemple #48
0
def test_Variable_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Variable(np.array([15.0]))
  output = Multiply(in_layers=[feature, layer])
  tg.add_output(output)
  tg.set_loss(output)
  tg.build()
  tg.save()
def testGraphCNN_pickle():
  V = Feature(shape=(None, 200, 50))
  A = Feature(shape=(None, 200, 1, 200))
  gcnn = GraphCNN(32, in_layers=[V, A])
  tg = TensorGraph()
  tg.add_output(gcnn)
  tg.set_loss(gcnn)
  tg.build()
  tg.save()
Exemple #50
0
def testGraphCNNPoolLayer_pickle():
  V = Feature(shape=(None, 200, 50))
  A = Feature(shape=(None, 200, 1, 200))
  gcnnpool = GraphEmbedPoolLayer(32, in_layers=[V, A])
  tg = TensorGraph()
  tg.add_output(gcnnpool)
  tg.set_loss(gcnnpool)
  tg.build()
  tg.save()
Exemple #51
0
def test_SetGather_pickle():
  tg = TensorGraph()
  atom_feature = Feature(shape=(None, 100))
  atom_split = Feature(shape=(None,), dtype=tf.int32)
  Gather = SetGather(5, 16, in_layers=[atom_feature, atom_split])
  tg.add_output(Gather)
  tg.set_loss(Gather)
  tg.build()
  tg.save()
Exemple #52
0
def testGraphCNN_pickle():
  V = Feature(shape=(None, 200, 50))
  A = Feature(shape=(None, 200, 1, 200))
  gcnn = GraphCNN(32, in_layers=[V, A])
  tg = TensorGraph()
  tg.add_output(gcnn)
  tg.set_loss(gcnn)
  tg.build()
  tg.save()
Exemple #53
0
def test_DAGGather_pickle():
  tg = TensorGraph()
  atom_features = Feature(shape=(None, 30))
  membership = Feature(shape=(None,), dtype=tf.int32)
  Gather = DAGGather(in_layers=[atom_features, membership])
  tg.add_output(Gather)
  tg.set_loss(Gather)
  tg.build()
  tg.save()
def test_MP_pickle():
  tg = TensorGraph()
  atom_feature = Feature(shape=(None, 75))
  pair_feature = Feature(shape=(None, 14))
  atom_to_pair = Feature(shape=(None, 2), dtype=tf.int32)
  MP = MessagePassing(5, in_layers=[atom_feature, pair_feature, atom_to_pair])
  tg.add_output(MP)
  tg.set_loss(MP)
  tg.build()
  tg.save()
Exemple #55
-1
def test_ReduceSquareDifference_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = ReduceSquareDifference(in_layers=[feature, feature])
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #56
-1
def test_Slice_pickle():
  V = Feature(shape=(None, 10))
  out = Slice(5, 1, in_layers=[V])
  tg = TensorGraph()
  tg.add_output(out)
  tg.set_loss(out)
  tg.build()
  tg.save()
Exemple #57
-1
def test_hingeloss_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(1, None))
  layer = HingeLoss(in_layers=[feature, feature])
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #58
-1
def test_Transpose_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  layer = Transpose(perm=(1, 0), in_layers=feature)
  tg.add_output(layer)
  tg.set_loss(layer)
  tg.build()
  tg.save()
Exemple #59
-1
def test_Dense_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1))
  dense = Dense(out_channels=1, in_layers=feature)
  tg.add_output(dense)
  tg.set_loss(dense)
  tg.build()
  tg.save()
Exemple #60
-1
def test_Conv1D_pickle():
  tg = TensorGraph()
  feature = Feature(shape=(tg.batch_size, 1, 1))
  conv = Conv1D(2, 1, in_layers=feature)
  tg.add_output(conv)
  tg.set_loss(conv)
  tg.build()
  tg.save()