{"url":"/method/hardtanh-activation","slug":"hardtanh-activation","name":"Hardtanh Activation","full_name":"Hardtanh Activation","full_name_withheld":false,"description_markdown":"**Hardtanh** is an activation function used for neural networks:\r\n\r\n$$ f\\left(x\\right) = -1 \\text{ if } x < - 1 $$\r\n$$ f\\left(x\\right) = x \\text{ if } -1 \\leq x \\leq 1 $$\r\n$$ f\\left(x\\right) = 1 \\text{ if } x > 1 $$\r\n\r\nIt is a cheaper and more computationally efficient version of the [tanh activation](https://paperswithcode.com/method/tanh-activation).\r\n\r\nImage Source: [Zhuan Lan](https://zhuanlan.zhihu.com/p/30385380)","description_state":"present","introduced_year":null,"introduced_by":{"title":null,"paper":null,"first_author":null,"n_authors":0,"url_abs":null,"archive_paper_url":null},"source":{"url":null,"title":null,"url_on_a_paper_host":false},"code_snippet_url":null,"code_snippet_url_on_a_code_host":false,"categories":[{"area":"General","area_id":"general","collection":"Activation Functions","url":"/methods/category/activation-functions","pwc_aliases":[]}],"n_papers_tagged":0,"archive_num_papers":0,"papers_newest_first":[],"papers_shown":0,"tasks":[],"tasks_shown":0,"n_tasks":0,"usage_by_year":[],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/hardtanh-activation"},"syntology_read_at":"2026-09-24T18:15:14+00:00"}