答案 0 :(得分:0)
我们无法自定义 Oracle Forms 的import os
import argparse
import tensorflow as tf
from tensorflow.python.framework import graph_util
from tensorflow.python.platform import gfile
def load_graph_def(model_path, sess=None):
if os.path.isfile(model_path):
with gfile.FastGFile(model_path, 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
tf.import_graph_def(graph_def, name='')
else:
sess = sess if sess is not None else tf.get_default_session()
saver = tf.train.import_meta_graph(model_path + '.meta')
saver.restore(sess, model_path)
def freeze_from_checkpoint(checkpoint_file, output_layer_name):
model_folder = os.path.basename(checkpoint_file)
output_graph = os.path.join(model_folder, checkpoint_file + '.pb')
with tf.Session() as sess:
load_graph_def(checkpoint_file)
graph = tf.get_default_graph()
input_graph_def = graph.as_graph_def()
print("Exporting graph...")
output_graph_def = graph_util.convert_variables_to_constants(
sess,
input_graph_def,
output_layer_name.split(","))
with tf.gfile.GFile(output_graph, "wb") as f:
f.write(output_graph_def.SerializeToString())
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('model_path')
parser.add_argument('output_layer')
args = parser.parse_args()
freeze_from_checkpoint(checkpoint_file=args.model_path, output_layer_name=args.output_layer)
,但我们可以用新的替换它。
为此目的(假设你有 Fusion Middleware 11g ):
运行 cmd.exe (在 Windows 上) 并键入(作为示例):
smart toolbar
你可能会发现很多 gif 。然后使用 -cvf 选项 jar.exe :
C:\Users\Ramiz.Tariq> cd C:\Oracle\Middleware\Oracle_FRHome1\ohs\icons
将新创建的 .jar 文件移至 jdk \ bin 目录。
C:\Oracle\Middleware\Oracle_FRHome1\ohs\icons> C:\Oracle\Middleware\Oracle_FRHome1\jdk\bin
\jar.exe -cvf myToolbar.jar *.gif
added manifest
adding: a.gif(in = 246) (out= 237)(deflated 3%)
adding: alert.black.gif(in = 242) (out= 233)(deflated 3%)
adding: alert.red.gif(in = 247) (out= 243)(deflated 1%)
adding: apache_pb.gif(in = 2326) (out= 1698)(deflated 26%)
.....
adding: forward.gif(in = 219) (out= 211)(deflated 3%)
.....
编辑 formsweb.cfg 文件,将这个新的 jar 文件引入 Forms :
将第C:\Oracle\Middleware\Oracle_FRHome1\ohs\icons>move myToolbar.jar
C:\Oracle\Middleware\Oracle_FRHome1\jdk\bin
行转换为archive=frmall.jar
,并且不要忘记保存它。
现在,您已准备好创建和自定义表单工具栏;
archive=frmall.jar, myToolbar.jar
转换为default&smartbar
。< / LI>
default
,Yes
定义为Icon Filename
,
forward.gif
等(您可以在此之前添加更多gif到此文件夹
创建 myToolbar.jar 文件)当你在下面跑步时,屏幕上会出现
( PENCERE 相当于我母语中的 WINDOW ):