#!/usr/bin/env ruby require "bundler/setup" require "tensor_stream" require "tensor_stream/utils/freezer" if ARGV[0].nil? puts "source checkpoint folder not specified" puts "usage: model_utils " puts "example: model_utils sample_model/ frozen.yml" exit(1) end if ARGV[1].nil? puts "dest YAML file for frozen model not specified" puts "usage: model_utils " puts "example: model_utils sample_model/ frozen.yml" exit(1) end sess = TensorStream.session freezer = TensorStream::Freezer.new freezer.convert(sess, ARGV[0], ARGV[1]) exit(0)