This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import numpy as np | |
## save to a file | |
## need to use the same shape and dtype when restore | |
W = tf.Variable([[1,2,3],[3,4,5]], dtype=tf.float32, name='W') | |
b = tf.Variable([[1,2,3]],dtype=tf.float32, name='b') | |
# initialization | |
init = tf.global_variables_initializer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using Microsoft.Research.Naiad; | |
using Microsoft.Research.Naiad.Dataflow; | |
using Microsoft.Research.Naiad.Dataflow.StandardVertices; | |
namespace Frameworks.Threshold | |
{ | |
public static class ExtensionMethods | |
{ | |
class ThresholdVertex<TRecord, TTime> : UnaryVertex<TRecord, TRecord, TTime> where TTime : Time<TTime> |