{"id":56001,"date":"2025-02-22T10:04:15","date_gmt":"2025-02-22T02:04:15","guid":{"rendered":"https:\/\/fwq.ai\/blog\/56001\/"},"modified":"2025-02-22T10:04:15","modified_gmt":"2025-02-22T02:04:15","slug":"%e4%bb%a3%e7%a0%81%e8%a7%a3%e9%87%8a_it%e4%b8%93%e7%94%a8prompt-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/56001\/","title":{"rendered":"\u4ee3\u7801\u89e3\u91ca_IT\u4e13\u7528Prompt"},"content":{"rendered":"<h1><\/h1>\n<h3>\u6307\u4ee4\u683c\u5f0f<\/h3>\n<p>\u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u4ee3\u7801\u7f16\u8bd1\u5668\uff0c\u89e3\u91ca\u4ee5\u4e0b\u4ee3\u7801\u7247\u6bb5\u7684\u4f5c\u7528\uff0c\u5e76\u8f93\u51fa\u6267\u884c\u7ed3\u679c \u2014\u2014<\/p>\n<p> <\/p>\n<p><strong>&lt;font color=&#8221;#0000dd&#8221;&gt;Python \u4ee3\u7801\u7247\u6bb5<\/strong><\/p>\n<h3>\u6307\u4ee4\u793a\u4f8b<\/h3>\n<p>\u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u4ee3\u7801\u7f16\u8bd1\u5668\uff0c\u89e3\u91ca\u4ee5\u4e0b\u4ee3\u7801\u7247\u6bb5\u7684\u4f5c\u7528 \u2014\u2014<\/p>\n<p>import cv2<br \/> import numpy as np<br \/> import matplotlib.pyplot as plt<br \/> img = cv2.imread(data_path + &#8216;kxcy.jpg&#8217;)<br \/> plt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))<br \/> plt.show()<br \/> emboss_kernel = np.array([[-1, 0, 0],<br \/> [0, 0, 0],<br \/> [0, 0, 1]])<br \/> emboss_img = cv2.filter2D(src=img, ddepth=-1, kernel=emboss_kernel)<br \/> plt.imshow(emboss_img)<br \/> plt.show()<\/p>\n<h1>\u4ee3\u7801\u81ea\u52a8\u6ce8\u91ca<\/h1>\n<h3>\u6307\u4ee4\u683c\u5f0f<\/h3>\n<p>\u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u673a\u5668\u5b66\u4e60\u5de5\u7a0b\u5e08\uff0c\u5bf9\u4e0b\u9762\u7684\u4ee3\u7801\u7247\u6bb5\u52a0\u5165\u4ee3\u7801\u6ce8\u91ca \u2014\u2014<\/p>\n<p>**Python \u4ee3\u7801\u7247\u6bb5<\/p>\n<h3>\u6307\u4ee4\u793a\u4f8b<\/h3>\n<p>\u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u673a\u5668\u5b66\u4e60\u5de5\u7a0b\u5e08\uff0c\u5bf9\u4e0b\u9762\u7684\u4ee3\u7801\u7247\u6bb5\u52a0\u5165\u4ee3\u7801\u6ce8\u91ca \u2014\u2014<\/p>\n<p>import numpy as np<br \/> import matplotlib.pyplot as plt<br \/> %matplotlib inline<br \/> def relu(x):<br \/> return np.where(x &lt; 0, 0, x)<br \/> relu_inputs = np.arange(-10,10,0.1)<br \/> relu_outputs = relu(relu_inputs)<br \/> plt.plot(relu_inputs,relu_outputs)<br \/> plt.xlabel(&#8220;relu Inputs&#8221;)<br \/> plt.ylabel(&#8220;relu Outputs&#8221;)<br \/> plt.show()<\/p>\n<h1>\u4ee3\u7801\u81ea\u52a8\u6ce8\u91ca<\/h1>\n<h3>\u6307\u4ee4\u683c\u5f0f<\/h3>\n<p>\u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u8f6f\u4ef6\u5de5\u7a0b\u5e08\uff0c\u4e3a\u4e0b\u9762\u7684&nbsp;<strong>[\u51fd\u6570\u540d\u79f0]<\/strong>&nbsp;\u51fd\u6570\u751f\u6210\u8bf4\u660e\u6587\u6863 \u2014\u2014<\/p>\n<p><strong>\u51fd\u6570\u4ee3\u7801<\/strong><\/p>\n<h3>\u6307\u4ee4\u793a\u4f8b<\/h3>\n<p>\u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u8f6f\u4ef6\u5de5\u7a0b\u5e08\uff0c\u4e3a\u4e0b\u9762\u7684 [init_network] \u51fd\u6570\u751f\u6210\u8bf4\u660e\u6587\u6863 \u2014\u2014<\/p>\n<p>def init_network():<br \/> network = {}<br \/> network[&#8216;W1&#8217;] = np.array(0.1, 0.3, 0.5], [0.2, 0.4, 0.6)<br \/> network[&#8216;b1&#8217;] = np.array([0.1, 0.2, 0.3])<br \/> network[&#8216;W2&#8217;] = np.array(0.1, 0.4], [0.2, 0.5], [0.3, 0.6)<br \/> network[&#8216;b2&#8217;] = np.array([0.1, 0.2])<br \/> network[&#8216;W3&#8217;] = np.array(0.1, 0.3], [0.2, 0.4)<br \/> network[&#8216;b3&#8217;] = np.array([0.1, 0.2])<br \/> return network<\/p>\n<h1>\u63d0\u9ad8\u4ee3\u7801\u53ef\u8bfb\u6027<\/h1>\n<h3>\u6307\u4ee4\u683c\u5f0f<\/h3>\n<p>\u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u8f6f\u4ef6\u5de5\u7a0b\u5e08\uff0c\u4f18\u5316\u4e0b\u5217\u4ee3\u7801\u7684\u53ef\u8bfb\u6027 \u2014\u2014 \u2014\u2014<\/p>\n<p><strong>Python \u4ee3\u7801<\/strong><\/p>\n<h3>\u6307\u4ee4\u793a\u4f8b<\/h3>\n<p>\u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u8f6f\u4ef6\u5de5\u7a0b\u5e08\uff0c\u4f18\u5316\u4e0b\u5217\u4ee3\u7801\u7684\u53ef\u8bfb\u6027 \u2014\u2014<\/p>\n<p>def list(a,b):<br \/> randomCamelCase = a<br \/> randon_snake_case = b<br \/> return [randomCanmlCase, random_snake_case] <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6307\u4ee4\u683c\u5f0f \u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u4ee3\u7801\u7f16\u8bd1\u5668\uff0c\u89e3\u91ca\u4ee5\u4e0b\u4ee3\u7801\u7247\u6bb5\u7684\u4f5c\u7528\uff0c\u5e76\u8f93\u51fa\u6267\u884c\u7ed3\u679c \u2014\u2014 &lt;font color=&#8221;#0000dd&#8221;&gt;Python \u4ee3\u7801\u7247\u6bb5 \u6307\u4ee4\u793a\u4f8b \u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u4ee3\u7801\u7f16\u8bd1\u5668\uff0c\u89e3\u91ca\u4ee5\u4e0b\u4ee3\u7801\u7247\u6bb5\u7684\u4f5c\u7528 \u2014\u2014 import cv2 import numpy as np import matplotlib.pyplot as plt img = cv2.imread(data_path + &#8216;kxcy.jpg&#8217;) plt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB)) plt.show() emboss_kernel = np.array([[-1, 0, 0], [0, 0, 0], [0, 0, 1]]) emboss_img = cv2.filter2D(src=img, ddepth=-1, kernel=emboss_kernel) plt.imshow(emboss_img) plt.show() \u4ee3\u7801\u81ea\u52a8\u6ce8\u91ca \u6307\u4ee4\u683c\u5f0f \u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u673a\u5668\u5b66\u4e60\u5de5\u7a0b\u5e08\uff0c\u5bf9\u4e0b\u9762\u7684\u4ee3\u7801\u7247\u6bb5\u52a0\u5165\u4ee3\u7801\u6ce8\u91ca \u2014\u2014 **Python \u4ee3\u7801\u7247\u6bb5 \u6307\u4ee4\u793a\u4f8b \u8bf7\u4f5c\u4e3a\u4e00\u4e2a\u673a\u5668\u5b66\u4e60\u5de5\u7a0b\u5e08\uff0c\u5bf9\u4e0b\u9762\u7684\u4ee3\u7801\u7247\u6bb5\u52a0\u5165\u4ee3\u7801\u6ce8\u91ca \u2014\u2014 import [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-56001","post","type-post","status-publish","format-standard","hentry","category-ai"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/56001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=56001"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/56001\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=56001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=56001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=56001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}